DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/bonding: stop and deactivate slaves when bonding port is stopped
@ 2018-08-01 13:18 Radu Nicolau
  2018-08-01 13:44 ` Chas Williams
  2018-08-02 13:38 ` Doherty, Declan
  0 siblings, 2 replies; 13+ messages in thread
From: Radu Nicolau @ 2018-08-01 13:18 UTC (permalink / raw)
  To: dev; +Cc: declan.doherty, chas3, Radu Nicolau, stable

When a bonding port is stopped also stop and deactivate all slaves.
Otherwise slaves will be still listed as active.

Fixes: 69bce062132b ("net/bonding: do not clear active slave count")
Cc: stable@dpdk.org

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 16105cb..960140c 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2229,12 +2229,15 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)
 			tlb_last_obytets[internals->active_slaves[i]] = 0;
 	}
 
-	internals->link_status_polling_enabled = 0;
-	for (i = 0; i < internals->slave_count; i++)
-		internals->slaves[i].last_link_status = 0;
-
 	eth_dev->data->dev_link.link_status = ETH_LINK_DOWN;
 	eth_dev->data->dev_started = 0;
+
+	internals->link_status_polling_enabled = 0;
+	for (i = 0; i < internals->slave_count; i++) {
+		internals->slaves[i].last_link_status = 0;
+		rte_eth_dev_stop(internals->slaves[i].port_id);
+		deactivate_slave(eth_dev, internals->slaves[i].port_id);
+	}
 }
 
 void
-- 
2.7.5

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH] net/bonding: stop and deactivate slaves when bonding port is stopped
  2018-08-01 13:18 [dpdk-dev] [PATCH] net/bonding: stop and deactivate slaves when bonding port is stopped Radu Nicolau
@ 2018-08-01 13:44 ` Chas Williams
  2018-08-01 14:02   ` Radu Nicolau
  2018-08-02 13:38 ` Doherty, Declan
  1 sibling, 1 reply; 13+ messages in thread
From: Chas Williams @ 2018-08-01 13:44 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: dev, Declan Doherty, Chas Williams, stable

On Wed, Aug 1, 2018 at 9:25 AM Radu Nicolau <radu.nicolau@intel.com> wrote:

> When a bonding port is stopped also stop and deactivate all slaves.
> Otherwise slaves will be still listed as active.
>

I have to think about this for a bit.  The last time I tried this I had a
problem
because nothing activated the slaves again in 802.3ad mode because we
use an external state machine.


>
> Fixes: 69bce062132b ("net/bonding: do not clear active slave count")
> Cc: stable@dpdk.org
>
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> ---
>  drivers/net/bonding/rte_eth_bond_pmd.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c
> b/drivers/net/bonding/rte_eth_bond_pmd.c
> index 16105cb..960140c 100644
> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
> @@ -2229,12 +2229,15 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)
>                         tlb_last_obytets[internals->active_slaves[i]] = 0;
>         }
>
> -       internals->link_status_polling_enabled = 0;
> -       for (i = 0; i < internals->slave_count; i++)
> -               internals->slaves[i].last_link_status = 0;
> -
>         eth_dev->data->dev_link.link_status = ETH_LINK_DOWN;
>         eth_dev->data->dev_started = 0;
> +
> +       internals->link_status_polling_enabled = 0;
> +       for (i = 0; i < internals->slave_count; i++) {
> +               internals->slaves[i].last_link_status = 0;
> +               rte_eth_dev_stop(internals->slaves[i].port_id);
> +               deactivate_slave(eth_dev, internals->slaves[i].port_id);
> +       }
>  }
>
>  void
> --
> 2.7.5
>
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH] net/bonding: stop and deactivate slaves when bonding port is stopped
  2018-08-01 13:44 ` Chas Williams
