From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=xTJSxu5JNdN2KDap2De3E44dIgsqbPRE+UtpuESIRGU=; b=HbjyGO/lMYLnXnaLLxcx1qk1Qkbx3f3Y7x6BKLLTKSj+lR6eUJGtIJdR6AYX+Z19Q2 pXExEwqiHGtToxJObzF52vxbVZaEJNoRHosjTVjzJrklm4NKNjVfB8ORdCq6A1/etJRC f1pa+I8j7//UflT7jxTrL2j1YFnS4kVtNgOrCQFAOk9mddOpmrQVXO6JYAy878zb9Tmw ju6t0rxxv7JuGUEDOhXVDnCQBtbuZgBFCSaKkgKVY140Jim4SDONhAVWTgR0RYRWlC/q DnVd58gEETO3JQ3Y3LobyS4oOI3U9ZyrtfDgoClHKZRPKuQ8IQ1mkkM8mXTfuSRZBHyl RgeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=xTJSxu5JNdN2KDap2De3E44dIgsqbPRE+UtpuESIRGU=; b=Y3S9RGDERL4PfeuzO0mtLICoUTyRWT7rQxYxU/rsc4acal4HEHORZfBkzg3OEPG1d/ 9hpay3ksHY1FVUyzzRg3YmXsZDfYFdYYwWU2J7O5QaIMLuQooYILVb9DkIxvV8mjCjJ9 Gp9IrPeB8fNSqN/lUez0lUkjIQdVAt5CwerdNn1GOS0WMj1jnRBJ+cDcRhsRRFCKab8y nEO3nOKwHxAo56iyC8rkO3VrsPy4BpDoMb/AlC9iOdjAMmzKgXKvUnVVmVQp9p9Aw10r iQej0SEQ1SMqujH3XaiO+XFIH/xaRfzxvm/RUAZYj5AZdfVOgKRjgX9pLy7X4+Sc3X5k e8CQ== X-Gm-Message-State: AKwxytfyxrHZj9/l8+gg13NVbfb1g197syWJl3JGDnZnVEGX+UtlGpt3 frOcBGqEePYm6gRn2DQRB3Rmlw== X-Google-Smtp-Source: AH8x227KJxA5z7GqYXkLyH6lVVb1Oyk96w8MfTEqfRP6KQcOhtpuu0dtEzE/NIdL/cHdhKKSzztoww== X-Received: by 10.80.214.215 with SMTP id l23mr24184156edj.44.1516789911797; Wed, 24 Jan 2018 02:31:51 -0800 (PST) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id j1sm14236eda.9.2018.01.24.02.31.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Jan 2018 02:31:51 -0800 (PST) Date: Wed, 24 Jan 2018 11:31:38 +0100 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Matan Azrad Cc: dev@dpdk.org 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1516789157-9234-1-git-send-email-matan@mellanox.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH] net/failsafe: fix Rx burst infinite loop X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2018 10:31:52 -0000 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