patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] app/testpmd: fix to add offloads confguration for queue
@ 2019-07-03  5:24 Wei Zhao
  2019-07-03 11:46 ` [dpdk-stable] [dpdk-dev] " Iremonger, Bernard
  2019-07-04  5:35 ` [dpdk-stable] [PATCH v2] " Wei Zhao
  0 siblings, 2 replies; 10+ messages in thread
From: Wei Zhao @ 2019-07-03  5:24 UTC (permalink / raw)
  To: dev; +Cc: stable, wei zhao

When adding offloads from commandline, not only port
related configuration bits should be set, but also queue
related offloads configuration bits, or it will cause error.
For example, test in this process for ixgbe:
(1)./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6 -n 4
-- -i --portmask=0x1 --port-topology=loop --disable-crc-strip
(2)port stop all
(3)port config all crc-strip on
(4)port start all
we will see "Fail to configure port 0 rx queues" of warning info.

Fixes: 0074d02fca21 ("app/testpmd: convert to new Rx offloads API")

Signed-off-by: wei zhao <wei.zhao1@intel.com>
---
 app/test-pmd/cmdline.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index d1e0d44..1b2daa1 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2047,6 +2047,7 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
 {
 	struct cmd_config_rx_mode_flag *res = parsed_result;
 	portid_t pid;
+	int k;
 
 	if (!all_ports_stopped()) {
 		printf("Please stop all ports first\n");
@@ -2147,6 +2148,10 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
 			return;
 		}
 		port->dev_conf.rxmode.offloads = rx_offloads;
+		/* Apply Rx offloads configuration */
+		for (k = 0; k < port->dev_info.max_rx_queues; k++)
+			port->rx_conf[k].offloads =
+				port->dev_conf.rxmode.offloads;
 	}
 
 	init_port_config();
@@ -4368,6 +4373,7 @@ cmd_csum_parsed(void *parsed_result,
 	int hw = 0;
 	uint64_t csum_offloads = 0;
 	struct rte_eth_dev_info dev_info;
+	int k;
 
 	if (port_id_is_invalid(res->port_id, ENABLED_WARN)) {
 		printf("invalid port %d\n", res->port_id);
@@ -4443,6 +4449,10 @@ cmd_csum_parsed(void *parsed_result,
 			ports[res->port_id].dev_conf.txmode.offloads &=
 							(~csum_offloads);
 		}
+		/* Apply Tx offloads configuration */
+		for (k = 0; k < ports[res->port_id].dev_info.max_tx_queues; k++)
+			ports[res->port_id].tx_conf[k].offloads =
+				ports[res->port_id].dev_conf.txmode.offloads;
 	}
 	csum_show(res->port_id);
 
@@ -4565,6 +4575,7 @@ cmd_tso_set_parsed(void *parsed_result,
 {
 	struct cmd_tso_set_result *res = parsed_result;
 	struct rte_eth_dev_info dev_info;
+	int k;
 
 	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
 		return;
@@ -4594,6 +4605,10 @@ cmd_tso_set_parsed(void *parsed_result,
 		printf("TSO segment size for non-tunneled packets is %d\n",
 			ports[res->port_id].tso_segsz);
 	}
+	/* Apply Tx offloads configuration */
+	for (k = 0; k < ports[res->port_id].dev_info.max_tx_queues; k++)
+		ports[res->port_id].tx_conf[k].offloads =
+			ports[res->port_id].dev_conf.txmode.offloads;
 
 	/* display warnings if configuration is not supported by the NIC */
 	rte_eth_dev_info_get(res->port_id, &dev_info);
@@ -4694,6 +4709,7 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,
 {
 	struct cmd_tunnel_tso_set_result *res = parsed_result;
 	struct rte_eth_dev_info dev_info;
+	int k;
 
 	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
 		return;
@@ -4747,6 +4763,10 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,
 		      DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM))
 			printf("Warning: csum set outer-ip must be set to hw "
 				"if outer L3 is IPv4; not necessary for IPv6\n");
+		/* Apply Tx offloads configuration */
+		for (k = 0; k < ports[res->port_id].dev_info.max_tx_queues; k++)
+			ports[res->port_id].tx_conf[k].offloads =
+				ports[res->port_id].dev_conf.txmode.offloads;
 	}
 
 	cmd_reconfig_device_queue(res->port_id, 1, 1);
-- 
2.7.5


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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] app/testpmd: fix to add offloads confguration for queue
  2019-07-03  5:24 [dpdk-stable] [PATCH] app/testpmd: fix to add offloads confguration for queue Wei Zhao
