From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet Subject: Re: [PATCH] net/failsafe: fix Rx burst infinite loop Date: Wed, 24 Jan 2018 11:31:38 +0100 Message-ID: <20180124103138.5npqmzijmlqkf3ue@bidouze.vm.6wind.com> References: <1516789157-9234-1-git-send-email-matan@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: dev@dpdk.org To: Matan Azrad Return-path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id 902A41200A for ; Wed, 24 Jan 2018 11:31:52 +0100 (CET) Received: by mail-wm0-f67.google.com with SMTP id r78so7600335wme.0 for ; Wed, 24 Jan 2018 02:31:52 -0800 (PST) Content-Disposition: inline In-Reply-To: <1516789157-9234-1-git-send-email-matan@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Jan 24, 2018 at 10:19:17AM +0000, Matan Azrad wrote: > 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 > --- > 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 > -- Gaëtan Rivet 6WIND