netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v6 0/7] bonding: Extend arp_ip_target format to allow for a list of vlan tags.
@ 2025-07-18 21:23 David Wilder
  2025-07-18 21:23 ` [PATCH net-next v6 1/7] bonding: Adding struct bond_arp_target David Wilder
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: David Wilder @ 2025-07-18 21:23 UTC (permalink / raw)
  To: netdev
  Cc: jv, wilder, pradeeps, pradeep, i.maximets, amorenoz, haliu,
	stephen, horms

The current implementation of the arp monitor builds a list of vlan-tags by
following the chain of net_devices above the bond. See bond_verify_device_path().
Unfortunately, with some configurations, this is not possible. One example is
when an ovs switch is configured above the bond.

This change extends the "arp_ip_target" parameter format to allow for a list of
vlan tags to be included for each arp target. This new list of tags is optional
and may be omitted to preserve the current format and process of discovering
vlans.

The new format for arp_ip_target is:
arp_ip_target ipv4-address[vlan-tag\...],...

For example:
arp_ip_target 10.0.0.1[10/20]
arp_ip_target 10.0.0.1[] (used to disable vlan discovery)

Changes since V5: Only the last 2 patches have changed since V5.
1) Fixed sparse warning in bond_fill_info().
2) Also in bond_fill_info() I resolved data.addr uninitialized when if condition is not met.
Thank you Simon for catching this. Note: The change is different that what I shared earlier.
3) Fixed shellcheck warnings in test script: Blocked source warning, Ignored specific unassigned
references and exported ALL_TESTS to resolve a reference warning.

Changes since V4:
1)Dropped changes to proc and sysfs APIs to bonding.  These APIs 
do not need to be updated to support new functionality.  Netlink
and iproute2 have been updated to do the right thing, but the
other APIs are more or less frozen in the past.

2)Jakub reported a warning triggered in bond_info_seq_show() during
testing.  I was unable to reproduce this warning or identify
it with code inspection.  However, all my changes to bond_info_seq_show()
have been dropped as unnecessary (see above).
Hopefully this will resolve the issue. 

3)Selftest script has been updated based on the results of shellcheck.
Two unresolved references that are not possible to resolve are all
that remain.

4)A patch was added updating bond_info_fill()
to support "ip -d show <bond-device>" command.

The inclusion of a list of vlan tags is optional. The new logic
preserves both forward and backward compatibility with the kernel
and iproute2 versions.

Changes since V3:
1) Moved the parsing of the extended arp_ip_target out of the kernel and into
   userspace (ip command). A separate patch to iproute2 to follow shortly.
2) Split up the patch set to make review easier.

Please see iproute changes in a separate posting.

Thank you for your time and reviews.

Signed-off-by: David Wilder <wilder@us.ibm.com>

David Wilder (7):
  bonding: Adding struct bond_arp_target
  bonding: Adding extra_len field to struct bond_opt_value.
  bonding: arp_ip_target helpers.
  bonding: Processing extended arp_ip_target from user space.
  bonding: Update to bond_arp_send_all() to use supplied vlan tags
  bonding: Update for extended arp_ip_target format.
  bonding: Selftest and documentation for the arp_ip_target parameter.

 Documentation/networking/bonding.rst          |  11 ++
 drivers/net/bonding/bond_main.c               |  47 +++--
 drivers/net/bonding/bond_netlink.c            |  34 +++-
 drivers/net/bonding/bond_options.c            |  95 +++++++---
 drivers/net/bonding/bond_procfs.c             |   4 +-
 drivers/net/bonding/bond_sysfs.c              |   4 +-
 include/net/bond_options.h                    |  29 ++-
 include/net/bonding.h                         |  61 +++++-
 .../selftests/drivers/net/bonding/Makefile    |   3 +-
 .../drivers/net/bonding/bond-arp-ip-target.sh | 178 ++++++++++++++++++
 10 files changed, 393 insertions(+), 73 deletions(-)
 create mode 100755 tools/testing/selftests/drivers/net/bonding/bond-arp-ip-target.sh

-- 
2.43.5


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

end of thread, other threads:[~2025-08-08 17:43 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-18 21:23 [PATCH net-next v6 0/7] bonding: Extend arp_ip_target format to allow for a list of vlan tags David Wilder
2025-07-18 21:23 ` [PATCH net-next v6 1/7] bonding: Adding struct bond_arp_target David Wilder
2025-07-18 21:23 ` [PATCH net-next v6 2/7] bonding: Adding extra_len field to struct bond_opt_value David Wilder
2025-07-18 21:23 ` [PATCH net-next v6 3/7] bonding: arp_ip_target helpers David Wilder
2025-07-18 21:23 ` [PATCH net-next v6 4/7] bonding: Processing extended arp_ip_target from user space David Wilder
2025-07-18 21:23 ` [PATCH net-next v6 5/7] bonding: Update to bond_arp_send_all() to use supplied vlan tags David Wilder
2025-07-18 21:23 ` [PATCH net-next v6 6/7] bonding: Update for extended arp_ip_target format David Wilder
2025-07-18 21:23 ` [PATCH net-next v6 7/7] bonding: Selftest and documentation for the arp_ip_target parameter David Wilder
2025-07-19  1:33   ` Jakub Kicinski
2025-07-21 19:23     ` David Wilder
2025-07-21 20:08       ` Jakub Kicinski
2025-08-08 17:32         ` David Wilder
2025-08-08 17:43           ` Jakub Kicinski
2025-07-20 10:37   ` Simon Horman
2025-07-21 17:47     ` David Wilder

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).