All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chas Williams <3chas3@gmail.com>
To: Radu Nicolau <radu.nicolau@intel.com>
Cc: dev@dpdk.org, Declan Doherty <declan.doherty@intel.com>,
	Chas Williams <chas3@att.com>,
	stable@dpdk.org
Subject: Re: [PATCH] net/bonding: set started flag at the end of dev start
Date: Tue, 24 Jul 2018 10:34:17 -0400	[thread overview]
Message-ID: <CAG2-GkkzLNRdWpKs5cw_+G1ux4vB3Qj-2CkDV-WVeZA2CEvWsw@mail.gmail.com> (raw)
In-Reply-To: <1532080957-26940-1-git-send-email-radu.nicolau@intel.com>

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 <radu.nicolau@intel.com> 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 <radu.nicolau@intel.com>
> ---
>  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
>
>

  reply	other threads:[~2018-07-24 14:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-20 10:02 [PATCH] net/bonding: set started flag at the end of dev start Radu Nicolau
2018-07-24 14:34 ` Chas Williams [this message]
2018-07-25  8:53   ` Radu Nicolau
2018-07-25  9:39 ` [PATCH v2] net/bonding: fix race condition Radu Nicolau
2018-07-27 10:55   ` Chas Williams
2018-08-05  0:09     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAG2-GkkzLNRdWpKs5cw_+G1ux4vB3Qj-2CkDV-WVeZA2CEvWsw@mail.gmail.com \
    --to=3chas3@gmail.com \
    --cc=chas3@att.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=radu.nicolau@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.