Skip to contentSkip to conversation

app/testpmd: remove softnic forward mode

PATCH Superseded Jasvinder Singh 4 participants 7 messages Jun 22, 2020 – Jul 10, 2020 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/testpmd: remove softnic forward mode

Softnic can be used like other virtual devices without needing any special mode. Therefore, softnic forward mode is removed from testpmd app. Documentation is updated as well.

---
 app/test-pmd/Makefile                       |   4 -
 app/test-pmd/cmdline.c                      |  82 ---
 app/test-pmd/config.c                       |  56 --
 app/test-pmd/meson.build                    |   4 -
 app/test-pmd/softnicfwd.c                   | 686 --------------------
 app/test-pmd/testpmd.c                      |  16 -
 app/test-pmd/testpmd.h                      |  22 -
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  10 -
 8 files changed, 880 deletions(-)
 delete mode 100644 app/test-pmd/softnicfwd.c
app/test-pmd/Makefile +0 -4
index ea818de22..4eab42f18 100644
@@ -37,10 +37,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_IEEE1588) += ieee1588fwd.c
 SRCS-$(CONFIG_RTE_LIBRTE_BPF) += bpf_cmd.c
 SRCS-y += util.c
 
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_SOFTNIC), y)
-SRCS-y += softnicfwd.c
-endif
-
 ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
 
 ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y)
app/test-pmd/cmdline.c +0 -82

100 lines not on this page · raw message

app/test-pmd/config.c +0 -56

68 lines not on this page · raw message

app/test-pmd/meson.build +0 -4
index 487288297..750fe3bfd 100644
@@ -36,10 +36,6 @@ endif
 if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
 	deps += 'pmd_ixgbe'
 endif
-if dpdk_conf.has('RTE_LIBRTE_SOFTNIC_PMD')
-	sources += files('softnicfwd.c')
-	deps += 'pmd_softnic'
-endif
 if dpdk_conf.has('RTE_LIBRTE_DPAA_PMD')
 	deps += ['bus_dpaa', 'mempool_dpaa', 'pmd_dpaa']
 endif
app/test-pmd/softnicfwd.c deleted +0 -686

686 lines not on this page · raw message

app/test-pmd/testpmd.c +0 -16
index 99bacddbf..463245ba2 100644
@@ -179,9 +179,6 @@ struct fwd_engine * fwd_engines[] = {
 	&csum_fwd_engine,
 	&icmp_echo_engine,
 	&noisy_vnf_engine,
-#if defined RTE_LIBRTE_PMD_SOFTNIC
-	&softnic_fwd_engine,
-#endif
 #ifdef RTE_LIBRTE_IEEE1588
 	&ieee1588_fwd_engine,
 #endif
@@ -1554,19 +1551,6 @@ init_config(void)
 					"rte_gro_ctx_create() failed\n");
 		}
 	}
-
-#if defined RTE_LIBRTE_PMD_SOFTNIC
-	if (strcmp(cur_fwd_eng->fwd_mode_name, "softnic") == 0) {
-		RTE_ETH_FOREACH_DEV(pid) {
-			port = &ports[pid];
-			const char *driver = port->dev_info.driver_name;
-
-			if (strcmp(driver, "net_softnic") == 0)
-				port->softport.fwd_lcore_arg = fwd_lcores;
-		}
-	}
-#endif
-
 }
 
 
app/test-pmd/testpmd.h +0 -22
index 7ff4c5dba..ac9fdaa53 100644
@@ -58,12 +58,6 @@ typedef uint16_t portid_t;
 typedef uint16_t queueid_t;
 typedef uint16_t streamid_t;
 
