From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-it0-f65.google.com (mail-it0-f65.google.com [209.85.214.65]) by dpdk.org (Postfix) with ESMTP id 195904C8C; Fri, 27 Jul 2018 12:56:06 +0200 (CEST) Received: by mail-it0-f65.google.com with SMTP id p81-v6so6798646itp.1; Fri, 27 Jul 2018 03:56:06 -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=FlNLHS4pED6sb/qcubuG/EM9Of/HHnTGHV+GVTyU7S8=; b=MwmE1LedOtk4ay//IxC4RMIx1ETuvMA3Juo1+YyRWv0y0bH0efDgz74+flCGGXN1bO 9zPQQR0mElwTk8VbWtal9bKxud25IlyFP03VGm+IX1mmj7JBYa4lJ2tyAAvPKdgZFO5z V831VQqSJG6CBSSk+yGJdjducJvtJwOsrGJZ6VF2rB0ChjyCEX7LNNyf3D5VGXjh0C9G qCzcMZ4TjeEih/eLqFlt/MUgJUNM7ckSPjrgRJRswz3/il3MQ7e0A6JDkTKeKgDiSD1n KbFMBcm8aKC5KTRX4c7y+thDzswYdGwseZMGUjEpFIlI4LMjPE07/KouXbcqVNlBv2bD qnhw== 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=FlNLHS4pED6sb/qcubuG/EM9Of/HHnTGHV+GVTyU7S8=; b=Gg4hh40F7ILz7A15W2o0XgG4HvZtTpp064onYJ2wN1XjbfE7rFJ6B01d6OI1O3s14Q gRxuV1VGuZeCijms1Mh2hbX5DAFVCZHuy4+aTJ7kmjnXSqTtn0aDAUeyXS4mUVtG7Sry vbNw581dfjSYPFtDBYfLfNgijZGrF0napwBu/1OXkg6wr8oi8EMbR5l9cEq62ho2Q34d OUgaBECh2t96t+h/+VrhTvziJqzT7f4kqPdEh7pI6azbRNZ+GSPoZ1tMpoY7pgUAoKx8 LfH93K7eCKY4GwXuqM6TVGvgXV/mzAcghcG5T0LCKzhE7yiRb271QAms40FiSs7UGmjQ Awzw== X-Gm-Message-State: AOUpUlGUxLwNffk6kBOWs2no/+YHXoXriLASM6hX4M18WQy75tC6c1vP DLoagbrPQEp900mYEVCm1wBPFuIAqjXPm2otPxM= X-Google-Smtp-Source: AAOMgpctYHC6D6Me2FQjUxbsYQJcpz+fwECzKQT3q1GghkhExA0+Si/ifZPNiZlOT2qyx+Y/DrVwcwC7zdq01inFwu8= X-Received: by 2002:a24:c8d4:: with SMTP id w203-v6mr5008136itf.84.1532688965438; Fri, 27 Jul 2018 03:56:05 -0700 (PDT) MIME-Version: 1.0 References: <1532080957-26940-1-git-send-email-radu.nicolau@intel.com> <1532511580-2631-1-git-send-email-radu.nicolau@intel.com> In-Reply-To: <1532511580-2631-1-git-send-email-radu.nicolau@intel.com> From: Chas Williams <3chas3@gmail.com> Date: Fri, 27 Jul 2018 06:55:54 -0400 Message-ID: To: Radu Nicolau Cc: dev@dpdk.org, Declan Doherty , Chas Williams , Ferruh Yigit , stable@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2] net/bonding: fix race condition X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jul 2018 10:56:06 -0000 On Wed, Jul 25, 2018 at 5:46 AM Radu Nicolau wrote: > 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") > Cc: stable@dpdk.org > > Signed-off-by: Radu Nicolau > Acked-by: Chas Williams > --- > v2: reworked patch > > 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 fc4d4fd..70ec728 100644 > --- a/drivers/net/bonding/rte_eth_bond_pmd.c > +++ b/drivers/net/bonding/rte_eth_bond_pmd.c > @@ -2113,10 +2113,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); > @@ -2157,6 +2153,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.7.5 > >