diff mbox series

enable port after switch

Message ID 20241031023408.31008-1-chengyechun1@huawei.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series enable port after switch | expand

Checks

Context Check Description
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

chengyechun Oct. 31, 2024, 2:34 a.m. UTC
After switching the best aggregator,
change the backup value of the corresponding slave node to 0

Signed-off-by: chengyechun <chengyechun1@huawei.com>

---
 drivers/net/bonding/bond_3ad.c | 2 ++
 1 file changed, 2 insertions(+)

--
2.33.0

Comments

Paolo Abeni Nov. 5, 2024, 12:15 p.m. UTC | #1
On 10/31/24 03:34, chengyechun wrote:
> After switching the best aggregator,
> change the backup value of the corresponding slave node to 0
> 
> Signed-off-by: chengyechun <chengyechun1@huawei.com>
> 
> ---
>  drivers/net/bonding/bond_3ad.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
> index b19e0e41b..b07e42950 100644
> --- a/drivers/net/bonding/bond_3ad.c
> +++ b/drivers/net/bonding/bond_3ad.c
> @@ -1830,6 +1830,8 @@ static void ad_agg_selection_logic(struct aggregator *agg,
>                                 __disable_port(port);
>                         }
>                 }
> +               port = best->lag_ports;
> +               __enable_port(port);
>                 /* Slave array needs update. */
>                 *update_slave_arr = true;
>         }

The above has several issues:
- does not apply
- does not include the target tree in the subj prefix ('net-next')
- the commit message does not describe why such thing should be needed
- Only the first port in the best lag group is enabled instead of all of
them, as done a few lines later - but only if there is an active partner.

Thanks,

Paolo
diff mbox series

Patch

diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index b19e0e41b..b07e42950 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -1830,6 +1830,8 @@  static void ad_agg_selection_logic(struct aggregator *agg,
                                __disable_port(port);
                        }
                }
+               port = best->lag_ports;
+               __enable_port(port);
                /* Slave array needs update. */
                *update_slave_arr = true;
        }