netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to display IPv4 array?
@ 2024-03-12 10:08 Hangbin Liu
  2024-03-12 12:12 ` Jiri Pirko
  0 siblings, 1 reply; 7+ messages in thread
From: Hangbin Liu @ 2024-03-12 10:08 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: Donald Hunter, netdev

Hi Jakub,

I plan to add bond support for Documentation/netlink/specs/rt_link.yaml. While
dealing with the attrs. I got a problem about how to show the bonding arp/ns
targets. Because the arp/ns targets are filled as an array[1]. I tried
something like:

  -
    name: linkinfo-bond-attrs
    name-prefix: ifla-bond-
    attributes:
      -
        name: arp-ip-target
        type: nest
        nested-attributes: ipv4-addr
  -
    name: ipv4-addr
    attributes:
      -
        name: addr
        type: binary
        display-hint: ipv4

But this failed with error: Exception: Space 'ipv4-addr' has no attribute with value '0'
Do you have any suggestion?

[1] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/tree/drivers/net/bonding/bond_netlink.c#n670

Thanks
Hangbin

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

end of thread, other threads:[~2024-03-13  2:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-12 10:08 How to display IPv4 array? Hangbin Liu
2024-03-12 12:12 ` Jiri Pirko
2024-03-12 12:37   ` Hangbin Liu
2024-03-12 12:48     ` Jiri Pirko
2024-03-12 16:04   ` Donald Hunter
2024-03-12 17:01     ` Jakub Kicinski
2024-03-13  2:51       ` 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).