From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-io0-f196.google.com (mail-io0-f196.google.com [209.85.223.196]) by dpdk.org (Postfix) with ESMTP id 8DD53160; Tue, 24 Jul 2018 16:34:29 +0200 (CEST) Received: by mail-io0-f196.google.com with SMTP id r15-v6so3589698ioa.3; Tue, 24 Jul 2018 07:34:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1guwqn5hrBGnzOBP2uKuZmR4fI2wI7RWVSRZu/r2/qE=; b=VJrQMG0gr1ygccurwf2IfncafDtL3Ci8qYRBIPr00tbZsWazA/T/qmAeHh4ZoMiraO jCI85JKBHuOcQgxzI2DPLTQWwJS8bODwo1Z5sWLHI+E/ynUQnWPrgwoivgJ7K4SCpEr6 Cl9TZLlvwUHffyi3E2Vp9ik5RGVHn2IUYYnJSTAh8AdDiuf0EFY2TzZJtluqy1Pz9vpd fsU5KmeVFTDu16Jk8PynCazVfhhmF637gzgxj2eARsIOZ4d0QHr1lQy1adYUlojrzjK/ 3DFKueoDgDAGsmDX7pjjz70dojpGfQsHkP6H9WhqHjDCPULWnR9GdQDS+xOh25XzNeW4 fEjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1guwqn5hrBGnzOBP2uKuZmR4fI2wI7RWVSRZu/r2/qE=; b=h/oaETrxue2gojsYuwAdMBkIGCiI0+szeOk8/d5F9pWcA1S+ORZMxDB5BVh9WOTjb/ giYAFmtUuznh48C9uQ1tP9MKWYfGsCVLQ9DpVOVYTyGvJAgzoRGCimgeLjQ0diMQWj6h KmZl3Rk6GL3crhlOBbsGPJFpADacnFdzrjovaBdnIYP8qo1HlaOrZmhs7l4UYOLnQHAe bQTsRXOZeMR7ccEXFgVsZPrxhH3XjE7mt1i2x8c2gcvXS1enZ4m2BKYLR/aHqcDc+20c 1Lter+EoTL7XTMFkpYkO0Ic2dpECCW4lRkscJYgI/I5DxXLkQAoVk4AUrkkiB8Ws+J4y 8Qrw== X-Gm-Message-State: AOUpUlGDx8q2iCYnh3pLn20HYSnxiAecxfd2dJxk7Ib9cvrO9Csi8Bug nLCTsO31ZumUDeKet6n4b4fGxDui988s7mglZlA= X-Google-Smtp-Source: AAOMgpde4phSI43hoRRJ/9H7O0J+ME4USmgelx3NAJYzyYocNbfAJ6aZeBpzgw9lCz6cLQio9HKPXPaxfoeBj7IbKA8= X-Received: by 2002:a6b:1e52:: with SMTP id e79-v6mr13769812ioe.110.1532442868932; Tue, 24 Jul 2018 07:34:28 -0700 (PDT) MIME-Version: 1.0 References: <1532080957-26940-1-git-send-email-radu.nicolau@intel.com> In-Reply-To: <1532080957-26940-1-git-send-email-radu.nicolau@intel.com> From: Chas Williams <3chas3@gmail.com> Date: Tue, 24 Jul 2018 10:34:17 -0400 Message-ID: To: Radu Nicolau Cc: dev@dpdk.org, Declan Doherty , Chas Williams , stable@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/bonding: set started flag at the end of dev start 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, 24 Jul 2018 14:34:30 -0000 I think this adds another race. In bond_ethdev_slave_link_status_change_monitor(), it checks to see if bonding is started, if not it exits. So you need to have dev_started = 1 set before you enable this callback. On Fri, Jul 20, 2018 at 6:09 AM Radu Nicolau wrote: > 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 > >