@ 2019-07-03 11:46 ` Iremonger, Bernard
  2019-07-04  5:35 ` [dpdk-stable] [PATCH v2] " Wei Zhao
  1 sibling, 0 replies; 10+ messages in thread
From: Iremonger, Bernard @ 2019-07-03 11:46 UTC (permalink / raw)
  To: Zhao1, Wei, dev; +Cc: stable, Zhao1, Wei


Hi Wei,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Zhao
> Sent: Wednesday, July 3, 2019 6:24 AM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Zhao1, Wei <wei.zhao1@intel.com>
> Subject: [dpdk-dev] [PATCH] app/testpmd: fix to add offloads confguration
> for queue
> 
> When adding offloads from commandline, not only port related configuration
> bits should be set, but also queue related offloads configuration bits, or it will
> cause error.
> For example, test in this process for ixgbe:
> (1)./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6 -n 4
> -- -i --portmask=0x1 --port-topology=loop --disable-crc-strip (2)port stop all
> (3)port config all crc-strip on (4)port start all we will see "Fail to configure port
> 0 rx queues" of warning info.
> 
> Fixes: 0074d02fca21 ("app/testpmd: convert to new Rx offloads API")


./devtools/check-git-log.sh -1
Is it candidate for Cc: stable@dpdk.org backport?
        app/testpmd: fix to add offloads confguration for queue

