[dpdk-dev,1/2] ixgbe: vector rx rearm after queue reset

Message ID 1435256741-25489-2-git-send-email-ehkinzie@gmail.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Eric Kinzie June 25, 2015, 6:25 p.m. UTC
  zero values in ixgbe_reset_rx_queue() used by vector receive so that
rearming the rx queue happens at the right time.  Not doing so can in
some cases result in the software inadvertently setting the card's rx
tail pointer equal to the head pointer, which indicates that there are
no descriptors available.  This causes receive to stop indefinitely
on that queue.

Fixes: 01fa1d6215fa ("ixgbe: unify Rx setup")

Signed-off-by: Eric Kinzie <ehkinzie@gmail.com>
---
 drivers/net/ixgbe/ixgbe_rxtx.c |    4 ++++
 1 file changed, 4 insertions(+)
  

Comments

Thomas Monjalon Aug. 3, 2015, 3:07 p.m. UTC | #1
2015-06-25 11:25, Eric Kinzie:
> zero values in ixgbe_reset_rx_queue() used by vector receive so that
> rearming the rx queue happens at the right time.  Not doing so can in
> some cases result in the software inadvertently setting the card's rx
> tail pointer equal to the head pointer, which indicates that there are
> no descriptors available.  This causes receive to stop indefinitely
> on that queue.
> 
> Fixes: 01fa1d6215fa ("ixgbe: unify Rx setup")
> 
> Signed-off-by: Eric Kinzie <ehkinzie@gmail.com>
[...]
> --- a/drivers/net/ixgbe/ixgbe_rxtx.c
> +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
> @@ -2261,6 +2261,10 @@ ixgbe_reset_rx_queue(struct ixgbe_adapter *adapter, struct ixgbe_rx_queue *rxq)
>  	rxq->nb_rx_hold = 0;
>  	rxq->pkt_first_seg = NULL;
>  	rxq->pkt_last_seg = NULL;
> +#ifdef RTE_IXGBE_INC_VECTOR
> +	rxq->rxrearm_nb = 0;
> +	rxq->rxrearm_start = 0;
> +#endif

A similar patch has been applied:
	http://dpdk.org/browse/dpdk/commit/?id=48e967695ba78
Thanks
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 3ace8a8..1e840b6 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2261,6 +2261,10 @@  ixgbe_reset_rx_queue(struct ixgbe_adapter *adapter, struct ixgbe_rx_queue *rxq)
 	rxq->nb_rx_hold = 0;
 	rxq->pkt_first_seg = NULL;
 	rxq->pkt_last_seg = NULL;
+#ifdef RTE_IXGBE_INC_VECTOR
+	rxq->rxrearm_nb = 0;
+	rxq->rxrearm_start = 0;
+#endif
 }
 
 int