From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radu Nicolau Subject: [PATCH] net/bonding: set started flag at the end of dev start Date: Fri, 20 Jul 2018 11:02:37 +0100 Message-ID: <1532080957-26940-1-git-send-email-radu.nicolau@intel.com> Cc: declan.doherty@intel.com, chas3@att.com, Radu Nicolau , stable@dpdk.org To: dev@dpdk.org Return-path: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Race condition can appear in the bond_mode_8023ad_periodic_cb() callback when bonding port is stopped, reconfigured and restarted. Fixes: 2efb58cbab6e ("bond: new link bonding library") Cc: stable@dpdk.org Signed-off-by: Radu Nicolau --- drivers/net/bonding/rte_eth_bond_pmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index fc4d4fd..6f66743 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2087,8 +2087,6 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev) } eth_dev->data->dev_link.link_status = ETH_LINK_DOWN; - eth_dev->data->dev_started = 1; - internals = eth_dev->data->dev_private; if (internals->slave_count == 0) { @@ -2167,6 +2165,7 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev) internals->mode == BONDING_MODE_ALB) bond_tlb_enable(internals); + eth_dev->data->dev_started = 1; return 0; out_err: -- 2.7.5