> 
> Signed-off-by: wei zhao <wei.zhao1@intel.com>
> ---
>  app/test-pmd/cmdline.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> d1e0d44..1b2daa1 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -2047,6 +2047,7 @@ cmd_config_rx_mode_flag_parsed(void
> *parsed_result,  {
>  	struct cmd_config_rx_mode_flag *res = parsed_result;
>  	portid_t pid;
> +	int k;
> 
>  	if (!all_ports_stopped()) {
>  		printf("Please stop all ports first\n"); @@ -2147,6 +2148,10
> @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
>  			return;
>  		}
>  		port->dev_conf.rxmode.offloads = rx_offloads;
> +		/* Apply Rx offloads configuration */
> +		for (k = 0; k < port->dev_info.max_rx_queues; k++)
> +			port->rx_conf[k].offloads =
> +				port->dev_conf.rxmode.offloads;
>  	}
> 
>  	init_port_config();
> @@ -4368,6 +4373,7 @@ cmd_csum_parsed(void *parsed_result,
>  	int hw = 0;
>  	uint64_t csum_offloads = 0;
>  	struct rte_eth_dev_info dev_info;
> +	int k;
> 
>  	if (port_id_is_invalid(res->port_id, ENABLED_WARN)) {
>  		printf("invalid port %d\n", res->port_id); @@ -4443,6
> +4449,10 @@ cmd_csum_parsed(void *parsed_result,
>  			ports[res->port_id].dev_conf.txmode.offloads &=
>  							(~csum_offloads);
>  		}
> +		/* Apply Tx offloads configuration */
> +		for (k = 0; k < ports[res->port_id].dev_info.max_tx_queues;
> k++)
> +			ports[res->port_id].tx_conf[k].offloads =
> +				ports[res-
> >port_id].dev_conf.txmode.offloads;
>  	}

The above block of code seems to be duplicated 3 times in this patch.
It would probably be better to put it in a function and call the function 3 times.

>  	csum_show(res->port_id);
> 
> @@ -4565,6 +4575,7 @@ cmd_tso_set_parsed(void *parsed_result,  {
>  	struct cmd_tso_set_result *res = parsed_result;
>  	struct rte_eth_dev_info dev_info;
> +	int k;
> 
>  	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
>  		return;
> @@ -4594,6 +4605,10 @@ cmd_tso_set_parsed(void *parsed_result,
>  		printf("TSO segment size for non-tunneled packets is %d\n",
>  			ports[res->port_id].tso_segsz);
>  	}
> +	/* Apply Tx offloads configuration */
> +	for (k = 0; k < ports[res->port_id].dev_info.max_tx_queues; k++)
> +		ports[res->port_id].tx_conf[k].offloads =
> +			ports[res->port_id].dev_conf.txmode.offloads;

The above block of code seems to be duplicated 3 times in this patch.

> 
>  	/* display warnings if configuration is not supported by the NIC */
>  	rte_eth_dev_info_get(res->port_id, &dev_info); @@ -4694,6
> +4709,7 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,  {
>  	struct cmd_tunnel_tso_set_result *res = parsed_result;
>  	struct rte_eth_dev_info dev_info;
> +	int k;
> 
>  	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
>  		return;
> @@ -4747,6 +4763,10 @@ cmd_tunnel_tso_set_parsed(void
> *parsed_result,
>  		      DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM))
>  			printf("Warning: csum set outer-ip must be set to hw
> "
>  				"if outer L3 is IPv4; not necessary for
> IPv6\n");
> +		/* Apply Tx offloads configuration */
> +		for (k = 0; k < ports[res->port_id].dev_info.max_tx_queues;
> k++)
> +			ports[res->port_id].tx_conf[k].offloads =
> +				ports[res-
> >port_id].dev_conf.txmode.offloads;
>  	}

The above block of code seems to be duplicated 3 times in this patch.

> 
>  	cmd_reconfig_device_queue(res->port_id, 1, 1);
> --
> 2.7.5

Regards,

Bernard.


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

* [dpdk-stable] [PATCH v2] app/testpmd: fix to add offloads confguration for queue
  2019-07-03  5:24 [dpdk-stable] [PATCH] app/testpmd: fix to add offloads confguration for queue Wei Zhao
  2019-07-03 11:46 ` [dpdk-stable] [dpdk-dev] " Iremonger, Bernard
@ 2019-07-04  5:35 ` Wei Zhao
  2019-07-04  8:53   ` Iremonger, Bernard
  2019-07-06 16:24   ` Thomas Monjalon
  1 sibling, 2 replies; 10+ messages in thread
From: Wei Zhao @ 2019-07-04  5:35 UTC (permalink / raw)
  To: dev; +Cc: stable, bernard.iremonger, wei zhao

When adding offloads from commandline, not only port
related configuration bits should be set, but also queue
related offloads configuration bits, or it will cause error.
For example, test in this process for ixgbe:
(1)./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6 -n 4
-- -i --portmask=0x1 --port-topology=loop --disable-crc-strip
(2)port stop all
(3)port config all crc-strip on
(4)port start all
we will see "Fail to configure port 0 rx queues" of warning info.

Fixes: 0074d02fca21 ("app/testpmd: convert to new Rx offloads API")
Cc: stable@dpdk.org

Signed-off-by: wei zhao <wei.zhao1@intel.com>

---

v2:

merge to one function for apply offloads configguration
---
 app/test-pmd/cmdline.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index d1e0d44..6a69f90 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2047,6 +2047,7 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
 {
 	struct cmd_config_rx_mode_flag *res = parsed_result;
 	portid_t pid;
+	int k;
 
 	if (!all_ports_stopped()) {
 		printf("Please stop all ports first\n");
@@ -2147,6 +2148,10 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
 			return;
 		}
 		port->dev_conf.rxmode.offloads = rx_offloads;
+		/* Apply Rx offloads configuration */
+		for (k = 0; k < port->dev_info.max_rx_queues; k++)
+			port->rx_conf[k].offloads =
+				port->dev_conf.rxmode.offloads;
 	}
 
 	init_port_config();
@@ -4360,6 +4365,17 @@ csum_show(int port_id)
 }
 
 static void
+cmd_config_queue_tx_offloads(struct rte_port *port)
+{
+	int k;
+
+	/* Apply queue tx offloads configuration */
+	for (k = 0; k < port->dev_info.max_rx_queues; k++)
+		port->tx_conf[k].offloads =
+			port->dev_conf.txmode.offloads;
+}
+
+static void
 cmd_csum_parsed(void *parsed_result,
 		       __attribute__((unused)) struct cmdline *cl,
 		       __attribute__((unused)) void *data)
@@ -4443,6 +4459,7 @@ cmd_csum_parsed(void *parsed_result,
 			ports[res->port_id].dev_conf.txmode.offloads &=
 							(~csum_offloads);
 		}
+		cmd_config_queue_tx_offloads(&ports[res->port_id]);
 	}
 	csum_show(res->port_id);
 
@@ -4594,6 +4611,7 @@ cmd_tso_set_parsed(void *parsed_result,
 		printf("TSO segment size for non-tunneled packets is %d\n",
 			ports[res->port_id].tso_segsz);
 	}
+	cmd_config_queue_tx_offloads(&ports[res->port_id]);
 
 	/* display warnings if configuration is not supported by the NIC */
 	rte_eth_dev_info_get(res->port_id, &dev_info);
@@ -4749,6 +4767,7 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,
 				"if outer L3 is IPv4; not necessary for IPv6\n");
 	}
 
