From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 1D70F237 for ; Tue, 21 Nov 2017 14:20:09 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id C5C1920AEB; Tue, 21 Nov 2017 08:20:08 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 21 Nov 2017 08:20:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=amiFurnobqoSRnxi6 bOC0dIX+cZ1ZZQuVQ8KiEF+ZGI=; b=bUVpLI/Ig2w/JA8xUxWwkZOGNEGD2jd6M iwJOLtvVcpzVO2u/mWl9yvsH11sIUJRvDMFgo7Tmg0uZt/DSJFq5jqM2ubQFzAAv X9e0iS9O8jCqaa8qKaBKnZF7v8tWrk4YmpDoJYKPx04QcNBLZTY8v847eBvbvKLh 7ABxyHSv68N0/n8a4KAJyR7ZO/ecZKFd43g9mzuduJzS3ZKbh8eyU1nZGD9AITwE jEi0zx99f1E1szd36aJzeuJV2sEWGt0EcM4cFu4OfQ8p9pITSpIXraebBt443OJM ix8WNd18oNDYNoXHCc6xBFtKQRwq7exalSmm8RmIrgs2Gy98GjoWw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=amiFurnobqoSRnxi6bOC0dIX+cZ1ZZQuVQ8KiEF+ZGI=; b=g/6GVI+Y tPrxVY8v2lpNW4XZkiQNVfmVfM4MqmjxxDaq4ffHCr9aHdmpzY6Ko4/mT+iXYWim tlKkwrlLXzRPa4TKoHE3ioBS3JqJUS8zyf4Z4q6muAQvgi2Cy6n5FDQpvS5npbBj mQgbwScwCsoJ3nUt0o53N9mh6MnapXc7qSVyd39k0cIwL8JwuZd7c8ukM2UeTZ3A nwWXo0KMJ8Z2+S1/YLoCbANQ+J2/NiirnvvVRTEFtTjEovhdyvDv6vnt/goRz3u0 VDbF29VInuHJtp9WEKMRkqQub7pWyH7dt59WRqNeRG+BRXhXoCQ1NroRwcHzcuzy 5mVOpeyGWKBShg== X-ME-Sender: Received: from localhost.localdomain (unknown [180.158.62.0]) by mail.messagingengine.com (Postfix) with ESMTPA id 4F659243B9; Tue, 21 Nov 2017 08:20:03 -0500 (EST) From: Yuanhan Liu To: Matan Azrad Cc: Gaetan Rivet , dpdk stable Date: Tue, 21 Nov 2017 21:15:55 +0800 Message-Id: <1511270333-31002-13-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> References: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/failsafe: fix Tx sub device deactivating' has been queued to stable release 17.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Nov 2017 13:20:09 -0000 Hi, FYI, your patch has been queued to stable release 17.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/17. So please shout if anyone has objections. Thanks. --yliu --- >>From ea6118d474a03fa6bd66a502258b7d43020d6a7b Mon Sep 17 00:00:00 2001 From: Matan Azrad Date: Wed, 16 Aug 2017 17:19:28 +0300 Subject: [PATCH] net/failsafe: fix Tx sub device deactivating [ upstream commit d8d89966c9595e3db1c7312fe94f3c8235b4ccfe ] The corrupted code couldn't recognize that all sub devices were not ready for Tx traffic when failsafe PMD was trying to switch device because of an unreachable condition using. Hence, the current Tx sub device variable was not updated correctly. The fix removed the unreachable branch and added new one in the right place respecting the original intent. Fixes: ebea83f899d8 ("net/failsafe: add plug-in support") Fixes: 598fb8aec6f6 ("net/failsafe: support device removal") Signed-off-by: Matan Azrad Acked-by: Gaetan Rivet --- drivers/net/failsafe/failsafe_private.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h index 0361cf4..ef646db 100644 --- a/drivers/net/failsafe/failsafe_private.h +++ b/drivers/net/failsafe/failsafe_private.h @@ -334,7 +334,7 @@ fs_switch_dev(struct rte_eth_dev *dev, } else if ((txd && txd->state < req_state) || txd == NULL || txd == banned) { - struct sub_device *sdev; + struct sub_device *sdev = NULL; uint8_t i; /* Using acceptable device */ @@ -346,9 +346,10 @@ fs_switch_dev(struct rte_eth_dev *dev, PRIV(dev)->subs_tx = i; break; } - } else if (txd && txd->state < req_state) { - DEBUG("No device ready, deactivating tx_dev"); - PRIV(dev)->subs_tx = PRIV(dev)->subs_tail; + if (i >= PRIV(dev)->subs_tail || sdev == NULL) { + DEBUG("No device ready, deactivating tx_dev"); + PRIV(dev)->subs_tx = PRIV(dev)->subs_tail; + } } else { return; } -- 2.7.4