patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v2 01/10] app/testpmd: fix port configuration print
       [not found] ` <cover.1513082773.git.shahafs@mellanox.com>
@ 2017-12-12 12:52   ` Shahaf Shuler
  2017-12-12 12:52   ` [dpdk-stable] [PATCH v2 05/10] app/testpmd: fix flowgen forwarding ol flags Shahaf Shuler
       [not found]   ` <cover.1514281259.git.shahafs@mellanox.com>
  2 siblings, 0 replies; 9+ messages in thread
From: Shahaf Shuler @ 2017-12-12 12:52 UTC (permalink / raw)
  To: ferruh.yigit, jingjing.wu; +Cc: dev, pablo.de.lara.guarch, stable

The print of the port configuration was only according to configuration
of the first port.

Fixes: f2c5125a686a ("app/testpmd: use default Rx/Tx port configuration")
Cc: pablo.de.lara.guarch@intel.com
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
---
 app/test-pmd/config.c | 48 +++++++++++++++++++++++++++++-----------------
 1 file changed, 30 insertions(+), 18 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index cd2ac11..8a2d30c 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1655,33 +1655,45 @@ struct igb_ring_desc_16_bytes {
 void
 rxtx_config_display(void)
 {
-	printf("  %s packet forwarding%s - CRC stripping %s - "
-	       "packets/burst=%d\n", cur_fwd_eng->fwd_mode_name,
+	portid_t pid;
+
+	printf("  %s packet forwarding%s packets/burst=%d\n",
+	       cur_fwd_eng->fwd_mode_name,
 	       retry_enabled == 0 ? "" : " with retry",
-	       rx_mode.hw_strip_crc ? "enabled" : "disabled",
 	       nb_pkt_per_burst);
 
 	if (cur_fwd_eng == &tx_only_engine || cur_fwd_eng == &flow_gen_engine)
 		printf("  packet len=%u - nb packet segments=%d\n",
 				(unsigned)tx_pkt_length, (int) tx_pkt_nb_segs);
 
-	struct rte_eth_rxconf *rx_conf = &ports[0].rx_conf;
-	struct rte_eth_txconf *tx_conf = &ports[0].tx_conf;
-
 	printf("  nb forwarding cores=%d - nb forwarding ports=%d\n",
 	       nb_fwd_lcores, nb_fwd_ports);
-	printf("  RX queues=%d - RX desc=%d - RX free threshold=%d\n",
-	       nb_rxq, nb_rxd, rx_conf->rx_free_thresh);
-	printf("  RX threshold registers: pthresh=%d hthresh=%d wthresh=%d\n",
-	       rx_conf->rx_thresh.pthresh, rx_conf->rx_thresh.hthresh,
-	       rx_conf->rx_thresh.wthresh);
-	printf("  TX queues=%d - TX desc=%d - TX free threshold=%d\n",
-	       nb_txq, nb_txd, tx_conf->tx_free_thresh);
-	printf("  TX threshold registers: pthresh=%d hthresh=%d wthresh=%d\n",
-	       tx_conf->tx_thresh.pthresh, tx_conf->tx_thresh.hthresh,
-	       tx_conf->tx_thresh.wthresh);
-	printf("  TX RS bit threshold=%d - TXQ flags=0x%"PRIx32"\n",
-	       tx_conf->tx_rs_thresh, tx_conf->txq_flags);
+
+	RTE_ETH_FOREACH_DEV(pid) {
+		struct rte_eth_rxconf *rx_conf = &ports[pid].rx_conf;
+		struct rte_eth_txconf *tx_conf = &ports[pid].tx_conf;
+
+		printf("  port %d:\n", (unsigned int)pid);
+		printf("  CRC stripping %s\n",
+				ports[pid].dev_conf.rxmode.hw_strip_crc ?
+				"enabled" : "disabled");
+		printf("  RX queues=%d - RX desc=%d - RX free threshold=%d\n",
+				nb_rxq, nb_rxd, rx_conf->rx_free_thresh);
+		printf("  RX threshold registers: pthresh=%d hthresh=%d "
+		       " wthresh=%d\n",
+				rx_conf->rx_thresh.pthresh,
+				rx_conf->rx_thresh.hthresh,
+				rx_conf->rx_thresh.wthresh);
+		printf("  TX queues=%d - TX desc=%d - TX free threshold=%d\n",
+				nb_txq, nb_txd, tx_conf->tx_free_thresh);
+		printf("  TX threshold registers: pthresh=%d hthresh=%d "
+		       " wthresh=%d\n",
+				tx_conf->tx_thresh.pthresh,
+				tx_conf->tx_thresh.hthresh,
+				tx_conf->tx_thresh.wthresh);
+		printf("  TX RS bit threshold=%d - TXQ flags=0x%"PRIx32"\n",
+				tx_conf->tx_rs_thresh, tx_conf->txq_flags);
+	}
 }
 
 void
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-stable] [PATCH v2 05/10] app/testpmd: fix flowgen forwarding ol flags
       [not found] ` <cover.1513082773.git.shahafs@mellanox.com>
  2017-12-12 12:52   ` [dpdk-stable] [PATCH v2 01/10] app/testpmd: fix port configuration print Shahaf Shuler
@ 2017-12-12 12:52   ` Shahaf Shuler
  2018-01-09  5:32     ` [dpdk-stable] [dpdk-dev] " Lu, Wenzhuo
       [not found]   ` <cover.1514281259.git.shahafs@mellanox.com>
  2 siblings, 1 reply; 9+ messages in thread
From: Shahaf Shuler @ 2017-12-12 12:52 UTC (permalink / raw)
  To: ferruh.yigit, jingjing.wu; +Cc: dev, cchemparathy, stable

The mbuf ol_flags were taken directly from testpmd internal enumeration
leading to incorrect values.

addressing only insertion offload flags as the checksum flags by
the application design are only with csum forwarding.

Fixes: e9e23a617eb8 ("app/testpmd: add flowgen forwarding engine")
Cc: cchemparathy@tilera.com
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
---
 app/test-pmd/flowgen.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index acf9af9..46478fc 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -123,7 +123,7 @@
 	struct ipv4_hdr *ip_hdr;
 	struct udp_hdr *udp_hdr;
 	uint16_t vlan_tci, vlan_tci_outer;
-	uint16_t ol_flags;
+	uint64_t ol_flags;
 	uint16_t nb_rx;
 	uint16_t nb_tx;
 	uint16_t nb_pkt;
@@ -151,7 +151,13 @@
 	mbp = current_fwd_lcore()->mbp;
 	vlan_tci = ports[fs->tx_port].tx_vlan_id;
 	vlan_tci_outer = ports[fs->tx_port].tx_vlan_id_outer;
-	ol_flags = ports[fs->tx_port].tx_ol_flags;
+
+	if (ports[fs->tx_port].tx_ol_flags & TESTPMD_TX_OFFLOAD_INSERT_VLAN)
+		ol_flags = PKT_TX_VLAN_PKT;
+	if (ports[fs->tx_port].tx_ol_flags & TESTPMD_TX_OFFLOAD_INSERT_QINQ)
+		ol_flags |= PKT_TX_QINQ_PKT;
+	if (ports[fs->tx_port].tx_ol_flags & TESTPMD_TX_OFFLOAD_MACSEC)
+		ol_flags |= PKT_TX_MACSEC;
 
 	for (nb_pkt = 0; nb_pkt < nb_pkt_per_burst; nb_pkt++) {
 		pkt = rte_mbuf_raw_alloc(mbp);
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-stable] [PATCH v3 01/10] app/testpmd: fix port configuration print
       [not found]   ` <cover.1514281259.git.shahafs@mellanox.com>
@ 2017-12-26  9:44     ` Shahaf Shuler
  2018-01-05  3:33       ` [dpdk-stable] [dpdk-dev] " Lu, Wenzhuo
  2017-12-26  9:44     ` [dpdk-stable] [PATCH v3 05/10] app/testpmd: fix flowgen forwarding ol flags Shahaf Shuler
  1 sibling, 1 reply; 9+ messages in thread
From: Shahaf Shuler @ 2017-12-26  9:44 UTC (permalink / raw)
  To: jingjing.wu, ferruh.yigit; +Cc: dev, pablo.de.lara.guarch, stable

The print of the port configuration was only according to configuration
of the first port.

Fixes: f2c5125a686a ("app/testpmd: use default Rx/Tx port configuration")
Cc: pablo.de.lara.guarch@intel.com
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
---
 app/test-pmd/config.c | 48 +++++++++++++++++++++++++++++-----------------
 1 file changed, 30 insertions(+), 18 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 86ca3aaef..387fefbaa 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1656,33 +1656,45 @@ fwd_lcores_config_display(void)
 void
 rxtx_config_display(void)
 {
-	printf("  %s packet forwarding%s - CRC stripping %s - "
-	       "packets/burst=%d\n", cur_fwd_eng->fwd_mode_name,
+	portid_t pid;
+
+	printf("  %s packet forwarding%s packets/burst=%d\n",
+	       cur_fwd_eng->fwd_mode_name,
 	       retry_enabled == 0 ? "" : " with retry",
-	       rx_mode.hw_strip_crc ? "enabled" : "disabled",
 	       nb_pkt_per_burst);
 
 	if (cur_fwd_eng == &tx_only_engine || cur_fwd_eng == &flow_gen_engine)
 		printf("  packet len=%u - nb packet segments=%d\n",
 				(unsigned)tx_pkt_length, (int) tx_pkt_nb_segs);
 
-	struct rte_eth_rxconf *rx_conf = &ports[0].rx_conf;
-	struct rte_eth_txconf *tx_conf = &ports[0].tx_conf;
-
 	printf("  nb forwarding cores=%d - nb forwarding ports=%d\n",
 	       nb_fwd_lcores, nb_fwd_ports);
-	printf("  RX queues=%d - RX desc=%d - RX free threshold=%d\n",
-	       nb_rxq, nb_rxd, rx_conf->rx_free_thresh);
-	printf("  RX threshold registers: pthresh=%d hthresh=%d wthresh=%d\n",
-	       rx_conf->rx_thresh.pthresh, rx_conf->rx_thresh.hthresh,
-	       rx_conf->rx_thresh.wthresh);
-	printf("  TX queues=%d - TX desc=%d - TX free threshold=%d\n",
-	       nb_txq, nb_txd, tx_conf->tx_free_thresh);
-	printf("  TX threshold registers: pthresh=%d hthresh=%d wthresh=%d\n",
-	       tx_conf->tx_thresh.pthresh, tx_conf->tx_thresh.hthresh,
-	       tx_conf->tx_thresh.wthresh);
-	printf("  TX RS bit threshold=%d - TXQ flags=0x%"PRIx32"\n",
-	       tx_conf->tx_rs_thresh, tx_conf->txq_flags);
+
+	RTE_ETH_FOREACH_DEV(pid) {
+		struct rte_eth_rxconf *rx_conf = &ports[pid].rx_conf;
+		struct rte_eth_txconf *tx_conf = &ports[pid].tx_conf;
+
+		printf("  port %d:\n", (unsigned int)pid);
+		printf("  CRC stripping %s\n",
+				ports[pid].dev_conf.rxmode.hw_strip_crc ?
+				"enabled" : "disabled");
+		printf("  RX queues=%d - RX desc=%d - RX free threshold=%d\n",
+				nb_rxq, nb_rxd, rx_conf->rx_free_thresh);
+		printf("  RX threshold registers: pthresh=%d hthresh=%d "
+		       " wthresh=%d\n",
+				rx_conf->rx_thresh.pthresh,
+				rx_conf->rx_thresh.hthresh,
+				rx_conf->rx_thresh.wthresh);
+		printf("  TX queues=%d - TX desc=%d - TX free threshold=%d\n",
+				nb_txq, nb_txd, tx_conf->tx_free_thresh);
+		printf("  TX threshold registers: pthresh=%d hthresh=%d "
+		       " wthresh=%d\n",
+				tx_conf->tx_thresh.pthresh,
+				tx_conf->tx_thresh.hthresh,
+				tx_conf->tx_thresh.wthresh);
+		printf("  TX RS bit threshold=%d - TXQ flags=0x%"PRIx32"\n",
+				tx_conf->tx_rs_thresh, tx_conf->txq_flags);
+	}
 }
 
 void
-- 
2.12.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-stable] [PATCH v3 05/10] app/testpmd: fix flowgen forwarding ol flags
       [not found]   ` <cover.1514281259.git.shahafs@mellanox.com>
  2017-12-26  9:44     ` [dpdk-stable] [PATCH v3 01/10] app/testpmd: fix port configuration print Shahaf Shuler
@ 2017-12-26  9:44     ` Shahaf Shuler
  2018-01-09  5:35       ` [dpdk-stable] [dpdk-dev] " Lu, Wenzhuo
  1 sibling, 1 reply; 9+ messages in thread
From: Shahaf Shuler @ 2017-12-26  9:44 UTC (permalink / raw)
  To: jingjing.wu, ferruh.yigit; +Cc: dev, cchemparathy, stable

The mbuf ol_flags were taken directly from testpmd internal enumeration
leading to incorrect values.

addressing only insertion offload flags as the checksum flags by
the application design are only with csum forwarding.

Fixes: e9e23a617eb8 ("app/testpmd: add flowgen forwarding engine")
Cc: cchemparathy@tilera.com
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
---
 app/test-pmd/flowgen.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index acf9af941..46478fc3a 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -123,7 +123,7 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
 	struct ipv4_hdr *ip_hdr;
 	struct udp_hdr *udp_hdr;
 	uint16_t vlan_tci, vlan_tci_outer;
-	uint16_t ol_flags;
+	uint64_t ol_flags;
 	uint16_t nb_rx;
 	uint16_t nb_tx;
 	uint16_t nb_pkt;
@@ -151,7 +151,13 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
 	mbp = current_fwd_lcore()->mbp;
 	vlan_tci = ports[fs->tx_port].tx_vlan_id;
 	vlan_tci_outer = ports[fs->tx_port].tx_vlan_id_outer;
-	ol_flags = ports[fs->tx_port].tx_ol_flags;
+
+	if (ports[fs->tx_port].tx_ol_flags & TESTPMD_TX_OFFLOAD_INSERT_VLAN)
+		ol_flags = PKT_TX_VLAN_PKT;
+	if (ports[fs->tx_port].tx_ol_flags & TESTPMD_TX_OFFLOAD_INSERT_QINQ)
+		ol_flags |= PKT_TX_QINQ_PKT;
+	if (ports[fs->tx_port].tx_ol_flags & TESTPMD_TX_OFFLOAD_MACSEC)
+		ol_flags |= PKT_TX_MACSEC;
 
 	for (nb_pkt = 0; nb_pkt < nb_pkt_per_burst; nb_pkt++) {
 		pkt = rte_mbuf_raw_alloc(mbp);
-- 
2.12.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH v3 01/10] app/testpmd: fix port configuration print
  2017-12-26  9:44     ` [dpdk-stable] [PATCH v3 01/10] app/testpmd: fix port configuration print Shahaf Shuler
@ 2018-01-05  3:33       ` Lu, Wenzhuo
  0 siblings, 0 replies; 9+ messages in thread
From: Lu, Wenzhuo @ 2018-01-05  3:33 UTC (permalink / raw)
  To: Shahaf Shuler, Wu, Jingjing, Yigit, Ferruh
  Cc: dev, De Lara Guarch, Pablo, stable

Hi,


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shahaf Shuler
> Sent: Tuesday, December 26, 2017 5:44 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>;
> stable@dpdk.org
> Subject: [dpdk-dev] [PATCH v3 01/10] app/testpmd: fix port configuration
> print
> 
> The print of the port configuration was only according to configuration of
> the first port.
> 
> Fixes: f2c5125a686a ("app/testpmd: use default Rx/Tx port configuration")
> Cc: pablo.de.lara.guarch@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH v2 05/10] app/testpmd: fix flowgen forwarding ol flags
  2017-12-12 12:52   ` [dpdk-stable] [PATCH v2 05/10] app/testpmd: fix flowgen forwarding ol flags Shahaf Shuler
@ 2018-01-09  5:32     ` Lu, Wenzhuo
  0 siblings, 0 replies; 9+ messages in thread
From: Lu, Wenzhuo @ 2018-01-09  5:32 UTC (permalink / raw)
  To: Shahaf Shuler, Yigit, Ferruh, Wu, Jingjing; +Cc: dev, cchemparathy, stable

Hi,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shahaf Shuler
> Sent: Tuesday, December 12, 2017 8:53 PM
> To: Yigit, Ferruh <ferruh.yigit@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>
> Cc: dev@dpdk.org; cchemparathy@tilera.com; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH v2 05/10] app/testpmd: fix flowgen forwarding ol
> flags
> 
> The mbuf ol_flags were taken directly from testpmd internal enumeration
> leading to incorrect values.
> 
> addressing only insertion offload flags as the checksum flags by the
> application design are only with csum forwarding.
> 
> Fixes: e9e23a617eb8 ("app/testpmd: add flowgen forwarding engine")
> Cc: cchemparathy@tilera.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH v3 05/10] app/testpmd: fix flowgen forwarding ol flags
  2017-12-26  9:44     ` [dpdk-stable] [PATCH v3 05/10] app/testpmd: fix flowgen forwarding ol flags Shahaf Shuler
@ 2018-01-09  5:35       ` Lu, Wenzhuo
  0 siblings, 0 replies; 9+ messages in thread
From: Lu, Wenzhuo @ 2018-01-09  5:35 UTC (permalink / raw)
  To: Shahaf Shuler, Wu, Jingjing, Yigit, Ferruh; +Cc: dev, stable

Hi,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shahaf Shuler
> Sent: Tuesday, December 26, 2017 5:44 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>
> Cc: dev@dpdk.org; cchemparathy@tilera.com; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH v3 05/10] app/testpmd: fix flowgen forwarding ol
> flags
> 
> The mbuf ol_flags were taken directly from testpmd internal enumeration
> leading to incorrect values.
> 
> addressing only insertion offload flags as the checksum flags by the
> application design are only with csum forwarding.
> 
> Fixes: e9e23a617eb8 ("app/testpmd: add flowgen forwarding engine")
> Cc: cchemparathy@tilera.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-stable] [PATCH v4 01/11] app/testpmd: fix port configuration print
       [not found] ` <cover.1515575134.git.shahafs@mellanox.com>
@ 2018-01-10  9:09   ` Shahaf Shuler
  2018-01-10  9:09   ` [dpdk-stable] [PATCH v4 05/11] app/testpmd: fix flowgen forwarding ol flags Shahaf Shuler
  1 sibling, 0 replies; 9+ messages in thread
From: Shahaf Shuler @ 2018-01-10  9:09 UTC (permalink / raw)
  To: jingjing.wu, thomas, ferruh.yigit; +Cc: dev, pablo.de.lara.guarch, stable

The print of the port configuration was only according to configuration
of the first port.

Fixes: f2c5125a686a ("app/testpmd: use default Rx/Tx port configuration")
Cc: pablo.de.lara.guarch@intel.com
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 app/test-pmd/config.c | 48 +++++++++++++++++++++++++++++-----------------
 1 file changed, 30 insertions(+), 18 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 86ca3aaef..387fefbaa 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1656,33 +1656,45 @@ fwd_lcores_config_display(void)
 void
 rxtx_config_display(void)
 {
-	printf("  %s packet forwarding%s - CRC stripping %s - "
-	       "packets/burst=%d\n", cur_fwd_eng->fwd_mode_name,
+	portid_t pid;
+
+	printf("  %s packet forwarding%s packets/burst=%d\n",
+	       cur_fwd_eng->fwd_mode_name,
 	       retry_enabled == 0 ? "" : " with retry",
-	       rx_mode.hw_strip_crc ? "enabled" : "disabled",
 	       nb_pkt_per_burst);
 
 	if (cur_fwd_eng == &tx_only_engine || cur_fwd_eng == &flow_gen_engine)
 		printf("  packet len=%u - nb packet segments=%d\n",
 				(unsigned)tx_pkt_length, (int) tx_pkt_nb_segs);
 
-	struct rte_eth_rxconf *rx_conf = &ports[0].rx_conf;
-	struct rte_eth_txconf *tx_conf = &ports[0].tx_conf;
-
 	printf("  nb forwarding cores=%d - nb forwarding ports=%d\n",
 	       nb_fwd_lcores, nb_fwd_ports);
-	printf("  RX queues=%d - RX desc=%d - RX free threshold=%d\n",
-	       nb_rxq, nb_rxd, rx_conf->rx_free_thresh);
-	printf("  RX threshold registers: pthresh=%d hthresh=%d wthresh=%d\n",
-	       rx_conf->rx_thresh.pthresh, rx_conf->rx_thresh.hthresh,
-	       rx_conf->rx_thresh.wthresh);
-	printf("  TX queues=%d - TX desc=%d - TX free threshold=%d\n",
-	       nb_txq, nb_txd, tx_conf->tx_free_thresh);
-	printf("  TX threshold registers: pthresh=%d hthresh=%d wthresh=%d\n",
-	       tx_conf->tx_thresh.pthresh, tx_conf->tx_thresh.hthresh,
-	       tx_conf->tx_thresh.wthresh);
-	printf("  TX RS bit threshold=%d - TXQ flags=0x%"PRIx32"\n",
-	       tx_conf->tx_rs_thresh, tx_conf->txq_flags);
+
+	RTE_ETH_FOREACH_DEV(pid) {
+		struct rte_eth_rxconf *rx_conf = &ports[pid].rx_conf;
+		struct rte_eth_txconf *tx_conf = &ports[pid].tx_conf;
+
+		printf("  port %d:\n", (unsigned int)pid);
+		printf("  CRC stripping %s\n",
+				ports[pid].dev_conf.rxmode.hw_strip_crc ?
+				"enabled" : "disabled");
+		printf("  RX queues=%d - RX desc=%d - RX free threshold=%d\n",
+				nb_rxq, nb_rxd, rx_conf->rx_free_thresh);
+		printf("  RX threshold registers: pthresh=%d hthresh=%d "
+		       " wthresh=%d\n",
+				rx_conf->rx_thresh.pthresh,
+				rx_conf->rx_thresh.hthresh,
+				rx_conf->rx_thresh.wthresh);
+		printf("  TX queues=%d - TX desc=%d - TX free threshold=%d\n",
+				nb_txq, nb_txd, tx_conf->tx_free_thresh);
+		printf("  TX threshold registers: pthresh=%d hthresh=%d "
+		       " wthresh=%d\n",
+				tx_conf->tx_thresh.pthresh,
+				tx_conf->tx_thresh.hthresh,
+				tx_conf->tx_thresh.wthresh);
+		printf("  TX RS bit threshold=%d - TXQ flags=0x%"PRIx32"\n",
+				tx_conf->tx_rs_thresh, tx_conf->txq_flags);
+	}
 }
 
 void
-- 
2.12.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-stable] [PATCH v4 05/11] app/testpmd: fix flowgen forwarding ol flags
       [not found] ` <cover.1515575134.git.shahafs@mellanox.com>
  2018-01-10  9:09   ` [dpdk-stable] [PATCH v4 01/11] app/testpmd: fix port configuration print Shahaf Shuler
@ 2018-01-10  9:09   ` Shahaf Shuler
  1 sibling, 0 replies; 9+ messages in thread
From: Shahaf Shuler @ 2018-01-10  9:09 UTC (permalink / raw)
  To: jingjing.wu, thomas, ferruh.yigit; +Cc: dev, cchemparathy, stable

The mbuf ol_flags were taken directly from testpmd internal enumeration
leading to incorrect values.

addressing only insertion offload flags as the checksum flags by
the application design are only with csum forwarding.

Fixes: e9e23a617eb8 ("app/testpmd: add flowgen forwarding engine")
Cc: cchemparathy@tilera.com
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 app/test-pmd/flowgen.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index acf9af941..46478fc3a 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -123,7 +123,7 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
 	struct ipv4_hdr *ip_hdr;
 	struct udp_hdr *udp_hdr;
 	uint16_t vlan_tci, vlan_tci_outer;
-	uint16_t ol_flags;
+	uint64_t ol_flags;
 	uint16_t nb_rx;
 	uint16_t nb_tx;
 	uint16_t nb_pkt;
@@ -151,7 +151,13 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
 	mbp = current_fwd_lcore()->mbp;
 	vlan_tci = ports[fs->tx_port].tx_vlan_id;
 	vlan_tci_outer = ports[fs->tx_port].tx_vlan_id_outer;
-	ol_flags = ports[fs->tx_port].tx_ol_flags;
+
+	if (ports[fs->tx_port].tx_ol_flags & TESTPMD_TX_OFFLOAD_INSERT_VLAN)
+		ol_flags = PKT_TX_VLAN_PKT;
+	if (ports[fs->tx_port].tx_ol_flags & TESTPMD_TX_OFFLOAD_INSERT_QINQ)
+		ol_flags |= PKT_TX_QINQ_PKT;
+	if (ports[fs->tx_port].tx_ol_flags & TESTPMD_TX_OFFLOAD_MACSEC)
+		ol_flags |= PKT_TX_MACSEC;
 
 	for (nb_pkt = 0; nb_pkt < nb_pkt_per_burst; nb_pkt++) {
 		pkt = rte_mbuf_raw_alloc(mbp);
-- 
2.12.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-01-10  9:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20171123120804.143897-1-shahafs@mellanox.com>
     [not found] ` <cover.1513082773.git.shahafs@mellanox.com>
2017-12-12 12:52   ` [dpdk-stable] [PATCH v2 01/10] app/testpmd: fix port configuration print Shahaf Shuler
2017-12-12 12:52   ` [dpdk-stable] [PATCH v2 05/10] app/testpmd: fix flowgen forwarding ol flags Shahaf Shuler
2018-01-09  5:32     ` [dpdk-stable] [dpdk-dev] " Lu, Wenzhuo
     [not found]   ` <cover.1514281259.git.shahafs@mellanox.com>
2017-12-26  9:44     ` [dpdk-stable] [PATCH v3 01/10] app/testpmd: fix port configuration print Shahaf Shuler
2018-01-05  3:33       ` [dpdk-stable] [dpdk-dev] " Lu, Wenzhuo
2017-12-26  9:44     ` [dpdk-stable] [PATCH v3 05/10] app/testpmd: fix flowgen forwarding ol flags Shahaf Shuler
2018-01-09  5:35       ` [dpdk-stable] [dpdk-dev] " Lu, Wenzhuo
     [not found] ` <cover.1515575134.git.shahafs@mellanox.com>
2018-01-10  9:09   ` [dpdk-stable] [PATCH v4 01/11] app/testpmd: fix port configuration print Shahaf Shuler
2018-01-10  9:09   ` [dpdk-stable] [PATCH v4 05/11] app/testpmd: fix flowgen forwarding ol flags Shahaf Shuler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).