linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hangbin Liu <liuhangbin@gmail.com>
To: David Wilder <wilder@us.ibm.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, jv@jvosburgh.net, pradeep@us.ibm.com,
	i.maximets@ovn.org, amorenoz@redhat.com, haliu@redhat.com,
	stephen@networkplumber.org, horms@kernel.org, pabeni@redhat.com,
	andrew+netdev@lunn.ch, edumazet@google.com, razor@blackwall.org,
	shuah@kernel.org, corbet@lwn.net,
	linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH net-next v14 0/7] bonding: Extend arp_ip_target format to allow for a list of vlan tags.
Date: Wed, 12 Nov 2025 06:44:23 +0000	[thread overview]
Message-ID: <aRQsxwgtra6L5cQz@fedora> (raw)
In-Reply-To: <20251022175033.7daec7f6@kernel.org>

On Wed, Oct 22, 2025 at 05:50:33PM -0700, Jakub Kicinski wrote:
> On Wed, 22 Oct 2025 11:25:27 -0700 David Wilder wrote:
> > 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.
> 
> Once again if anyone thinks this belongs in the kernel please speak up.
> Otherwise let this be the last posting.
> 
> *If* someone does speak up in support you will need to find a less ugly
> way to represent the attribute within Netlink. What you invent must work
> in YNL and be added to the spec (Documentation/netlink/specs/rt-link.yaml)

Hi David,

I haven’t tested it yet, but for the netlink part, instead of using a
randomly sized binary structure, maybe you could try using nested attributes.
For example:

IFLA_BOND_ARP_IP_TARGET (nested)
 ├── [0] = 192.168.1.1              old format (no VLAN)
 ├── [1] (nested)                   new format (with VLAN tags)
 │     ├── IFLA_BOND_ARP_TARGET_IP = 192.168.2.1
 │     └── IFLA_BOND_ARP_TARGET_VLANS (nested)
 │           ├── [0] = 10
 │           ├── [1] = 20
 │           └── [2] = 30
 ├── [2] (nested)                   new format (no VLAN tags: leave empty or use nla_put_empty_nest())
 │     └── IFLA_BOND_ARP_TARGET_IP = 192.168.3.1

When parsing the attributes, first check if the data is nested using:
nla_type(attr) & NLA_F_NESTED. If not, just copy the IPv4 addresses.

If it’s nested, handle the target IP and VLANs accordingly.
The downside is that this approach would introduce three levels of nesting,
which might not be ideal.

Thanks
Hangbin

      parent reply	other threads:[~2025-11-12  6:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-22 18:25 [PATCH net-next v14 0/7] bonding: Extend arp_ip_target format to allow for a list of vlan tags David Wilder
2025-10-22 18:25 ` [PATCH net-next v14 1/7] bonding: Adding struct bond_arp_target David Wilder
2025-10-22 18:25 ` [PATCH net-next v14 2/7] bonding: Adding extra_len field to struct bond_opt_value David Wilder
2025-10-22 18:25 ` [PATCH net-next v14 3/7] bonding: arp_ip_target helpers David Wilder
2025-10-22 18:25 ` [PATCH net-next v14 4/7] bonding: Processing extended arp_ip_target from user space David Wilder
2025-10-22 18:25 ` [PATCH net-next v14 5/7] bonding: Update to bond_arp_send_all() to use supplied vlan tags David Wilder
2025-10-22 18:25 ` [PATCH net-next v14 6/7] bonding: Update for extended arp_ip_target format David Wilder
2025-10-22 18:25 ` [PATCH net-next v14 7/7] bonding: Selftest and documentation for the arp_ip_target parameter David Wilder
2025-10-23  0:50 ` [PATCH net-next v14 0/7] bonding: Extend arp_ip_target format to allow for a list of vlan tags Jakub Kicinski
2025-10-25  3:44   ` Jay Vosburgh
2025-11-12  6:44   ` Hangbin Liu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aRQsxwgtra6L5cQz@fedora \
    --to=liuhangbin@gmail.com \
    --cc=amorenoz@redhat.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=edumazet@google.com \
    --cc=haliu@redhat.com \
    --cc=horms@kernel.org \
    --cc=i.maximets@ovn.org \
    --cc=jv@jvosburgh.net \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pradeep@us.ibm.com \
    --cc=razor@blackwall.org \
    --cc=shuah@kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=wilder@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).