From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E048CA0543 for ; Tue, 21 Jun 2022 10:06:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DADFA40151; Tue, 21 Jun 2022 10:06:22 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2064.outbound.protection.outlook.com [40.107.236.64]) by mails.dpdk.org (Postfix) with ESMTP id 1A58040151 for ; Tue, 21 Jun 2022 10:06:21 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ENtlmiCyobzxWDy8VNPeNUp41HhCnOcSpoYbctJriER/7MM5JYsE2emjyOzSSoO8GGB/r2+VX365gk5N9b0sZobsSGw2wTH5stHRve4Ddgu9Fv/donMoYptnjONlm5lCFiFEJ2xSV5MJWd0oq3y4Q8zIMUiP/wVFrO8BQGWwdstwqkSQ70smUA5EOGzQs0+Woek8JYutexBhN1MOcTR8c3rg5OM2pSKvZCr4spNskc0qObtdnXcNfED/FOlFIQTCx9hf6f+E2/CVnj1/fku4bZIgZCQPQ3eYPHd+kIEu/s4ItkcV9SxaTdpJVuAdhSIQkG/cPMyy+UtHTztgh0FE+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nrODNJor1gRgUyyQ2CFcIdknAcFNQEFzziOuvlXQ9RI=; b=RNnA8iskdXxdffUqnPdagnvUW5wEzFkD8y3hJHsxr0feBTMR3VAptgmHQ6qVDZ1CjoD0e9YJWUKkj4LcK8OJ/lTcqvquHO03HtPW4tbpoEWkwsnGJ4Ssdp61MxFDjr/slDM+fSMdTqdL/lTj5aGYNoOClrfIO/OnD06303zgleEgbkhkCMLUpY3HYjhRRTGj7lWdsn/sdGdyyuAuLAAVGgQMvv/yI5Tyi476Jlf2BwyEWtCt7DiwDZIorIiJFGJiINjD6Tw4fyLko96THtcDwCM9rgPK8uHU7sp/OQBzOk9RFnG+kr6dtz/VlL/CK1pnDIE0HD7CcdUXMBXFDBR8UQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nrODNJor1gRgUyyQ2CFcIdknAcFNQEFzziOuvlXQ9RI=; b=BGWkbVZheSEkEuqNlB84dveqdIkt7tSgFs6xjE1mye02zmVa/U9rDcqqnTHUcWX7XXhdg71Nlj7RO3dKa382k8MOvBrQbQ7Zc5YVGxB4uGXo2RIrdFhjPfv3IOXhzagxqwvZnmqFHvV/MibrvvJrLGa34ncZ/+DKt6KpvMCgKUb0BYsqTLLD+AyZwTu71exIhmxbyd4eWEqsOsZrgHX8x3wIzUQcskywGN1TmYHrLb6B5Ei4kVT9wpkhVrrhFPNjWkzZlbXrkiDPHbL2466L2dZxjN2/sTbpfli0xCeW42AtsSB8hkZSiLtOS3YJDR3mSpNnsU8k2HJc/8gMtdLAGQ== Received: from CO2PR04CA0144.namprd04.prod.outlook.com (2603:10b6:104::22) by CY4PR12MB1158.namprd12.prod.outlook.com (2603:10b6:903:40::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.18; Tue, 21 Jun 2022 08:06:19 +0000 Received: from CO1NAM11FT021.eop-nam11.prod.protection.outlook.com (2603:10b6:104:0:cafe::cf) by CO2PR04CA0144.outlook.office365.com (2603:10b6:104::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:06:19 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.235) by CO1NAM11FT021.mail.protection.outlook.com (10.13.175.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:06:19 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:06:18 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 21 Jun 2022 01:06:16 -0700 From: Xueming Li To: Huisong Li CC: Min Hu , dpdk stable Subject: patch 'net/bonding: fix stopping non-active slaves' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:01:41 +0300 Message-ID: <20220621080301.2315720-36-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 18e972bd-4091-483f-70a3-08da535cec40 X-MS-TrafficTypeDiagnostic: CY4PR12MB1158:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Eh40qxG1oU4q/7k/B+bWjHLHrWXros4bEMOoEbPq373OlGW/c6ri0OEwVbo+3eHtkbmMoZpTF3g7tkoO21DwvOaAlPnUGD/v0Lkf0higWR8HjEAlM3u3e2PC0P/O/aG4fjwUphV2raLKYKT4qX2ctA8054Uef9/QDCPyjjvii4ocNiifaWFEBIUkn6eztMtl90vmpSSI8qSqKb3/yhEc1qzwt2FAGkMOsr4StbseHpbdyuOMwH2LadKVRTTWdrHW0IEBAUvuKihEt4oR2X6YVdbt6YLJ+EWHp5g6e2eyAYvX/0UNhg/JwmqFE2m7URTTNU2uVKUBKhfGL7naqD7w6Bv0xCIGSSGBMfSsvOEUHOr2zL4PbK2QrgcJDyqSGxLg0Pdc2CtswH6ZBD6A61snNqshmrOHm2Qo+21Hev16kt1Tie3egnK1eIlQMNCihy0a8ga7sf5X+2YlGZ3R2mep5xIO+deekG1DvFB9J2oWxWCfp/pmVV+fwhlPMZjEwpoSAf4ziHQihQXcNlvOzdV6VnSJquL9nVLLfv4ays7drknpoRuY4FI4oE9fiiPA7sSiOjZjCiPwMQLfTgrHkI6xCAYPIiiBpPQ+QYgMmoqIyVlwNiBgOU4RSyMAvs4fugUqJfRe9VGiefIIKH7ILjad9iZNZCTGpRje7Q8zBX7Agxk3oCcPlij8vkTkBdsodukpwcKoaI4b6e12twuwOr+g+8k1syWGkZ41OaU4zmNlJg2oLolrgv0Gk5WWWWgJaHuawB2dT+JT5pCJHyc4RnuNQcQmD+xAEYVyC8PMOikmT62l5pqqtX8Pa6KPRYAVUr2Xk55MJd7oTHb7fvR7R2EAET+LvNuuT4ClxtgMRo/Kqgs= X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(39860400002)(136003)(376002)(346002)(396003)(36840700001)(46966006)(40470700004)(16526019)(336012)(426003)(8936002)(83380400001)(478600001)(47076005)(26005)(40480700001)(86362001)(2906002)(55016003)(1076003)(186003)(2616005)(40460700003)(4326008)(7696005)(6916009)(81166007)(356005)(70586007)(54906003)(316002)(36860700001)(5660300002)(8676002)(53546011)(6666004)(41300700001)(82310400005)(6286002)(36756003)(966005)(70206006)(82740400003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:06:19.0995 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 18e972bd-4091-483f-70a3-08da535cec40 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT021.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1158 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 20.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/23/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/5f9aca077fd48ec3b24327b594ba8411be8b7496 Thanks. Xueming Li --- >From 5f9aca077fd48ec3b24327b594ba8411be8b7496 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Tue, 3 May 2022 18:02:13 +0800 Subject: [PATCH] net/bonding: fix stopping non-active slaves Cc: Xueming Li [ upstream commit f5e72e8e8d57b331baf1a86d15eb7fae921f57fb ] When stopping a bonded port, all slaves should be stopped. But only active slaves are stopped. So fix by stopping all slave ports and later do "deactivate_slave()" for active slaves. Fixes: 0911d4ec0183 ("net/bonding: fix crash when stopping mode 4 port") Signed-off-by: Huisong Li Signed-off-by: Min Hu (Connor) --- drivers/net/bonding/rte_eth_bond_pmd.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 5fc759d3e8..bda69c9e4f 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2100,18 +2100,20 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev) internals->link_status_polling_enabled = 0; for (i = 0; i < internals->slave_count; i++) { uint16_t slave_id = internals->slaves[i].port_id; + + internals->slaves[i].last_link_status = 0; + ret = rte_eth_dev_stop(slave_id); + if (ret != 0) { + RTE_BOND_LOG(ERR, "Failed to stop device on port %u", + slave_id); + return ret; + } + + /* active slaves need to be deactivated. */ if (find_slave_by_id(internals->active_slaves, internals->active_slave_count, slave_id) != - internals->active_slave_count) { - internals->slaves[i].last_link_status = 0; - ret = rte_eth_dev_stop(slave_id); - if (ret != 0) { - RTE_BOND_LOG(ERR, "Failed to stop device on port %u", - slave_id); - return ret; - } + internals->active_slave_count) deactivate_slave(eth_dev, slave_id); - } } return 0; -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:50.909532202 +0800 +++ 0035-net-bonding-fix-stopping-non-active-slaves.patch 2022-06-21 15:37:49.014451169 +0800 @@ -1 +1 @@ -From f5e72e8e8d57b331baf1a86d15eb7fae921f57fb Mon Sep 17 00:00:00 2001 +From 5f9aca077fd48ec3b24327b594ba8411be8b7496 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit f5e72e8e8d57b331baf1a86d15eb7fae921f57fb ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -21 +23 @@ -index 5cbe89031b..605fc2ffb5 100644 +index 5fc759d3e8..bda69c9e4f 100644 @@ -24 +26 @@ -@@ -2118,18 +2118,20 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev) +@@ -2100,18 +2100,20 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)