@ 2018-08-01 14:02   ` Radu Nicolau
  0 siblings, 0 replies; 13+ messages in thread
From: Radu Nicolau @ 2018-08-01 14:02 UTC (permalink / raw)
  To: Chas Williams; +Cc: dev, Declan Doherty, Chas Williams, stable



On 8/1/2018 2:44 PM, Chas Williams wrote:
>
>
> On Wed, Aug 1, 2018 at 9:25 AM Radu Nicolau <radu.nicolau@intel.com 
> <mailto:radu.nicolau@intel.com>> wrote:
>
>     When a bonding port is stopped also stop and deactivate all slaves.
>     Otherwise slaves will be still listed as active.
>
>
> I have to think about this for a bit.  The last time I tried this I 
> had a problem
> because nothing activated the slaves again in 802.3ad mode because we
> use an external state machine.
I did test it for mode 4, stop and start seems to be working as 
expected. From what is see, activate_slave will be either called 
directly or indirectly through the LSC when port is restarted.

>
>     Fixes: 69bce062132b ("net/bonding: do not clear active slave count")
>     Cc: stable@dpdk.org <mailto:stable@dpdk.org>
>
>     Signed-off-by: Radu Nicolau <radu.nicolau@intel.com
>     <mailto:radu.nicolau@intel.com>>
>     ---
>      drivers/net/bonding/rte_eth_bond_pmd.c | 11 +++++++----
>      1 file changed, 7 insertions(+), 4 deletions(-)
>
>     diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c
>     b/drivers/net/bonding/rte_eth_bond_pmd.c
>     index 16105cb..960140c 100644
>     --- a/drivers/net/bonding/rte_eth_bond_pmd.c
>     +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
>     @@ -2229,12 +2229,15 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)
>     tlb_last_obytets[internals->active_slaves[i]] = 0;
>             }
>
>     -       internals->link_status_polling_enabled = 0;
>     -       for (i = 0; i < internals->slave_count; i++)
>     -               internals->slaves[i].last_link_status = 0;
>     -
>             eth_dev->data->dev_link.link_status = ETH_LINK_DOWN;
>             eth_dev->data->dev_started = 0;
>     +
>     +       internals->link_status_polling_enabled = 0;
>     +       for (i = 0; i < internals->slave_count; i++) {
>     +               internals->slaves[i].last_link_status = 0;
>     +  rte_eth_dev_stop(internals->slaves[i].port_id);
>     +               deactivate_slave(eth_dev,
>     internals->slaves[i].port_id);
>     +       }
>      }
>
>      void
>     -- 
>     2.7.5
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH] net/bonding: stop and deactivate slaves when bonding port is stopped
  2018-08-01 13:18 [dpdk-dev] [PATCH] net/bonding: stop and deactivate slaves when bonding port is stopped Radu Nicolau
  2018-08-01 13:44 ` Chas Williams
@ 2018-08-02 13:38 ` Doherty, Declan
  2018-08-05 21:55   ` Thomas Monjalon
  1 sibling, 1 reply; 13+ messages in thread
From: Doherty, Declan @ 2018-08-02 13:38 UTC (permalink / raw)
  To: Radu Nicolau, dev; +Cc: chas3, stable

On 01/08/2018 2:18 PM, Radu Nicolau wrote:
> When a bonding port is stopped also stop and deactivate all slaves.
> Otherwise slaves will be still listed as active.
> 
> Fixes: 69bce062132b ("net/bonding: do not clear active slave count")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> ---
>   drivers/net/bonding/rte_eth_bond_pmd.c | 11 +++++++----
>   1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
> index 16105cb..960140c 100644
> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
> @@ -2229,12 +2229,15 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)
>   			tlb_last_obytets[internals->active_slaves[i]] = 0;
>   	}
>   
> -	internals->link_status_polling_enabled = 0;
> -	for (i = 0; i < internals->slave_count; i++)
> -		internals->slaves[i].last_link_status = 0;
> -
>   	eth_dev->data->dev_link.link_status = ETH_LINK_DOWN;
>   	eth_dev->data->dev_started = 0;
> +
> +	internals->link_status_polling_enabled = 0;
> +	for (i = 0; i < internals->slave_count; i++) {
> +		internals->slaves[i].last_link_status = 0;
> +		rte_eth_dev_stop(internals->slaves[i].port_id);
> +		deactivate_slave(eth_dev, internals->slaves[i].port_id);
> +	}
>   }
>   
>   void
> 


Acked-by: Declan Doherty <declan.doherty@intel.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH] net/bonding: stop and deactivate slaves when bonding port is stopped
  2018-08-02 13:38 ` Doherty, Declan
@ 2018-08-05 21:55   ` Thomas Monjalon
  2018-08-06 15:50     ` Chas Williams
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Monjalon @ 2018-08-05 21:55 UTC (permalink / raw)
  To: chas3; +Cc: dev, Doherty, Declan, Radu Nicolau, stable

02/08/2018 15:38, Doherty, Declan:
> On 01/08/2018 2:18 PM, Radu Nicolau wrote:
> > When a bonding port is stopped also stop and deactivate all slaves.
> > Otherwise slaves will be still listed as active.
> > 
> > Fixes: 69bce062132b ("net/bonding: do not clear active slave count")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> 
> Acked-by: Declan Doherty <declan.doherty@intel.com>

Waiting for opinion from the other bonding maintainer (Chas)
who started to review and has some doubts.

Chas, please do you agree with Declan's ack?

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH] net/bonding: stop and deactivate slaves when bonding port is stopped
  2018-08-05 21:55   ` Thomas Monjalon