-#if defined RTE_LIBRTE_PMD_SOFTNIC
-#define SOFTNIC			1
-#else
-#define SOFTNIC			0
-#endif
-
 enum {
 	PORT_TOPOLOGY_PAIRED,
 	PORT_TOPOLOGY_CHAINED,
@@ -154,16 +148,6 @@ struct port_flow {
 	uint8_t data[]; /**< Storage for flow rule description */
 };
 
-#ifdef SOFTNIC
-/**
- * The data structure associate with softnic port
- */
-struct softnic_port {
-	uint32_t default_tm_hierarchy_enable; /**< default tm hierarchy */
-	struct fwd_lcore **fwd_lcore_arg; /**< softnic fwd core parameters */
-};
-#endif
-
 /**
  * The data structure associated with each port.
  */
@@ -196,9 +180,6 @@ struct rte_port {
 	struct port_flow        *flow_list; /**< Associated flows. */
 	const struct rte_eth_rxtx_callback *rx_dump_cb[RTE_MAX_QUEUES_PER_PORT+1];
 	const struct rte_eth_rxtx_callback *tx_dump_cb[RTE_MAX_QUEUES_PER_PORT+1];
-#ifdef SOFTNIC
-	struct softnic_port     softport;  /**< softnic params */
-#endif
 	/**< metadata value to insert in Tx packets. */
 	uint32_t		tx_metadata;
 	const struct rte_eth_rxtx_callback *tx_set_md_cb[RTE_MAX_QUEUES_PER_PORT+1];
@@ -266,9 +247,6 @@ extern struct fwd_engine tx_only_engine;
 extern struct fwd_engine csum_fwd_engine;
 extern struct fwd_engine icmp_echo_engine;
 extern struct fwd_engine noisy_vnf_engine;
-#ifdef SOFTNIC
-extern struct fwd_engine softnic_fwd_engine;
-#endif
 #ifdef RTE_LIBRTE_IEEE1588
 extern struct fwd_engine ieee1588_fwd_engine;
 #endif
doc/guides/testpmd_app_ug/testpmd_funcs.rst +0 -10
index a360ecccf..64f705ec6 100644
@@ -329,9 +329,6 @@ The available information categories are:
 
 * ``ieee1588``: Demonstrate L2 IEEE1588 V2 PTP timestamping for RX and TX. Requires ``CONFIG_RTE_LIBRTE_IEEE1588=y``.
 
-* ``softnic``: Demonstrates the softnic forwarding operation. In this mode, packet forwarding is
-  similar to I/O mode except for the fact that packets are loopback to the softnic ports only. Therefore, portmask parameter should be set to softnic port only. The various software based custom NIC pipelines specified through the softnic firmware (DPDK packet framework script) can be tested in this mode. Furthermore, it allows to build 5-level hierarchical QoS scheduler as a default option that can be enabled through CLI once testpmd application is initialised. The user can modify the default scheduler hierarchy or can specify the new QoS Scheduler hierarchy through CLI. Requires ``CONFIG_RTE_LIBRTE_PMD_SOFTNIC=y``.
-
 * ``noisy``: Noisy neighbor simulation.
   Simulate more realistic behavior of a guest machine engaged in receiving
   and sending packets performing Virtual Network Function (VNF).
@@ -3106,13 +3103,6 @@ where:
 * ``red`` enable 1, disable 0 marking IP ecn for yellow marked packets with ecn of 2'b01  or 2'b10
   to ecn of 2'b11 when IP is caring TCP or SCTP
 
-Set port traffic management default hierarchy (softnic forwarding mode)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-set the traffic management default hierarchy on the port::
-
-   testpmd> set port tm hierarchy default (port_id)
-
 Filter Functions
 ----------------
 
Signature · 1 line
2.21.3
#1 lore raw
Quoted 7 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Jasvinder Singh
Sent: Monday, June 22, 2020 11:51 PM
To: [email protected]
Cc: [email protected]
Subject: [dpdk-dev] [PATCH] app/testpmd: remove softnic forward mode

Quoted 5 lines

Softnic can be used like other virtual devices without needing any special mode. Therefore, softnic forward mode is removed from testpmd app. Documentation is updated as well.

Hi Jasvinder,

One quick question for this change. How can we test the softnic PMD without this mode? The softnic PMD guidance uses testpmd softnic mode in the PMD test section.
However, when I switch the forward mode from softnic to IO mode, the testpmd cannot work as expected.

I think you need to update the softnic PMD page as well. doc/guides/nics/softnic.rst

Thanks,
Phil

Quoted 13 lines
---
 app/test-pmd/Makefile                       |   4 -
 app/test-pmd/cmdline.c                      |  82 ---
 app/test-pmd/config.c                       |  56 --
 app/test-pmd/meson.build                    |   4 -
 app/test-pmd/softnicfwd.c                   | 686 --------------------
 app/test-pmd/testpmd.c                      |  16 -
 app/test-pmd/testpmd.h                      |  22 -
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  10 -
 8 files changed, 880 deletions(-)
 delete mode 100644 app/test-pmd/softnicfwd.c

<snip>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

#2 lore raw
Quoted 29 lines

-----Original Message-----
From: Phil Yang <[email protected]>
Sent: Tuesday, June 23, 2020 8:38 AM
To: Singh, Jasvinder <[email protected]>; [email protected]
Cc: Dumitrescu, Cristian <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: remove softnic forward mode

Quoted 11 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Jasvinder Singh
Sent: Monday, June 22, 2020 11:51 PM
To: [email protected]
Cc: [email protected]
Subject: [dpdk-dev] [PATCH] app/testpmd: remove softnic forward mode

Softnic can be used like other virtual devices without needing any special mode. Therefore, softnic forward mode is removed from testpmd app. Documentation is updated as well.

Hi Jasvinder,

One quick question for this change. How can we test the softnic PMD without this mode?
The softnic PMD guidance uses testpmd softnic mode in the PMD test section.
However, when I switch the forward mode from softnic to IO mode, the testpmd cannot work as expected.

Quoted 6 lines

I think you need to update the softnic PMD page as well. doc/guides/nics/softnic.rst

Thanks,
Phil

Hi Phil,

I have sent a separate patch on softnic PMD document update with the command to run softnic with testpmd, https://patches.dpdk.org/patch/71984/

Thanks,
Jasvinder

<Snip>

#3 lore raw
Quoted 33 lines · Jasvinder
Quoted 33 lines

-----Original Message-----
From: Phil Yang <[email protected]>
Sent: Tuesday, June 23, 2020 8:38 AM
To: Singh, Jasvinder <[email protected]>; [email protected]
Cc: Dumitrescu, Cristian <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: remove softnic forward mode

Quoted 11 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Jasvinder Singh
Sent: Monday, June 22, 2020 11:51 PM
To: [email protected]
Cc: [email protected]
Subject: [dpdk-dev] [PATCH] app/testpmd: remove softnic forward mode

Softnic can be used like other virtual devices without needing any special mode. Therefore, softnic forward mode is removed from testpmd app. Documentation is updated as well.

Hi Jasvinder,

One quick question for this change. How can we test the softnic PMD without this mode?
The softnic PMD guidance uses testpmd softnic mode in the PMD test section.
However, when I switch the forward mode from softnic to IO mode, the testpmd cannot work as expected.

I think you need to update the softnic PMD page as well. doc/guides/nics/softnic.rst

Quoted 7 lines
Quoted 3 lines

Thanks,
Phil

Hi Phil,

I have sent a separate patch on softnic PMD document update with the command to run softnic with testpmd, https://patches.dpdk.org/patch/71984/

It should be a single patch.

Signature · 1 line
David Marchand
#4 lore raw
Quoted 51 lines

-----Original Message-----
From: David Marchand <[email protected]>
Sent: Tuesday, June 23, 2020 9:42 AM
To: Singh, Jasvinder <[email protected]>
Cc: Phil Yang <[email protected]>; [email protected]; Dumitrescu, Cristian <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: remove softnic forward mode

Quoted 39 lines · Jasvinder
Quoted 38 lines

-----Original Message-----
From: Phil Yang <[email protected]>
Sent: Tuesday, June 23, 2020 8:38 AM
To: Singh, Jasvinder <[email protected]>; [email protected]
Cc: Dumitrescu, Cristian <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: remove softnic forward mode

Quoted 8 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Jasvinder Singh
Sent: Monday, June 22, 2020 11:51 PM
To: [email protected]
Cc: [email protected]
Subject: [dpdk-dev] [PATCH] app/testpmd: remove softnic forward mode

Quoted 4 lines

Softnic can be used like other virtual devices without needing any special mode. Therefore, softnic forward mode is removed from testpmd app. Documentation is updated as well.

Hi Jasvinder,

One quick question for this change. How can we test the softnic PMD without this mode?
The softnic PMD guidance uses testpmd softnic mode in the PMD test section.
However, when I switch the forward mode from softnic to IO mode, the testpmd cannot work as expected.

I think you need to update the softnic PMD page as well. doc/guides/nics/softnic.rst

Thanks,
Phil

Quoted 8 lines
Quoted 5 lines

Hi Phil,

I have sent a separate patch on softnic PMD document update with the command to run softnic with testpmd,
https://patches.dpdk.org/patch/71984/

It should be a single patch.

Ok, will merge document patch with this one.

Quoted 2 lines

--
David Marchand

#5 lore raw

PATCH v2 1/1 app/testpmd: remove softnic forward mode

In reply to Jasvinder Singh

Softnic can be used like other virtual devices without needing any special mode. Therefore, remove softnic mode from testpmd app. Documentation is updated as well.

---
v2
- merge softnic document update patch

 app/test-pmd/Makefile                       |   4 -
 app/test-pmd/cmdline.c                      |  82 ---
 app/test-pmd/config.c                       |  56 --
 app/test-pmd/meson.build                    |   4 -
 app/test-pmd/softnicfwd.c                   | 686 --------------------
 app/test-pmd/testpmd.c                      |  16 -
 app/test-pmd/testpmd.h                      |  22 -
 doc/guides/nics/softnic.rst                 |  60 +-
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  10 -
 9 files changed, 44 insertions(+), 896 deletions(-)
 delete mode 100644 app/test-pmd/softnicfwd.c
app/test-pmd/Makefile +0 -4
index ea818de22..4eab42f18 100644
@@ -37,10 +37,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_IEEE1588) += ieee1588fwd.c
 SRCS-$(CONFIG_RTE_LIBRTE_BPF) += bpf_cmd.c
 SRCS-y += util.c
 
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_SOFTNIC), y)
-SRCS-y += softnicfwd.c
-endif
-
 ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
 
 ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y)
