* bonding: Do we need netlink events for LACP status? @ 2024-03-05 3:33 Hangbin Liu 2024-03-05 6:33 ` Jay Vosburgh 0 siblings, 1 reply; 5+ messages in thread From: Hangbin Liu @ 2024-03-05 3:33 UTC (permalink / raw) To: Jay Vosburgh; +Cc: netdev Hi Jay, A customer asked to add netlink event notifications for LACP bond state changes. With this, the network monitor could get the LACP state of bonding and port interfaces, and end user may change the down link port based on the current LACP state. Do you think if this is a reasonable case and do able? If yes, I will add it to my to do list. Thanks Hangbin ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bonding: Do we need netlink events for LACP status? 2024-03-05 3:33 bonding: Do we need netlink events for LACP status? Hangbin Liu @ 2024-03-05 6:33 ` Jay Vosburgh 2024-03-06 3:19 ` Hangbin Liu 0 siblings, 1 reply; 5+ messages in thread From: Jay Vosburgh @ 2024-03-05 6:33 UTC (permalink / raw) To: Hangbin Liu; +Cc: netdev Hangbin Liu <liuhangbin@gmail.com> wrote: >A customer asked to add netlink event notifications for LACP bond state >changes. With this, the network monitor could get the LACP state of bonding >and port interfaces, and end user may change the down link port based >on the current LACP state. Do you think if this is a reasonable case >and do able? If yes, I will add it to my to do list. I think I'm going to need some more detail here. To make sure I understand, the suggestion here is to add netlink notifications for transitions in the LACP mux state machine (ATTACHED, COLLECTING, DISTRIBUTING, et al), correct? If not, then what specifically do you mean? Also, what does "change the down link port" mean? -J --- -Jay Vosburgh, jay.vosburgh@canonical.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bonding: Do we need netlink events for LACP status? 2024-03-05 6:33 ` Jay Vosburgh @ 2024-03-06 3:19 ` Hangbin Liu 2024-03-10 3:11 ` Jay Vosburgh 0 siblings, 1 reply; 5+ messages in thread From: Hangbin Liu @ 2024-03-06 3:19 UTC (permalink / raw) To: Jay Vosburgh; +Cc: netdev On Mon, Mar 04, 2024 at 10:33:27PM -0800, Jay Vosburgh wrote: > Hangbin Liu <liuhangbin@gmail.com> wrote: > > >A customer asked to add netlink event notifications for LACP bond state > >changes. With this, the network monitor could get the LACP state of bonding > >and port interfaces, and end user may change the down link port based > >on the current LACP state. Do you think if this is a reasonable case > >and do able? If yes, I will add it to my to do list. > > I think I'm going to need some more detail here. > > To make sure I understand, the suggestion here is to add netlink > notifications for transitions in the LACP mux state machine (ATTACHED, > COLLECTING, DISTRIBUTING, et al), correct? If not, then what Yes, the LACP mux state. Maybe also including the port channel info. > specifically do you mean? > > Also, what does "change the down link port" mean? If a port is down, or in attached state for a period, which means the end of port is not in a channel, or the switch crash. The admin could detect this via the LACP state notification and remove the port from bond, adding other ports to the bond, etc. Thanks Hangbin ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bonding: Do we need netlink events for LACP status? 2024-03-06 3:19 ` Hangbin Liu @ 2024-03-10 3:11 ` Jay Vosburgh 2024-03-11 11:44 ` Hangbin Liu 0 siblings, 1 reply; 5+ messages in thread From: Jay Vosburgh @ 2024-03-10 3:11 UTC (permalink / raw) To: Hangbin Liu; +Cc: netdev Hangbin Liu <liuhangbin@gmail.com> wrote: >On Mon, Mar 04, 2024 at 10:33:27PM -0800, Jay Vosburgh wrote: >> Hangbin Liu <liuhangbin@gmail.com> wrote: >> >> >A customer asked to add netlink event notifications for LACP bond state >> >changes. With this, the network monitor could get the LACP state of bonding >> >and port interfaces, and end user may change the down link port based >> >on the current LACP state. Do you think if this is a reasonable case >> >and do able? If yes, I will add it to my to do list. >> >> I think I'm going to need some more detail here. >> >> To make sure I understand, the suggestion here is to add netlink >> notifications for transitions in the LACP mux state machine (ATTACHED, >> COLLECTING, DISTRIBUTING, et al), correct? If not, then what > >Yes, the LACP mux state. Maybe also including the port channel info. > >> specifically do you mean? >> >> Also, what does "change the down link port" mean? > >If a port is down, or in attached state for a period, which means the end >of port is not in a channel, or the switch crash. The admin could detect this >via the LACP state notification and remove the port from bond, adding other >ports to the bond, etc. Generally speaking, I don't see an issue with adding these type of netlink events, as in normal usage the volume will be low. Looking at the code, I think it would be a matter of adding the new IFLA_BOND_LACP_STUFF labels, updating bond_fill_slave_info() and maybe bond_fill_info() to populate the netlink message for those new IFLAs. Add a call to call_netdevice_notifiers() in ad_mux_machine() when the state changes, using a new event type that would need to be handled by rtnetlink_event(). -J --- -Jay Vosburgh, jay.vosburgh@canonical.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bonding: Do we need netlink events for LACP status? 2024-03-10 3:11 ` Jay Vosburgh @ 2024-03-11 11:44 ` Hangbin Liu 0 siblings, 0 replies; 5+ messages in thread From: Hangbin Liu @ 2024-03-11 11:44 UTC (permalink / raw) To: Jay Vosburgh; +Cc: netdev On Sat, Mar 09, 2024 at 07:11:29PM -0800, Jay Vosburgh wrote: > Generally speaking, I don't see an issue with adding these type > of netlink events, as in normal usage the volume will be low. > > Looking at the code, I think it would be a matter of adding the > new IFLA_BOND_LACP_STUFF labels, updating bond_fill_slave_info() and > maybe bond_fill_info() to populate the netlink message for those new > IFLAs. Add a call to call_netdevice_notifiers() in ad_mux_machine() > when the state changes, using a new event type that would need to be > handled by rtnetlink_event(). Thank Jay, I will add this on my todo list. Hangbin ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-03-11 11:44 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-03-05 3:33 bonding: Do we need netlink events for LACP status? Hangbin Liu 2024-03-05 6:33 ` Jay Vosburgh 2024-03-06 3:19 ` Hangbin Liu 2024-03-10 3:11 ` Jay Vosburgh 2024-03-11 11:44 ` Hangbin Liu
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).