@ 2018-08-06 15:50     ` Chas Williams
  2018-08-23 13:15       ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
  2018-09-28 11:04       ` Ferruh Yigit
  0 siblings, 2 replies; 13+ messages in thread
From: Chas Williams @ 2018-08-06 15:50 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Chas Williams, dev, Declan Doherty, Radu Nicolau, stable

On Sun, Aug 5, 2018 at 5:55 PM Thomas Monjalon <thomas@monjalon.net> wrote:

> 02/08/2018 15:38, Doherty, Declan:
> > On 01/08/2018 2:18 PM, Radu Nicolau wrote:
> > > When a bonding port is stopped also stop and deactivate all slaves.
> > > Otherwise slaves will be still listed as active.
> > >
> > > Fixes: 69bce062132b ("net/bonding: do not clear active slave count")
> > > Cc: stable@dpdk.org
> > >
> > > Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> >
> > Acked-by: Declan Doherty <declan.doherty@intel.com>
>
> Waiting for opinion from the other bonding maintainer (Chas)
> who started to review and has some doubts.
>

The slaves being listed as active is not a bug.  If the slaves are not
deactivated, then they should be considered activated.  Previously,
stopping the bonding PMD just reset the active slave count.  That's
not the right way to deactivate slaves.  This was fixed by 69bce062132b.

This patch is new behavior of explicitly deactivating the slaves when
the bonding PMD is stopped.

As I mentioned, I think this makes life difficult for those of us using
an external state machine.  However, that should probably be fixed
differently then.


>
> Chas, please do you agree with Declan's ack?
>
>
>
Change the Fixes line.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/bonding: stop and deactivate slaves when bonding port is stopped
  2018-08-06 15:50     ` Chas Williams
@ 2018-08-23 13:15       ` Ferruh Yigit
  2018-08-23 15:21         ` Chas Williams
  2018-09-28 11:04       ` Ferruh Yigit
  1 sibling, 1 reply; 13+ messages in thread
From: Ferruh Yigit @ 2018-08-23 13:15 UTC (permalink / raw)
  To: Chas Williams, Thomas Monjalon
  Cc: Chas Williams, dev, Declan Doherty, Radu Nicolau, stable

On 8/6/2018 4:50 PM, Chas Williams wrote:
> On Sun, Aug 5, 2018 at 5:55 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> 
>> 02/08/2018 15:38, Doherty, Declan:
>>> On 01/08/2018 2:18 PM, Radu Nicolau wrote:
>>>> When a bonding port is stopped also stop and deactivate all slaves.
>>>> Otherwise slaves will be still listed as active.
>>>>
>>>> Fixes: 69bce062132b ("net/bonding: do not clear active slave count")
>>>> Cc: stable@dpdk.org
>>>>
>>>> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
>>>
>>> Acked-by: Declan Doherty <declan.doherty@intel.com>
>>
>> Waiting for opinion from the other bonding maintainer (Chas)
>> who started to review and has some doubts.
>>
> 
> The slaves being listed as active is not a bug.  If the slaves are not
> deactivated, then they should be considered activated.  Previously,
> stopping the bonding PMD just reset the active slave count.  That's
> not the right way to deactivate slaves.  This was fixed by 69bce062132b.
> 
> This patch is new behavior of explicitly deactivating the slaves when
> the bonding PMD is stopped.
> 
> As I mentioned, I think this makes life difficult for those of us using
> an external state machine.  However, that should probably be fixed
> differently then.
> 
> 
>>
>> Chas, please do you agree with Declan's ack?
>>
>>
>>
> Change the Fixes line.

Hi Chas,

Are you OK with the rest of the patch if Fixes line fixed?
If already have a proposed fixes line I can fix it while merging.

Thanks,
ferruh

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/bonding: stop and deactivate slaves when bonding port is stopped
  2018-08-23 13:15       ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
@ 2018-08-23 15:21         ` Chas Williams
  2018-08-24 10:39           ` Ferruh Yigit
  0 siblings, 1 reply; 13+ messages in thread
From: Chas Williams @ 2018-08-23 15:21 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Thomas Monjalon, Chas Williams, dev, Declan Doherty,
	Radu Nicolau, stable