+	cmd_config_queue_tx_offloads(&ports[res->port_id]);
 	cmd_reconfig_device_queue(res->port_id, 1, 1);
 }
 
-- 
2.7.5


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

* Re: [dpdk-stable] [PATCH v2] app/testpmd: fix to add offloads confguration for queue
  2019-07-04  5:35 ` [dpdk-stable] [PATCH v2] " Wei Zhao
@ 2019-07-04  8:53   ` Iremonger, Bernard
  2019-07-04 23:54     ` Ferruh Yigit
  2019-07-06 16:24   ` Thomas Monjalon
  1 sibling, 1 reply; 10+ messages in thread
From: Iremonger, Bernard @ 2019-07-04  8:53 UTC (permalink / raw)
  To: Zhao1, Wei, dev; +Cc: stable

> -----Original Message-----
> From: Zhao1, Wei
> Sent: Thursday, July 4, 2019 6:36 AM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Iremonger, Bernard <bernard.iremonger@intel.com>;
> Zhao1, Wei <wei.zhao1@intel.com>
> Subject: [PATCH v2] app/testpmd: fix to add offloads confguration for queue
> 
> When adding offloads from commandline, not only port related configuration
> bits should be set, but also queue related offloads configuration bits, or it will
> cause error.
> For example, test in this process for ixgbe:
> (1)./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6 -n 4
> -- -i --portmask=0x1 --port-topology=loop --disable-crc-strip (2)port stop all
> (3)port config all crc-strip on (4)port start all we will see "Fail to configure port
> 0 rx queues" of warning info.
> 
> Fixes: 0074d02fca21 ("app/testpmd: convert to new Rx offloads API")
> Cc: stable@dpdk.org
> 
> Signed-off-by: wei zhao <wei.zhao1@intel.com>

Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

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

* Re: [dpdk-stable] [PATCH v2] app/testpmd: fix to add offloads confguration for queue
  2019-07-04  8:53   ` Iremonger, Bernard
@ 2019-07-04 23:54     ` Ferruh Yigit
  0 siblings, 0 replies; 10+ messages in thread
From: Ferruh Yigit @ 2019-07-04 23:54 UTC (permalink / raw)
  To: Iremonger, Bernard, Zhao1, Wei, dev; +Cc: stable

On 7/4/2019 9:53 AM, Iremonger, Bernard wrote:
>> -----Original Message-----
>> From: Zhao1, Wei
>> Sent: Thursday, July 4, 2019 6:36 AM
>> To: dev@dpdk.org
>> Cc: stable@dpdk.org; Iremonger, Bernard <bernard.iremonger@intel.com>;
>> Zhao1, Wei <wei.zhao1@intel.com>
>> Subject: [PATCH v2] app/testpmd: fix to add offloads confguration for queue
>>
>> When adding offloads from commandline, not only port related configuration
>> bits should be set, but also queue related offloads configuration bits, or it will
>> cause error.
>> For example, test in this process for ixgbe:
>> (1)./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6 -n 4
>> -- -i --portmask=0x1 --port-topology=loop --disable-crc-strip (2)port stop all
>> (3)port config all crc-strip on (4)port start all we will see "Fail to configure port
>> 0 rx queues" of warning info.
>>
>> Fixes: 0074d02fca21 ("app/testpmd: convert to new Rx offloads API")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: wei zhao <wei.zhao1@intel.com>
> 
> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
> 

