From: Matan Azrad Date: Wed, 24 Jan 2018 10:19:17 +0000 (+0000) Subject: net/failsafe: fix Rx burst infinite loop X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=745b72dab9a33a74f5925f2ce425fd30b21e958a;p=dpdk.git net/failsafe: fix Rx burst infinite loop 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 Acked-by: Gaetan Rivet --- diff --git a/drivers/net/failsafe/failsafe_rxtx.c b/drivers/net/failsafe/failsafe_rxtx.c index 1654494116..aeee076657 100644 --- a/drivers/net/failsafe/failsafe_rxtx.c +++ b/drivers/net/failsafe/failsafe_rxtx.c @@ -104,6 +104,7 @@ failsafe_rx_burst(void *queue, do { if (fs_rx_unsafe(sdev)) { nb_rx = 0; + sdev = sdev->next; continue; } sub_rxq = ETH(sdev)->data->rx_queues[rxq->qid];