DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] igb: fix i350 VF RX issue
@ 2016-04-01  2:08 Wenzhuo Lu
  2016-04-01 12:28 ` Ananyev, Konstantin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Wenzhuo Lu @ 2016-04-01  2:08 UTC (permalink / raw)
  To: dev; +Cc: konstantin.ananyev

A problem is found on i350 VF. We found TX will happen once
per 4 packets. If only 1~3 packets are received, they will
not be forwarded. But the real problem is on RX side. The
reason is the default RX write-back threshold is changed to
4, so every first 3 packets may be hung there.

This patch checks the RX wthresh when setting up the RX
queue, and forces it to be 1, so every packet can be handled
immediately.

Fixes: 4a41c17dba18 (igb: set default thresholds based on MAC type)
---
 drivers/net/e1000/igb_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 529dba4..4a987e3 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -1466,7 +1466,8 @@ eth_igb_rx_queue_setup(struct rte_eth_dev *dev,
 	rxq->pthresh = rx_conf->rx_thresh.pthresh;
 	rxq->hthresh = rx_conf->rx_thresh.hthresh;
 	rxq->wthresh = rx_conf->rx_thresh.wthresh;
-	if (rxq->wthresh > 0 && hw->mac.type == e1000_82576)
+	if (rxq->wthresh > 0 &&
+	    (hw->mac.type == e1000_82576 || hw->mac.type == e1000_vfadapt_i350))
 		rxq->wthresh = 1;
 	rxq->drop_en = rx_conf->rx_drop_en;
 	rxq->rx_free_thresh = rx_conf->rx_free_thresh;
-- 
1.9.3

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

* Re: [dpdk-dev] [PATCH] igb: fix i350 VF RX issue
  2016-04-01  2:08 [dpdk-dev] [PATCH] igb: fix i350 VF RX issue Wenzhuo Lu
@ 2016-04-01 12:28 ` Ananyev, Konstantin
  2016-04-01 13:43 ` Thomas Monjalon
  2016-04-05  1:10 ` [dpdk-dev] [PATCH v2] " Wenzhuo Lu
  2 siblings, 0 replies; 6+ messages in thread
From: Ananyev, Konstantin @ 2016-04-01 12:28 UTC (permalink / raw)
  To: Lu, Wenzhuo, dev



