netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v10 0/7] bonding: Extend arp_ip_target format to allow for a list of vlan tags.
@ 2025-09-04 22:18 David Wilder
  2025-09-04 22:18 ` [PATCH net-next v10 1/7] bonding: Adding struct bond_arp_target David Wilder
                   ` (7 more replies)
  0 siblings, 8 replies; 22+ messages in thread
From: David Wilder @ 2025-09-04 22:18 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)

Change since V9
Fix kdoc build error.

Changes since V8:
Moved the #define BOND_MAX_VLAN_TAGS from patch 6 to patch 3.
Thanks Simon for catching the bisection break.

Changes since V7:
These changes should eliminate the CI failures I have been seeing.
1) patch 2, changed type of bond_opt_value.extra_len to size_t.
2) Patch 4, added bond_validate_tags() to validate the array of bond_vlan_tag provided by
 the user.

Changes since V6:
1) I made a number of changes to fix the failure seen in the
kernel CI.  I am still unable to reproduce the this failure, hopefully I
have fixed it.  These change are in patch #4 to functions:
bond_option_arp_ip_targets_clear() and
bond_option_arp_ip_targets_set()

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            |  35 +++-
 drivers/net/bonding/bond_options.c            | 135 +++++++++----
 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 | 180 ++++++++++++++++++
 .../selftests/drivers/net/bonding/config      |   1 +
 11 files changed, 433 insertions(+), 77 deletions(-)
 create mode 100755 tools/testing/selftests/drivers/net/bonding/bond-arp-ip-target.sh

-- 
2.50.1


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

end of thread, other threads:[~2025-09-10 21:19 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-04 22:18 [PATCH net-next v10 0/7] bonding: Extend arp_ip_target format to allow for a list of vlan tags David Wilder
2025-09-04 22:18 ` [PATCH net-next v10 1/7] bonding: Adding struct bond_arp_target David Wilder
2025-09-04 22:18 ` [PATCH net-next v10 2/7] bonding: Adding extra_len field to struct bond_opt_value David Wilder
2025-09-04 22:18 ` [PATCH net-next v10 3/7] bonding: arp_ip_target helpers David Wilder
2025-09-04 22:18 ` [PATCH net-next v10 4/7] bonding: Processing extended arp_ip_target from user space David Wilder
2025-09-09 13:37   ` Paolo Abeni
2025-09-09 18:42   ` Nikolay Aleksandrov
2025-09-10 21:19     ` David Wilder
2025-09-04 22:18 ` [PATCH net-next v10 5/7] bonding: Update to bond_arp_send_all() to use supplied vlan tags David Wilder
2025-09-09 13:39   ` Paolo Abeni
2025-09-09 18:55   ` Nikolay Aleksandrov
2025-09-09 20:54     ` Jay Vosburgh
2025-09-09 21:08       ` Jay Vosburgh
2025-09-09 21:57         ` David Wilder
2025-09-04 22:18 ` [PATCH net-next v10 6/7] bonding: Update for extended arp_ip_target format David Wilder
2025-09-09 13:46   ` Paolo Abeni
2025-09-09 18:45   ` Nikolay Aleksandrov
2025-09-04 22:18 ` [PATCH net-next v10 7/7] bonding: Selftest and documentation for the arp_ip_target parameter David Wilder
2025-09-09 13:51   ` Paolo Abeni
2025-09-09 13:54 ` [PATCH net-next v10 0/7] bonding: Extend arp_ip_target format to allow for a list of vlan tags Nikolay Aleksandrov
2025-09-09 17:55   ` David Wilder
2025-09-09 18:04     ` Nikolay Aleksandrov

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