DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/failsafe: fix Rx burst infinite loop
@ 2018-01-24 10:19 Matan Azrad
  2018-01-24 10:31 ` Gaëtan Rivet
  0 siblings, 1 reply; 3+ messages in thread
From: Matan Azrad @ 2018-01-24 10:19 UTC (permalink / raw)
  To: Gaetan Rivet; +Cc: dev

In case of plugged out device, the fail-safe PMD uses failsafe_rx_burst
function for packet receiving.

This function iterates over the present sub-devices until it
receives a traffic from one of them or they are all cannot receive
packets.

The corrupted code didn't advance the sub-device pointer when the
sub-device was not present and caused to infinite loop.

Advance the sub-device pointer also in plugged-out sub-device case.

Fixes: 8052bbd9d548 ("net/failsafe: improve Rx sub-devices iteration")

Signed-off-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/failsafe/failsafe_rxtx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/failsafe/failsafe_rxtx.c b/drivers/net/failsafe/failsafe_rxtx.c
index 1654494..aeee076 100644
--- a/drivers/net/failsafe/failsafe_rxtx.c
+++ b/drivers/net/failsafe/failsafe_rxtx.c
@@ -104,6 +104,7 @@
 	do {
 		if (fs_rx_unsafe(sdev)) {
 			nb_rx = 0;
+			sdev = sdev->next;
 			continue;
 		}
 		sub_rxq = ETH(sdev)->data->rx_queues[rxq->qid];
-- 
1.8.3.1

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

end of thread, other threads:[~2018-01-24 17:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-24 10:19 [dpdk-dev] [PATCH] net/failsafe: fix Rx burst infinite loop Matan Azrad
2018-01-24 10:31 ` Gaëtan Rivet
2018-01-24 17:28   ` Ferruh Yigit

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