Applied to dpdk-next-net/master, thanks.

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

* Re: [dpdk-stable] [PATCH v2] app/testpmd: fix to add offloads confguration for queue
  2019-07-04  5:35 ` [dpdk-stable] [PATCH v2] " Wei Zhao
  2019-07-04  8:53   ` Iremonger, Bernard
@ 2019-07-06 16:24   ` Thomas Monjalon
  2019-07-06 16:25     ` Thomas Monjalon
  1 sibling, 1 reply; 10+ messages in thread
From: Thomas Monjalon @ 2019-07-06 16:24 UTC (permalink / raw)
  To: dev
  Cc: stable, Wei Zhao, bernard.iremonger, ferruh.yigit, arybchenko,
	jerinj, konstantin.ananyev

04/07/2019 07:35, Wei Zhao:
> When adding offloads from commandline, not only port
> related configuration bits should be set, but also queue
> related offloads configuration bits, or it will cause error.
> For example, test in this process for ixgbe:
> (1)./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6 -n 4
> -- -i --portmask=0x1 --port-topology=loop --disable-crc-strip
> (2)port stop all
> (3)port config all crc-strip on
> (4)port start all
> we will see "Fail to configure port 0 rx queues" of warning info.

I'm really surprised it was so much broken.
I did not check the code. Someone else did?




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

* Re: [dpdk-stable] [PATCH v2] app/testpmd: fix to add offloads confguration for queue
  2019-07-06 16:24   ` Thomas Monjalon
@ 2019-07-06 16:25     ` Thomas Monjalon
  2019-07-08  9:09       ` David Marchand
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Monjalon @ 2019-07-06 16:25 UTC (permalink / raw)
  To: dev
  Cc: stable, Wei Zhao, bernard.iremonger, ferruh.yigit, arybchenko,
	jerinj, konstantin.ananyev, olivier.matz, david.marchand,
	adrien.mazarguil

06/07/2019 18:24, Thomas Monjalon:
> 04/07/2019 07:35, Wei Zhao:
> > When adding offloads from commandline, not only port
> > related configuration bits should be set, but also queue
> > related offloads configuration bits, or it will cause error.
> > For example, test in this process for ixgbe:
> > (1)./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6 -n 4
> > -- -i --portmask=0x1 --port-topology=loop --disable-crc-strip
> > (2)port stop all
> > (3)port config all crc-strip on
> > (4)port start all
> > we will see "Fail to configure port 0 rx queues" of warning info.
> 
> I'm really surprised it was so much broken.
> I did not check the code. Someone else did?

Adding more Cc for double check.



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

* Re: [dpdk-stable] [PATCH v2] app/testpmd: fix to add offloads confguration for queue
  2019-07-06 16:25     ` Thomas Monjalon