app/test-pmd/cmdline.c +0 -82

100 lines not on this page · raw message

app/test-pmd/config.c +0 -56

68 lines not on this page · raw message

app/test-pmd/meson.build +0 -4
index 487288297..750fe3bfd 100644
@@ -36,10 +36,6 @@ endif
 if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
 	deps += 'pmd_ixgbe'
 endif
-if dpdk_conf.has('RTE_LIBRTE_SOFTNIC_PMD')
-	sources += files('softnicfwd.c')
-	deps += 'pmd_softnic'
-endif
 if dpdk_conf.has('RTE_LIBRTE_DPAA_PMD')
 	deps += ['bus_dpaa', 'mempool_dpaa', 'pmd_dpaa']
 endif
app/test-pmd/softnicfwd.c deleted +0 -686

686 lines not on this page · raw message

app/test-pmd/testpmd.c +0 -16
index 99bacddbf..463245ba2 100644
@@ -179,9 +179,6 @@ struct fwd_engine * fwd_engines[] = {
 	&csum_fwd_engine,
 	&icmp_echo_engine,
 	&noisy_vnf_engine,
-#if defined RTE_LIBRTE_PMD_SOFTNIC
-	&softnic_fwd_engine,
-#endif
 #ifdef RTE_LIBRTE_IEEE1588
 	&ieee1588_fwd_engine,
 #endif
@@ -1554,19 +1551,6 @@ init_config(void)
 					"rte_gro_ctx_create() failed\n");
 		}
 	}
