[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250718212430.1968853-1-wilder@us.ibm.com>
Date: Fri, 18 Jul 2025 14:23:36 -0700
From: David Wilder <wilder@...ibm.com>
To: netdev@...r.kernel.org
Cc: jv@...sburgh.net, wilder@...ibm.com, pradeeps@...ux.vnet.ibm.com,
pradeep@...ibm.com, i.maximets@....org, amorenoz@...hat.com,
haliu@...hat.com, stephen@...workplumber.org, horms@...nel.org
Subject: [PATCH net-next v6 0/7] bonding: Extend arp_ip_target format to allow for a list of vlan tags.
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@...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
Powered by blists - more mailing lists