On Thu, Aug 23, 2018 at 9:15 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 8/6/2018 4:50 PM, Chas Williams wrote:
> > On Sun, Aug 5, 2018 at 5:55 PM Thomas Monjalon <thomas@monjalon.net>
> wrote:
> >
> >> 02/08/2018 15:38, Doherty, Declan:
> >>> On 01/08/2018 2:18 PM, Radu Nicolau wrote:
> >>>> When a bonding port is stopped also stop and deactivate all slaves.
> >>>> Otherwise slaves will be still listed as active.
> >>>>
> >>>> Fixes: 69bce062132b ("net/bonding: do not clear active slave count")
> >>>> Cc: stable@dpdk.org
> >>>>
> >>>> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> >>>
> >>> Acked-by: Declan Doherty <declan.doherty@intel.com>
> >>
> >> Waiting for opinion from the other bonding maintainer (Chas)
> >> who started to review and has some doubts.
> >>
> >
> > The slaves being listed as active is not a bug.  If the slaves are not
> > deactivated, then they should be considered activated.  Previously,
> > stopping the bonding PMD just reset the active slave count.  That's
> > not the right way to deactivate slaves.  This was fixed by 69bce062132b.
> >
> > This patch is new behavior of explicitly deactivating the slaves when
> > the bonding PMD is stopped.
> >
> > As I mentioned, I think this makes life difficult for those of us using
> > an external state machine.  However, that should probably be fixed
> > differently then.
> >
> >
> >>
> >> Chas, please do you agree with Declan's ack?
> >>
> >>
> >>
> > Change the Fixes line.
>
> Hi Chas,
>
> Are you OK with the rest of the patch if Fixes line fixed?
> If already have a proposed fixes line I can fix it while merging.
>

Yes, the rest of the patch is fine as long as the Fixes is correct.
Try this:

    Fixes: 2efb58cbab6e ("bond: new link bonding library")

And it's really new behavior.  Perhaps Fixes: isn't quite right.
The current code works fine with activated slaves existing outside
of the stop/star.


>
> Thanks,
> ferruh
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/bonding: stop and deactivate slaves when bonding port is stopped
  2018-08-23 15:21         ` Chas Williams
@ 2018-08-24 10:39           ` Ferruh Yigit
  2018-08-24 14:05             ` Chas Williams
  0 siblings, 1 reply; 13+ messages in thread
From: Ferruh Yigit @ 2018-08-24 10:39 UTC (permalink / raw)
  To: Chas Williams
  Cc: Thomas Monjalon, Chas Williams, dev, Declan Doherty,
	Radu Nicolau, stable

On 8/23/2018 4:21 PM, Chas Williams wrote:
> 
> 
> On Thu, Aug 23, 2018 at 9:15 AM Ferruh Yigit <ferruh.yigit@intel.com
> <mailto:ferruh.yigit@intel.com>> wrote:
> 
>     On 8/6/2018 4:50 PM, Chas Williams wrote:
>     > On Sun, Aug 5, 2018 at 5:55 PM Thomas Monjalon <thomas@monjalon.net
>     <mailto:thomas@monjalon.net>> wrote:
>     >
>     >> 02/08/2018 15:38, Doherty, Declan:
>     >>> On 01/08/2018 2:18 PM, Radu Nicolau wrote:
>     >>>> When a bonding port is stopped also stop and deactivate all slaves.
>     >>>> Otherwise slaves will be still listed as active.
>     >>>>
>     >>>> Fixes: 69bce062132b ("net/bonding: do not clear active slave count")
>     >>>> Cc: stable@dpdk.org <mailto:stable@dpdk.org>
>     >>>>
>     >>>> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com
>     <mailto:radu.nicolau@intel.com>>
>     >>>
>     >>> Acked-by: Declan Doherty <declan.doherty@intel.com
>     <mailto:declan.doherty@intel.com>>
>     >>
>     >> Waiting for opinion from the other bonding maintainer (Chas)
>     >> who started to review and has some doubts.
>     >>
>     >
>     > The slaves being listed as active is not a bug.  If the slaves are not
>     > deactivated, then they should be considered activated.  Previously,
>     > stopping the bonding PMD just reset the active slave count.  That's
>     > not the right way to deactivate slaves.  This was fixed by 69bce062132b.
>     >
>     > This patch is new behavior of explicitly deactivating the slaves when
>     > the bonding PMD is stopped.
>     >
>     > As I mentioned, I think this makes life difficult for those of us using
>     > an external state machine.  However, that should probably be fixed
>     > differently then.
>     >
>     >
>     >>
>     >> Chas, please do you agree with Declan's ack?
>     >>
>     >>
>     >>
>     > Change the Fixes line.
> 
>     Hi Chas,
> 
>     Are you OK with the rest of the patch if Fixes line fixed?
>     If already have a proposed fixes line I can fix it while merging.
> 
> 
> Yes, the rest of the patch is fine as long as the Fixes is correct.
> Try this:
> 
>     Fixes: 2efb58cbab6e ("bond: new link bonding library")
> 
> And it's really new behavior.  Perhaps Fixes: isn't quite right.
> The current code works fine with activated slaves existing outside
> of the stop/star.

>From your description dropping Fixes line seems OK, but it will effect if the
patch backported or not.

Isn't it clear from bonding requirement what should slave ports' status be when
bonding port it stopped?

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/bonding: stop and deactivate slaves when bonding port is stopped
  2018-08-24 10:39           ` Ferruh Yigit
