From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by dpdk.org (Postfix) with ESMTP id A30DD4C93 for ; Tue, 14 Aug 2018 13:13:02 +0200 (CEST) Received: from 1.general.paelzer.uk.vpn ([10.172.196.172] helo=lap.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fpXAd-0000wO-95; Tue, 14 Aug 2018 11:07:27 +0000 From: Christian Ehrhardt To: Radu Nicolau Cc: Chas Williams , dpdk stable Date: Tue, 14 Aug 2018 13:06:37 +0200 Message-Id: <20180814110651.25277-34-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180814110651.25277-1-christian.ehrhardt@canonical.com> References: <20180814110651.25277-1-christian.ehrhardt@canonical.com> Subject: [dpdk-stable] patch 'net/bonding: fix race condition' has been queued to stable release 18.05.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, 14 Aug 2018 11:13:02 -0000 Hi, FYI, your patch has been queued to stable release 18.05.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 08/16/18. So please shout if anyone has objections. Thanks. Christian Ehrhardt --- >>From f10ba4166f288571cf8a5dec884bacaee54f4171 Mon Sep 17 00:00:00 2001 From: Radu Nicolau Date: Wed, 25 Jul 2018 10:39:40 +0100 Subject: [PATCH] net/bonding: fix race condition [ upstream commit 5922ff069fb910946f97780754ad4b66b987d5b6 ] Race condition can appear in the bond_mode_8023ad_periodic_cb() callback when bonding port is stopped, reconfigured and restarted. Re-ordered calls in bond_ethdev_start() to have callback alarm set after slave ports are reconfigured. Fixes: 2efb58cbab6e ("bond: new link bonding library") Signed-off-by: Radu Nicolau Acked-by: Chas Williams --- drivers/net/bonding/rte_eth_bond_pmd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index b0f820c0d..bd959c94c 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2057,10 +2057,6 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev) } } - /* Update all slave devices MACs*/ - if (mac_address_slaves_update(eth_dev) != 0) - goto out_err; - /* If bonded device is configure in promiscuous mode then re-apply config */ if (internals->promiscuous_en) bond_ethdev_promiscuous_enable(eth_dev); @@ -2101,6 +2097,10 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev) (void *)&rte_eth_devices[internals->port_id]); } + /* Update all slave devices MACs*/ + if (mac_address_slaves_update(eth_dev) != 0) + goto out_err; + if (internals->user_defined_primary_port) bond_ethdev_primary_set(internals, internals->primary_port); -- 2.17.1