@ 2019-07-08  9:09       ` David Marchand
  2019-07-08  9:16         ` Zhao1, Wei
  2019-07-08  9:22         ` Zhao1, Wei
  0 siblings, 2 replies; 10+ messages in thread
From: David Marchand @ 2019-07-08  9:09 UTC (permalink / raw)
  To: Wei Zhao
  Cc: dev, dpdk stable, Iremonger, Bernard, Yigit, Ferruh,
	Andrew Rybchenko, Jerin Jacob Kollanukkaran, Ananyev, Konstantin,
	Olivier Matz, Adrien Mazarguil, Thomas Monjalon

Hello Wei,

On Sat, Jul 6, 2019 at 6:26 PM Thomas Monjalon <thomas@monjalon.net> wrote:

> 06/07/2019 18:24, Thomas Monjalon:
> > 04/07/2019 07:35, Wei Zhao:
> > > When adding offloads from commandline, not only port
> > > related configuration bits should be set, but also queue
> > > related offloads configuration bits, or it will cause error.
> > > For example, test in this process for ixgbe:
> > > (1)./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6 -n 4
> > > -- -i --portmask=0x1 --port-topology=loop --disable-crc-strip
> > > (2)port stop all
> > > (3)port config all crc-strip on
> > > (4)port start all
> > > we will see "Fail to configure port 0 rx queues" of warning info.
> >
> > I'm really surprised it was so much broken.
> > I did not check the code. Someone else did?
>
> Adding more Cc for double check.
>
>
Did not check the code yet, but the Fixes: line is about RX offloads, and
you touched both rx and tx offloads.
The incriminated commit comes from 18.02.

I can't reproduce your issue with ixgbe ports.

In 18.11, testpmd starts fine and accepts the configuration change.
In master (before this change), I can see a different issue which has to do
with global offloads vs per queue offloads:

# ./master/app/testpmd -w 0000:03:00.0 -w 0000:03:00.1 -- -i
--disable-crc-strip
EAL: Detected 28 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:03:00.0 on NUMA socket 0
EAL:   probe driver: 8086:154d net_ixgbe
EAL:   using IOMMU type 1 (Type 1)
EAL: Ignore mapping IO port bar(2)
EAL: PCI device 0000:03:00.1 on NUMA socket 0
EAL:   probe driver: 8086:154d net_ixgbe
EAL: Ignore mapping IO port bar(2)
Interactive-mode selected
testpmd: create a new mbuf pool <mbuf_pool_socket_0>: n=155456, size=2176,
socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
Configuring Port 0 (socket 0)
Port 0: B4:96:91:1B:67:10
Configuring Port 1 (socket 0)
Port 1: B4:96:91:1B:67:12
Checking link statuses...
Done
testpmd> port stop all
Stopping ports...
Checking link statuses...
Done
testpmd> port config all crc-strip on
testpmd> port start all
Configuring Port 0 (socket 0)
Ethdev port_id=0 rx_queue_id=0, new added offloads 0x10000 must be within
per-queue offload capabilities 0x1 in rte_eth_rx_queue_setup()
Fail to configure port 0 rx queues

Can you describe your setup, like which driver is used, and the full traces
of testpmd ?

Thanks.


-- 
David Marchand

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

* Re: [dpdk-stable] [PATCH v2] app/testpmd: fix to add offloads confguration for queue
  2019-07-08  9:09       ` David Marchand
@ 2019-07-08  9:16         ` Zhao1, Wei
  2019-07-08  9:22         ` Zhao1, Wei
  1 sibling, 0 replies; 10+ messages in thread
From: Zhao1, Wei @ 2019-07-08  9:16 UTC (permalink / raw)
  To: David Marchand
  Cc: dev, dpdk stable, Iremonger, Bernard, Yigit, Ferruh,
	Andrew Rybchenko, Jerin Jacob Kollanukkaran, Ananyev, Konstantin,
	Olivier Matz, Adrien Mazarguil, Thomas Monjalon

Hi,  Marchand

  That is my list for this issue.
Yes, I have also fix tx related code, but this test case is for rx offloads.



Environment
·         DPDK version:
19.05.0-rc4
·         NIC hardware: i40e, ixgbe
Test Setup

export RTE_TARGET=x86_64-native-linuxapp-gcc
export RTE_SDK=`pwd`
make -j 62 install T=x86_64-native-linuxapp-gcc
modprobe uio
rmmod -f igb_uio
insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
usertools/dpdk-devbind.py --force --bind=igb_uio 0000:03:00.0 0000:03:00.1
On DUT:
./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6 -n 4  -- -i --portmask=0x1 --port-topology=loop --disable-crc-strip
port stop all
port config all crc-strip on
port start all


The output is:
Configuring Port 0 (socket 0)
Ethdev port_id=0 rx_queue_id=0, new added offloads 0x10000 must be within per-queue offload capabilities 0x1 in rte_eth_rx_queue_setup()
Fail to configure port 0 rx queues



The first bad commit id:
5e91aeef218c452c370aacf74265c7a42b67dffa