> -----Original Message-----
> From: Lu, Wenzhuo
> Sent: Friday, April 01, 2016 3:09 AM
> To: dev@dpdk.org
> Cc: Ananyev, Konstantin
> Subject: [PATCH] igb: fix i350 VF RX issue
> 
> A problem is found on i350 VF. We found TX will happen once
> per 4 packets. If only 1~3 packets are received, they will
> not be forwarded. But the real problem is on RX side. The
> reason is the default RX write-back threshold is changed to
> 4, so every first 3 packets may be hung there.
> 
> This patch checks the RX wthresh when setting up the RX
> queue, and forces it to be 1, so every packet can be handled
> immediately.
> 
> Fixes: 4a41c17dba18 (igb: set default thresholds based on MAC type)
> ---
>  drivers/net/e1000/igb_rxtx.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
> index 529dba4..4a987e3 100644
> --- a/drivers/net/e1000/igb_rxtx.c
> +++ b/drivers/net/e1000/igb_rxtx.c
> @@ -1466,7 +1466,8 @@ eth_igb_rx_queue_setup(struct rte_eth_dev *dev,
>  	rxq->pthresh = rx_conf->rx_thresh.pthresh;
>  	rxq->hthresh = rx_conf->rx_thresh.hthresh;
>  	rxq->wthresh = rx_conf->rx_thresh.wthresh;
> -	if (rxq->wthresh > 0 && hw->mac.type == e1000_82576)
> +	if (rxq->wthresh > 0 &&
> +	    (hw->mac.type == e1000_82576 || hw->mac.type == e1000_vfadapt_i350))
>  		rxq->wthresh = 1;
>  	rxq->drop_en = rx_conf->rx_drop_en;
>  	rxq->rx_free_thresh = rx_conf->rx_free_thresh;
> --

 Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 1.9.3

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

* Re: [dpdk-dev] [PATCH] igb: fix i350 VF RX issue
  2016-04-01  2:08 [dpdk-dev] [PATCH] igb: fix i350 VF RX issue Wenzhuo Lu
  2016-04-01 12:28 ` Ananyev, Konstantin
@ 2016-04-01 13:43 ` Thomas Monjalon
  2016-04-05  0:49   ` Lu, Wenzhuo
  2016-04-05  1:10 ` [dpdk-dev] [PATCH v2] " Wenzhuo Lu
  2 siblings, 1 reply; 6+ messages in thread
From: Thomas Monjalon @ 2016-04-01 13:43 UTC (permalink / raw)
  To: Wenzhuo Lu; +Cc: dev, konstantin.ananyev

2016-04-01 10:08, Wenzhuo Lu:
> A problem is found on i350 VF. We found TX will happen once
> per 4 packets. If only 1~3 packets are received, they will
> not be forwarded. But the real problem is on RX side. The
> reason is the default RX write-back threshold is changed to
> 4, so every first 3 packets may be hung there.
> 
> This patch checks the RX wthresh when setting up the RX
> queue, and forces it to be 1, so every packet can be handled
> immediately.
> 
> Fixes: 4a41c17dba18 (igb: set default thresholds based on MAC type)
> ---
>  drivers/net/e1000/igb_rxtx.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Missing Signed-off-by

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

* Re: [dpdk-dev] [PATCH] igb: fix i350 VF RX issue
  2016-04-01 13:43 ` Thomas Monjalon
@ 2016-04-05  0:49   ` Lu, Wenzhuo
  0 siblings, 0 replies; 6+ messages in thread
From: Lu, Wenzhuo @ 2016-04-05  0:49 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Ananyev, Konstantin

Hi Thomas,

> 
> Missing Signed-off-by
Sorry for this mistake, will correct it with a V2.

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

* [dpdk-dev] [PATCH v2] igb: fix i350 VF RX issue
  2016-04-01  2:08 [dpdk-dev] [PATCH] igb: fix i350 VF RX issue Wenzhuo Lu
  2016-04-01 12:28 ` Ananyev, Konstantin
  2016-04-01 13:43 ` Thomas Monjalon
@ 2016-04-05  1:10 ` Wenzhuo Lu
  2016-04-06 10:33   ` Thomas Monjalon
  2 siblings, 1 reply; 6+ messages in thread
From: Wenzhuo Lu @ 2016-04-05  1:10 UTC (permalink / raw)
  To: dev; +Cc: Wenzhuo Lu

A problem is found on i350 VF. We found TX will happen once
per 4 packets. If only 1~3 packets are received, they will
not be forwarded. But the real problem is on RX side. The
reason is the default RX write-back threshold is changed to
4, so every first 3 packets may be hung there.

This patch checks the RX wthresh when setting up the RX
queue, and forces it to be 1, so every packet can be handled
immediately.

v2:
- Add missed signoff.

Fixes: 4a41c17dba18 (igb: set default thresholds based on MAC type)
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 drivers/net/e1000/igb_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 529dba4..4a987e3 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -1466,7 +1466,8 @@ eth_igb_rx_queue_setup(struct rte_eth_dev *dev,
 	rxq->pthresh = rx_conf->rx_thresh.pthresh;
 	rxq->hthresh = rx_conf->rx_thresh.hthresh;
 	rxq->wthresh = rx_conf->rx_thresh.wthresh;
-	if (rxq->wthresh > 0 && hw->mac.type == e1000_82576)
+	if (rxq->wthresh > 0 &&
+	    (hw->mac.type == e1000_82576 || hw->mac.type == e1000_vfadapt_i350))
 		rxq->wthresh = 1;
 	rxq->drop_en = rx_conf->rx_drop_en;
 	rxq->rx_free_thresh = rx_conf->rx_free_thresh;
-- 
1.9.3

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

* Re: [dpdk-dev] [PATCH v2] igb: fix i350 VF RX issue
  2016-04-05  1:10 ` [dpdk-dev] [PATCH v2] " Wenzhuo Lu
@ 2016-04-06 10:33   ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2016-04-06 10:33 UTC (permalink / raw)
  To: Wenzhuo Lu; +Cc: dev

> A problem is found on i350 VF. We found TX will happen once
> per 4 packets. If only 1~3 packets are received, they will
> not be forwarded. But the real problem is on RX side. The
> reason is the default RX write-back threshold is changed to
> 4, so every first 3 packets may be hung there.
> 
> This patch checks the RX wthresh when setting up the RX
> queue, and forces it to be 1, so every packet can be handled
> immediately.
> 
> v2:
> - Add missed signoff.
> 
> Fixes: 4a41c17dba18 (igb: set default thresholds based on MAC type)
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

Applied, thanks

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

end of thread, other threads:[~2016-04-06 10:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-01  2:08 [dpdk-dev] [PATCH] igb: fix i350 VF RX issue Wenzhuo Lu
2016-04-01 12:28 ` Ananyev, Konstantin
2016-04-01 13:43 ` Thomas Monjalon
2016-04-05  0:49   ` Lu, Wenzhuo
2016-04-05  1:10 ` [dpdk-dev] [PATCH v2] " Wenzhuo Lu
2016-04-06 10:33   ` 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).