-
-#if defined RTE_LIBRTE_PMD_SOFTNIC
-	if (strcmp(cur_fwd_eng->fwd_mode_name, "softnic") == 0) {
-		RTE_ETH_FOREACH_DEV(pid) {
-			port = &ports[pid];
-			const char *driver = port->dev_info.driver_name;
-
-			if (strcmp(driver, "net_softnic") == 0)
-				port->softport.fwd_lcore_arg = fwd_lcores;
-		}
-	}
-#endif
-
 }
 
 
app/test-pmd/testpmd.h +0 -22
index 7ff4c5dba..ac9fdaa53 100644
@@ -58,12 +58,6 @@ typedef uint16_t portid_t;
 typedef uint16_t queueid_t;
 typedef uint16_t streamid_t;
 
-#if defined RTE_LIBRTE_PMD_SOFTNIC
-#define SOFTNIC			1
-#else
-#define SOFTNIC			0
-#endif
-
 enum {
 	PORT_TOPOLOGY_PAIRED,
 	PORT_TOPOLOGY_CHAINED,
@@ -154,16 +148,6 @@ struct port_flow {
 	uint8_t data[]; /**< Storage for flow rule description */
 };
 
-#ifdef SOFTNIC
-/**
- * The data structure associate with softnic port
- */
-struct softnic_port {
-	uint32_t default_tm_hierarchy_enable; /**< default tm hierarchy */
-	struct fwd_lcore **fwd_lcore_arg; /**< softnic fwd core parameters */
-};
-#endif
-
 /**
  * The data structure associated with each port.
  */
@@ -196,9 +180,6 @@ struct rte_port {
 	struct port_flow        *flow_list; /**< Associated flows. */
 	const struct rte_eth_rxtx_callback *rx_dump_cb[RTE_MAX_QUEUES_PER_PORT+1];
 	const struct rte_eth_rxtx_callback *tx_dump_cb[RTE_MAX_QUEUES_PER_PORT+1];
-#ifdef SOFTNIC
-	struct softnic_port     softport;  /**< softnic params */
-#endif
 	/**< metadata value to insert in Tx packets. */
 	uint32_t		tx_metadata;
 	const struct rte_eth_rxtx_callback *tx_set_md_cb[RTE_MAX_QUEUES_PER_PORT+1];
@@ -266,9 +247,6 @@ extern struct fwd_engine tx_only_engine;
 extern struct fwd_engine csum_fwd_engine;
 extern struct fwd_engine icmp_echo_engine;
 extern struct fwd_engine noisy_vnf_engine;
-#ifdef SOFTNIC
-extern struct fwd_engine softnic_fwd_engine;
-#endif
 #ifdef RTE_LIBRTE_IEEE1588
 extern struct fwd_engine ieee1588_fwd_engine;
 #endif
doc/guides/nics/softnic.rst +44 -16

115 lines not on this page · raw message

doc/guides/testpmd_app_ug/testpmd_funcs.rst +0 -10
index a360ecccf..64f705ec6 100644
@@ -329,9 +329,6 @@ The available information categories are:
 
 * ``ieee1588``: Demonstrate L2 IEEE1588 V2 PTP timestamping for RX and TX. Requires ``CONFIG_RTE_LIBRTE_IEEE1588=y``.
 
-* ``softnic``: Demonstrates the softnic forwarding operation. In this mode, packet forwarding is
-  similar to I/O mode except for the fact that packets are loopback to the softnic ports only. Therefore, portmask parameter should be set to softnic port only. The various software based custom NIC pipelines specified through the softnic firmware (DPDK packet framework script) can be tested in this mode. Furthermore, it allows to build 5-level hierarchical QoS scheduler as a default option that can be enabled through CLI once testpmd application is initialised. The user can modify the default scheduler hierarchy or can specify the new QoS Scheduler hierarchy through CLI. Requires ``CONFIG_RTE_LIBRTE_PMD_SOFTNIC=y``.
-
 * ``noisy``: Noisy neighbor simulation.
   Simulate more realistic behavior of a guest machine engaged in receiving
   and sending packets performing Virtual Network Function (VNF).
@@ -3106,13 +3103,6 @@ where:
 * ``red`` enable 1, disable 0 marking IP ecn for yellow marked packets with ecn of 2'b01  or 2'b10
   to ecn of 2'b11 when IP is caring TCP or SCTP
 
-Set port traffic management default hierarchy (softnic forwarding mode)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-set the traffic management default hierarchy on the port::
-
-   testpmd> set port tm hierarchy default (port_id)
-
 Filter Functions
 ----------------
 
Signature · 1 line
2.21.3