From: David Marchand [mailto:david.marchand@redhat.com]
Sent: Monday, July 8, 2019 5:09 PM
To: Zhao1, Wei <wei.zhao1@intel.com>
Cc: dev <dev@dpdk.org>; dpdk stable <stable@dpdk.org>; Iremonger, Bernard <bernard.iremonger@intel.com>; Yigit, Ferruh <ferruh.yigit@intel.com>; Andrew Rybchenko <arybchenko@solarflare.com>; Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Ananyev, Konstantin <konstantin.ananyev@intel.com>; Olivier Matz <olivier.matz@6wind.com>; Adrien Mazarguil <adrien.mazarguil@6wind.com>; Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [dpdk-stable] [PATCH v2] app/testpmd: fix to add offloads confguration for queue

Hello Wei,

On Sat, Jul 6, 2019 at 6:26 PM Thomas Monjalon <thomas@monjalon.net<mailto:thomas@monjalon.net>> wrote:
06/07/2019 18:24, Thomas Monjalon:
> 04/07/2019 07:35, Wei Zhao:
> > When adding offloads from commandline, not only port
> > related configuration bits should be set, but also queue
> > related offloads configuration bits, or it will cause error.
> > For example, test in this process for ixgbe:
> > (1)./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6 -n 4
> > -- -i --portmask=0x1 --port-topology=loop --disable-crc-strip
> > (2)port stop all
> > (3)port config all crc-strip on
> > (4)port start all
> > we will see "Fail to configure port 0 rx queues" of warning info.
>
> I'm really surprised it was so much broken.
> I did not check the code. Someone else did?

Adding more Cc for double check.

Did not check the code yet, but the Fixes: line is about RX offloads, and you touched both rx and tx offloads.
The incriminated commit comes from 18.02.

I can't reproduce your issue with ixgbe ports.

In 18.11, testpmd starts fine and accepts the configuration change.
In master (before this change), I can see a different issue which has to do with global offloads vs per queue offloads:

# ./master/app/testpmd -w 0000:03:00.0 -w 0000:03:00.1 -- -i --disable-crc-strip
EAL: Detected 28 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:03:00.0 on NUMA socket 0
EAL:   probe driver: 8086:154d net_ixgbe
EAL:   using IOMMU type 1 (Type 1)
EAL: Ignore mapping IO port bar(2)
EAL: PCI device 0000:03:00.1 on NUMA socket 0
EAL:   probe driver: 8086:154d net_ixgbe
EAL: Ignore mapping IO port bar(2)
Interactive-mode selected
testpmd: create a new mbuf pool <mbuf_pool_socket_0>: n=155456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
Configuring Port 0 (socket 0)
Port 0: B4:96:91:1B:67:10
Configuring Port 1 (socket 0)
Port 1: B4:96:91:1B:67:12
Checking link statuses...
Done
testpmd> port stop all
Stopping ports...
Checking link statuses...
Done
testpmd> port config all crc-strip on
testpmd> port start all
Configuring Port 0 (socket 0)
Ethdev port_id=0 rx_queue_id=0, new added offloads 0x10000 must be within per-queue offload capabilities 0x1 in rte_eth_rx_queue_setup()
Fail to configure port 0 rx queues

Can you describe your setup, like which driver is used, and the full traces of testpmd ?

Thanks.


--
David Marchand

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

* Re: [dpdk-stable] [PATCH v2] app/testpmd: fix to add offloads confguration for queue
  2019-07-08  9:09       ` David Marchand
  2019-07-08  9:16         ` Zhao1, Wei
