DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] fm10k: fix wrong Rx func is used
@ 2015-11-27  1:55 Chen Jing D(Mark)
  2015-11-27  5:38 ` Wang, Xiao W
  2015-11-27 18:50 ` Thomas Monjalon
  0 siblings, 2 replies; 3+ messages in thread
From: Chen Jing D(Mark) @ 2015-11-27  1:55 UTC (permalink / raw)
  To: dev

From: "Chen Jing D(Mark)" <jing.d.chen@intel.com>

Steps to reproduce the bug:
1. All Rx offloading is disabled and start the device, then
   Vector Rx is used.
2. Stop the device. Re-configure to enable hw_ip_checksum = 1,
   start the device again.
3. In this case, assume regular Rx should be used since Vector
   Rx doesn't support ip checksum offload. But actually Vector
   Rx is used and cause checksum won't be done by hardware.

The reason is after re-configuring, driver misses an "else" in
func fm10k_set_rx_function(). Then Rx func in last round are
used.

Fixes:77a8ab47("fm10k: select best Rx function")

Reported-by: Xiao Wang <xiao.w.wang@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
---
 drivers/net/fm10k/fm10k_ethdev.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 4f23ce3..e4aed94 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -2486,6 +2486,8 @@ fm10k_set_rx_function(struct rte_eth_dev *dev)
 			dev->rx_pkt_burst = fm10k_recv_pkts_vec;
 	} else if (dev->data->scattered_rx)
 		dev->rx_pkt_burst = fm10k_recv_scattered_pkts;
+	else
+		dev->rx_pkt_burst = fm10k_recv_pkts;
 
 	rx_using_sse =
 		(dev->rx_pkt_burst == fm10k_recv_scattered_pkts_vec ||
-- 
1.7.7.6

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

* Re: [dpdk-dev] [PATCH] fm10k: fix wrong Rx func is used
  2015-11-27  1:55 [dpdk-dev] [PATCH] fm10k: fix wrong Rx func is used Chen Jing D(Mark)
@ 2015-11-27  5:38 ` Wang, Xiao W
  2015-11-27 18:50 ` Thomas Monjalon
  1 sibling, 0 replies; 3+ messages in thread
From: Wang, Xiao W @ 2015-11-27  5:38 UTC (permalink / raw)
  To: Chen, Jing D, dev

Hi,

> -----Original Message-----
> From: Chen, Jing D
> Sent: Friday, November 27, 2015 9:56 AM
> To: dev@dpdk.org
> Cc: Wang, Xiao W <xiao.w.wang@intel.com>; Chen, Jing D
> <jing.d.chen@intel.com>
> Subject: [PATCH] fm10k: fix wrong Rx func is used
> 
> From: "Chen Jing D(Mark)" <jing.d.chen@intel.com>
> 
> Steps to reproduce the bug:
> 1. All Rx offloading is disabled and start the device, then
>    Vector Rx is used.
> 2. Stop the device. Re-configure to enable hw_ip_checksum = 1,
>    start the device again.
> 3. In this case, assume regular Rx should be used since Vector
>    Rx doesn't support ip checksum offload. But actually Vector
>    Rx is used and cause checksum won't be done by hardware.
> 
> The reason is after re-configuring, driver misses an "else" in func
> fm10k_set_rx_function(). Then Rx func in last round are used.
> 
> Fixes:77a8ab47("fm10k: select best Rx function")
> 
> Reported-by: Xiao Wang <xiao.w.wang@intel.com>
> Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
> ---
>  drivers/net/fm10k/fm10k_ethdev.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/fm10k/fm10k_ethdev.c
> b/drivers/net/fm10k/fm10k_ethdev.c
> index 4f23ce3..e4aed94 100644
> --- a/drivers/net/fm10k/fm10k_ethdev.c
> +++ b/drivers/net/fm10k/fm10k_ethdev.c
> @@ -2486,6 +2486,8 @@ fm10k_set_rx_function(struct rte_eth_dev *dev)
>  			dev->rx_pkt_burst = fm10k_recv_pkts_vec;
>  	} else if (dev->data->scattered_rx)
>  		dev->rx_pkt_burst = fm10k_recv_scattered_pkts;
> +	else
> +		dev->rx_pkt_burst = fm10k_recv_pkts;
> 
>  	rx_using_sse =
>  		(dev->rx_pkt_burst == fm10k_recv_scattered_pkts_vec ||
> --
> 1.7.7.6
Acked-by: Xiao Wang <xiao.w.wang@intel.com>

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

* Re: [dpdk-dev] [PATCH] fm10k: fix wrong Rx func is used
  2015-11-27  1:55 [dpdk-dev] [PATCH] fm10k: fix wrong Rx func is used Chen Jing D(Mark)
  2015-11-27  5:38 ` Wang, Xiao W
@ 2015-11-27 18:50 ` Thomas Monjalon
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2015-11-27 18:50 UTC (permalink / raw)
  To: Chen Jing D(Mark); +Cc: dev

2015-11-27 09:55, Chen Jing D:
> From: "Chen Jing D(Mark)" <jing.d.chen@intel.com>
> 
> Steps to reproduce the bug:
> 1. All Rx offloading is disabled and start the device, then
>    Vector Rx is used.
> 2. Stop the device. Re-configure to enable hw_ip_checksum = 1,
>    start the device again.
> 3. In this case, assume regular Rx should be used since Vector
>    Rx doesn't support ip checksum offload. But actually Vector
>    Rx is used and cause checksum won't be done by hardware.
> 
> The reason is after re-configuring, driver misses an "else" in
> func fm10k_set_rx_function(). Then Rx func in last round are
> used.
> 
> Fixes:77a8ab47("fm10k: select best Rx function")

git log -1 --abbrev=12 --format='Fixes: %h ("%s")' 77a8ab47
Fixes: 77a8ab47eb38 ("fm10k: select best Rx function")

> Reported-by: Xiao Wang <xiao.w.wang@intel.com>
> Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>

Applied, thanks

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

end of thread, other threads:[~2015-11-27 18:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-27  1:55 [dpdk-dev] [PATCH] fm10k: fix wrong Rx func is used Chen Jing D(Mark)
2015-11-27  5:38 ` Wang, Xiao W
2015-11-27 18:50 ` Thomas Monjalon

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