@ 2018-08-24 14:05             ` Chas Williams
  2018-09-28 10:00               ` Ferruh Yigit
  0 siblings, 1 reply; 13+ messages in thread
From: Chas Williams @ 2018-08-24 14:05 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Thomas Monjalon, Chas Williams, dev, Declan Doherty,
	Radu Nicolau, stable

On Fri, Aug 24, 2018 at 6:39 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 8/23/2018 4:21 PM, Chas Williams wrote:
> >
> >
> > On Thu, Aug 23, 2018 at 9:15 AM Ferruh Yigit <ferruh.yigit@intel.com
> > <mailto:ferruh.yigit@intel.com>> wrote:
> >
> >     On 8/6/2018 4:50 PM, Chas Williams wrote:
> >     > On Sun, Aug 5, 2018 at 5:55 PM Thomas Monjalon <
> thomas@monjalon.net
> >     <mailto:thomas@monjalon.net>> wrote:
> >     >
> >     >> 02/08/2018 15:38, Doherty, Declan:
> >     >>> On 01/08/2018 2:18 PM, Radu Nicolau wrote:
> >     >>>> When a bonding port is stopped also stop and deactivate all
> slaves.
> >     >>>> Otherwise slaves will be still listed as active.
> >     >>>>
> >     >>>> Fixes: 69bce062132b ("net/bonding: do not clear active slave
> count")
> >     >>>> Cc: stable@dpdk.org <mailto:stable@dpdk.org>
> >     >>>>
> >     >>>> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com
> >     <mailto:radu.nicolau@intel.com>>
> >     >>>
> >     >>> Acked-by: Declan Doherty <declan.doherty@intel.com
> >     <mailto:declan.doherty@intel.com>>
> >     >>
> >     >> Waiting for opinion from the other bonding maintainer (Chas)
> >     >> who started to review and has some doubts.
> >     >>
> >     >
> >     > The slaves being listed as active is not a bug.  If the slaves are
> not
> >     > deactivated, then they should be considered activated.  Previously,
> >     > stopping the bonding PMD just reset the active slave count.  That's
> >     > not the right way to deactivate slaves.  This was fixed by
> 69bce062132b.
> >     >
> >     > This patch is new behavior of explicitly deactivating the slaves
> when
> >     > the bonding PMD is stopped.
> >     >
> >     > As I mentioned, I think this makes life difficult for those of us
> using
> >     > an external state machine.  However, that should probably be fixed
> >     > differently then.
> >     >
> >     >
> >     >>
> >     >> Chas, please do you agree with Declan's ack?
> >     >>
> >     >>
> >     >>
> >     > Change the Fixes line.
> >
> >     Hi Chas,
> >
> >     Are you OK with the rest of the patch if Fixes line fixed?
> >     If already have a proposed fixes line I can fix it while merging.
> >
> >
> > Yes, the rest of the patch is fine as long as the Fixes is correct.
> > Try this:
> >
> >     Fixes: 2efb58cbab6e ("bond: new link bonding library")
> >
> > And it's really new behavior.  Perhaps Fixes: isn't quite right.
> > The current code works fine with activated slaves existing outside
> > of the stop/star.
>
> From your description dropping Fixes line seems OK, but it will effect if
> the
> patch backported or not.
>

Then dont' drop the Fixes line.  See below.


> Isn't it clear from bonding requirement what should slave ports' status be
> when
> bonding port it stopped?
>

I am guessing the author's original intent was to deactivate all the
slaves because he reset the activate slave count to 0.  However, that
didn't actually deactivate a slave and later activating an already
active slave after another start would result in some odd failures.

In a more existential sense, what does active mean?  In the case of
802.3ad, a slave is potentially active until the protocol says otherwise
which means a timeout.  So the stopped/started aspect of the port
isn't necessarily a concern.  If you are just briefly stopping a
port to reconfigure, perhaps you don't want to renegotiate the
802.3ad state.  Of course, if you reconfigure a port, there is a
good chance you want to renegotiate with the other end anyway.

TL;DR -- fine with this patch.  Add new Fixes line so backported.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/bonding: stop and deactivate slaves when bonding port is stopped
  2018-08-24 14:05             ` Chas Williams
@ 2018-09-28 10:00               ` Ferruh Yigit
  2018-09-28 10:03                 ` Ferruh Yigit
  0 siblings, 1 reply; 13+ messages in thread
From: Ferruh Yigit @ 2018-09-28 10:00 UTC (permalink / raw)
  To: Chas Williams
  Cc: Thomas Monjalon, Chas Williams, dev, Declan Doherty,
	Radu Nicolau, stable

On 8/24/2018 3:05 PM, Chas Williams wrote:
> 
> 
> On Fri, Aug 24, 2018 at 6:39 AM Ferruh Yigit <ferruh.yigit@intel.com
> <mailto:ferruh.yigit@intel.com>> wrote:
> 
>     On 8/23/2018 4:21 PM, Chas Williams wrote:
>     >
>     >
>     > On Thu, Aug 23, 2018 at 9:15 AM Ferruh Yigit <ferruh.yigit@intel.com
>     <mailto:ferruh.yigit@intel.com>
>     > <mailto:ferruh.yigit@intel.com <mailto:ferruh.yigit@intel.com>>> wrote:
>     >
>     >     On 8/6/2018 4:50 PM, Chas Williams wrote:
>     >     > On Sun, Aug 5, 2018 at 5:55 PM Thomas Monjalon <thomas@monjalon.net
>     <mailto:thomas@monjalon.net>
>     >     <mailto:thomas@monjalon.net <mailto:thomas@monjalon.net>>> wrote:
>     >     >
>     >     >> 02/08/2018 15:38, Doherty, Declan:
>     >     >>> On 01/08/2018 2:18 PM, Radu Nicolau wrote:
>     >     >>>> When a bonding port is stopped also stop and deactivate all slaves.
>     >     >>>> Otherwise slaves will be still listed as active.
>     >     >>>>
>     >     >>>> Fixes: 69bce062132b ("net/bonding: do not clear active slave count")
>     >     >>>> Cc: stable@dpdk.org <mailto:stable@dpdk.org>
>     <mailto:stable@dpdk.org <mailto:stable@dpdk.org>>
>     >     >>>>
>     >     >>>> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com
>     <mailto:radu.nicolau@intel.com>
>     >     <mailto:radu.nicolau@intel.com <mailto:radu.nicolau@intel.com>>>
>     >     >>>
>     >     >>> Acked-by: Declan Doherty <declan.doherty@intel.com
>     <mailto:declan.doherty@intel.com>
>     >     <mailto:declan.doherty@intel.com <mailto:declan.doherty@intel.com>>>
>     >     >>
>     >     >> Waiting for opinion from the other bonding maintainer (Chas)
>     >     >> who started to review and has some doubts.
>     >     >>
>     >     >
>     >     > The slaves being listed as active is not a bug.  If the slaves are not
>     >     > deactivated, then they should be considered activated.  Previously,
>     >     > stopping the bonding PMD just reset the active slave count.  That's
>     >     > not the right way to deactivate slaves.  This was fixed by 69bce062132b.
>     >     >
>     >     > This patch is new behavior of explicitly deactivating the slaves when
>     >     > the bonding PMD is stopped.
>     >     >
>     >     > As I mentioned, I think this makes life difficult for those of us using
>     >     > an external state machine.  However, that should probably be fixed
>     >     > differently then.
>     >     >
>     >     >
>     >     >>
>     >     >> Chas, please do you agree with Declan's ack?
>     >     >>
>     >     >>
>     >     >>
>     >     > Change the Fixes line.
>     >
>     >     Hi Chas,
>     >
>     >     Are you OK with the rest of the patch if Fixes line fixed?
>     >     If already have a proposed fixes line I can fix it while merging.
>     >
>     >
>     > Yes, the rest of the patch is fine as long as the Fixes is correct.
>     > Try this:
>     >
>     >     Fixes: 2efb58cbab6e ("bond: new link bonding library")
>     >
>     > And it's really new behavior.  Perhaps Fixes: isn't quite right.
>     > The current code works fine with activated slaves existing outside
>     > of the stop/star.
> 
>     From your description dropping Fixes line seems OK, but it will effect if the
>     patch backported or not.
> 
> 
> Then dont' drop the Fixes line.  See below.
>  
> 
>     Isn't it clear from bonding requirement what should slave ports' status be when
>     bonding port it stopped?
> 
> 
> I am guessing the author's original intent was to deactivate all the
> slaves because he reset the activate slave count to 0.  However, that
> didn't actually deactivate a slave and later activating an already
> active slave after another start would result in some odd failures.

Yes, intention seems as you said, there is an unit test that expects active
slave count to be 0 after bond port stopped.
Your change to remove setting active slave count to zero on bond stop causes
that test fail.
To fix the unit test, all slaves stopped and deactivated.

I think it is still clear if that expectation from unit test coming from bonding
requirement and development assumption. But will get the patch, with updated
fixes line, to fix the unit test.

> 
> In a more existential sense, what does active mean?  In the case of
> 802.3ad, a slave is potentially active until the protocol says otherwise
> which means a timeout.  So the stopped/started aspect of the port
> isn't necessarily a concern.  If you are just briefly stopping a
> port to reconfigure, perhaps you don't want to renegotiate the
> 802.3ad state.  Of course, if you reconfigure a port, there is a
> good chance you want to renegotiate with the other end anyway.
> 
> TL;DR -- fine with this patch.  Add new Fixes line so backported.
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/bonding: stop and deactivate slaves when bonding port is stopped
  2018-09-28 10:00               ` Ferruh Yigit
@ 2018-09-28 10:03                 ` Ferruh Yigit
  0 siblings, 0 replies; 13+ messages in thread
From: Ferruh Yigit @ 2018-09-28 10:03 UTC (permalink / raw)
  To: Chas Williams
  Cc: Thomas Monjalon, Chas Williams, dev, Declan Doherty,
	Radu Nicolau, stable

On 9/28/2018 11:00 AM, Ferruh Yigit wrote:
> On 8/24/2018 3:05 PM, Chas Williams wrote:
>>
>>
>> On Fri, Aug 24, 2018 at 6:39 AM Ferruh Yigit <ferruh.yigit@intel.com
>> <mailto:ferruh.yigit@intel.com>> wrote:
>>
>>     On 8/23/2018 4:21 PM, Chas Williams wrote:
>>     >
>>     >
>>     > On Thu, Aug 23, 2018 at 9:15 AM Ferruh Yigit <ferruh.yigit@intel.com
>>     <mailto:ferruh.yigit@intel.com>
>>     > <mailto:ferruh.yigit@intel.com <mailto:ferruh.yigit@intel.com>>> wrote:
>>     >
>>     >     On 8/6/2018 4:50 PM, Chas Williams wrote:
>>     >     > On Sun, Aug 5, 2018 at 5:55 PM Thomas Monjalon <thomas@monjalon.net
>>     <mailto:thomas@monjalon.net>
>>     >     <mailto:thomas@monjalon.net <mailto:thomas@monjalon.net>>> wrote:
>>     >     >
>>     >     >> 02/08/2018 15:38, Doherty, Declan:
>>     >     >>> On 01/08/2018 2:18 PM, Radu Nicolau wrote:
>>     >     >>>> When a bonding port is stopped also stop and deactivate all slaves.
>>     >     >>>> Otherwise slaves will be still listed as active.
>>     >     >>>>
>>     >     >>>> Fixes: 69bce062132b ("net/bonding: do not clear active slave count")
>>     >     >>>> Cc: stable@dpdk.org <mailto:stable@dpdk.org>
>>     <mailto:stable@dpdk.org <mailto:stable@dpdk.org>>
>>     >     >>>>
>>     >     >>>> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com
>>     <mailto:radu.nicolau@intel.com>
>>     >     <mailto:radu.nicolau@intel.com <mailto:radu.nicolau@intel.com>>>
>>     >     >>>
>>     >     >>> Acked-by: Declan Doherty <declan.doherty@intel.com
>>     <mailto:declan.doherty@intel.com>
>>     >     <mailto:declan.doherty@intel.com <mailto:declan.doherty@intel.com>>>
>>     >     >>
>>     >     >> Waiting for opinion from the other bonding maintainer (Chas)
>>     >     >> who started to review and has some doubts.
>>     >     >>
>>     >     >
>>     >     > The slaves being listed as active is not a bug.  If the slaves are not
>>     >     > deactivated, then they should be considered activated.  Previously,
>>     >     > stopping the bonding PMD just reset the active slave count.  That's
>>     >     > not the right way to deactivate slaves.  This was fixed by 69bce062132b.
>>     >     >
>>     >     > This patch is new behavior of explicitly deactivating the slaves when
>>     >     > the bonding PMD is stopped.
>>     >     >
>>     >     > As I mentioned, I think this makes life difficult for those of us using
>>     >     > an external state machine.  However, that should probably be fixed
>>     >     > differently then.
>>     >     >
>>     >     >
>>     >     >>
>>     >     >> Chas, please do you agree with Declan's ack?
>>     >     >>
>>     >     >>
>>     >     >>
>>     >     > Change the Fixes line.
>>     >
>>     >     Hi Chas,
>>     >
>>     >     Are you OK with the rest of the patch if Fixes line fixed?
>>     >     If already have a proposed fixes line I can fix it while merging.
>>     >
>>     >
>>     > Yes, the rest of the patch is fine as long as the Fixes is correct.
>>     > Try this:
>>     >
>>     >     Fixes: 2efb58cbab6e ("bond: new link bonding library")
>>     >
>>     > And it's really new behavior.  Perhaps Fixes: isn't quite right.
>>     > The current code works fine with activated slaves existing outside
>>     > of the stop/star.
>>
>>     From your description dropping Fixes line seems OK, but it will effect if the
>>     patch backported or not.
>>
>>
>> Then dont' drop the Fixes line.  See below.
>>  
>>
>>     Isn't it clear from bonding requirement what should slave ports' status be when
>>     bonding port it stopped?
>>
>>
>> I am guessing the author's original intent was to deactivate all the
>> slaves because he reset the activate slave count to 0.  However, that
>> didn't actually deactivate a slave and later activating an already
>> active slave after another start would result in some odd failures.
> 
> Yes, intention seems as you said, there is an unit test that expects active
> slave count to be 0 after bond port stopped.
> Your change to remove setting active slave count to zero on bond stop causes
> that test fail.
> To fix the unit test, all slaves stopped and deactivated.
> 
> I think it is still clear if that expectation from unit test coming from bonding
> requirement and development assumption. But will get the patch, with updated
> fixes line, to fix the unit test.

it is still _not_ clear ...

bonding requirement _or_ development assumption. ...

> 
>>
>> In a more existential sense, what does active mean?  In the case of
>> 802.3ad, a slave is potentially active until the protocol says otherwise
>> which means a timeout.  So the stopped/started aspect of the port
>> isn't necessarily a concern.  If you are just briefly stopping a
>> port to reconfigure, perhaps you don't want to renegotiate the
>> 802.3ad state.  Of course, if you reconfigure a port, there is a
>> good chance you want to renegotiate with the other end anyway.
>>
>> TL;DR -- fine with this patch.  Add new Fixes line so backported.
>>
>>
>>
>>
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/bonding: stop and deactivate slaves when bonding port is stopped
  2018-08-06 15:50     ` Chas Williams
  2018-08-23 13:15       ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
@ 2018-09-28 11:04       ` Ferruh Yigit
  1 sibling, 0 replies; 13+ messages in thread
From: Ferruh Yigit @ 2018-09-28 11:04 UTC (permalink / raw)
  To: Chas Williams, Thomas Monjalon
  Cc: Chas Williams, dev, Declan Doherty, Radu Nicolau, stable

On 8/6/2018 4:50 PM, Chas Williams wrote:
> On Sun, Aug 5, 2018 at 5:55 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> 
>> 02/08/2018 15:38, Doherty, Declan:
>>> On 01/08/2018 2:18 PM, Radu Nicolau wrote:
>>>> When a bonding port is stopped also stop and deactivate all slaves.
>>>> Otherwise slaves will be still listed as active.
>>>>
>>>> Fixes: 69bce062132b ("net/bonding: do not clear active slave count")
>>>> Cc: stable@dpdk.org
>>>>
>>>> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
>>>
>>> Acked-by: Declan Doherty <declan.doherty@intel.com>

Fixes: 2efb58cbab6e ("bond: new link bonding library")

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-09-28 11:04 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-01 13:18 [dpdk-dev] [PATCH] net/bonding: stop and deactivate slaves when bonding port is stopped Radu Nicolau
2018-08-01 13:44 ` Chas Williams
2018-08-01 14:02   ` Radu Nicolau
2018-08-02 13:38 ` Doherty, Declan
2018-08-05 21:55   ` Thomas Monjalon
2018-08-06 15:50     ` Chas Williams
2018-08-23 13:15       ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2018-08-23 15:21         ` Chas Williams
2018-08-24 10:39           ` Ferruh Yigit
2018-08-24 14:05             ` Chas Williams
2018-09-28 10:00               ` Ferruh Yigit
2018-09-28 10:03                 ` Ferruh Yigit
2018-09-28 11:04       ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).