@ 2019-07-08  9:22         ` Zhao1, Wei
  1 sibling, 0 replies; 10+ messages in thread
From: Zhao1, Wei @ 2019-07-08  9:22 UTC (permalink / raw)
  To: David Marchand
  Cc: dev, dpdk stable, Iremonger, Bernard, Yigit, Ferruh,
	Andrew Rybchenko, Jerin Jacob Kollanukkaran, Ananyev, Konstantin,
	Olivier Matz, Adrien Mazarguil, Thomas Monjalon

Hi,  marchand

From: David Marchand [mailto:david.marchand@redhat.com]
Sent: Monday, July 8, 2019 5:09 PM
To: Zhao1, Wei <wei.zhao1@intel.com>
Cc: dev <dev@dpdk.org>; dpdk stable <stable@dpdk.org>; Iremonger, Bernard <bernard.iremonger@intel.com>; Yigit, Ferruh <ferruh.yigit@intel.com>; Andrew Rybchenko <arybchenko@solarflare.com>; Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Ananyev, Konstantin <konstantin.ananyev@intel.com>; Olivier Matz <olivier.matz@6wind.com>; Adrien Mazarguil <adrien.mazarguil@6wind.com>; Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [dpdk-stable] [PATCH v2] app/testpmd: fix to add offloads confguration for queue

Hello Wei,

On Sat, Jul 6, 2019 at 6:26 PM Thomas Monjalon <thomas@monjalon.net<mailto:thomas@monjalon.net>> wrote:
06/07/2019 18:24, Thomas Monjalon:
> 04/07/2019 07:35, Wei Zhao:
> > When adding offloads from commandline, not only port
> > related configuration bits should be set, but also queue
> > related offloads configuration bits, or it will cause error.
> > For example, test in this process for ixgbe:
> > (1)./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6 -n 4
> > -- -i --portmask=0x1 --port-topology=loop --disable-crc-strip
> > (2)port stop all
> > (3)port config all crc-strip on
> > (4)port start all
> > we will see "Fail to configure port 0 rx queues" of warning info.
>
> I'm really surprised it was so much broken.
> I did not check the code. Someone else did?

Adding more Cc for double check.

Did not check the code yet, but the Fixes: line is about RX offloads, and you touched both rx and tx offloads.
The incriminated commit comes from 18.02.

I can't reproduce your issue with ixgbe ports.

In 18.11, testpmd starts fine and accepts the configuration change.
In master (before this change), I can see a different issue which has to do with global offloads vs per queue offloads:


Yes,  my patch is just for this per queue offloads!

# ./master/app/testpmd -w 0000:03:00.0 -w 0000:03:00.1 -- -i --disable-crc-strip
EAL: Detected 28 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:03:00.0 on NUMA socket 0
EAL:   probe driver: 8086:154d net_ixgbe
EAL:   using IOMMU type 1 (Type 1)
EAL: Ignore mapping IO port bar(2)
EAL: PCI device 0000:03:00.1 on NUMA socket 0
EAL:   probe driver: 8086:154d net_ixgbe
EAL: Ignore mapping IO port bar(2)
Interactive-mode selected
testpmd: create a new mbuf pool <mbuf_pool_socket_0>: n=155456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
Configuring Port 0 (socket 0)
Port 0: B4:96:91:1B:67:10
Configuring Port 1 (socket 0)
Port 1: B4:96:91:1B:67:12
Checking link statuses...
Done
testpmd> port stop all
Stopping ports...
Checking link statuses...
Done
testpmd> port config all crc-strip on
testpmd> port start all
Configuring Port 0 (socket 0)
Ethdev port_id=0 rx_queue_id=0, new added offloads 0x10000 must be within per-queue offload capabilities 0x1 in rte_eth_rx_queue_setup()
Fail to configure port 0 rx queues

“Fail to configure port 0 rx queues”
You are right, this is just the error info, the same to me.



Can you describe your setup, like which driver is used, and the full traces of testpmd ?

Thanks.


--
David Marchand

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

end of thread, other threads:[~2019-07-08  9:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-03  5:24 [dpdk-stable] [PATCH] app/testpmd: fix to add offloads confguration for queue Wei Zhao
2019-07-03 11:46 ` [dpdk-stable] [dpdk-dev] " Iremonger, Bernard
2019-07-04  5:35 ` [dpdk-stable] [PATCH v2] " Wei Zhao
2019-07-04  8:53   ` Iremonger, Bernard
2019-07-04 23:54     ` Ferruh Yigit
2019-07-06 16:24   ` Thomas Monjalon
2019-07-06 16:25     ` Thomas Monjalon
2019-07-08  9:09       ` David Marchand
2019-07-08  9:16         ` Zhao1, Wei
2019-07-08  9:22         ` Zhao1, Wei

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).