From: Matan Azrad <matan@mellanox.com>
To: Gaetan Rivet <gaetan.rivet@6wind.com>
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] net/failsafe: fix Rx burst infinite loop
Date: Wed, 24 Jan 2018 10:19:17 +0000 [thread overview]
Message-ID: <1516789157-9234-1-git-send-email-matan@mellanox.com> (raw)
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
next reply other threads:[~2018-01-24 10:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-24 10:19 Matan Azrad [this message]
2018-01-24 10:31 ` Gaëtan Rivet
2018-01-24 17:28 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1516789157-9234-1-git-send-email-matan@mellanox.com \
--to=matan@mellanox.com \
--cc=dev@dpdk.org \
--cc=gaetan.rivet@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).