All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hangbin Liu <liuhangbin@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Donald Hunter <donald.hunter@gmail.com>, netdev@vger.kernel.org
Subject: How to display IPv4 array?
Date: Tue, 12 Mar 2024 18:08:33 +0800	[thread overview]
Message-ID: <ZfApoTpVaiaoH1F0@Laptop-X1> (raw)

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

             reply	other threads:[~2024-03-12 10:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12 10:08 Hangbin Liu [this message]
2024-03-12 12:12 ` How to display IPv4 array? 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

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=ZfApoTpVaiaoH1F0@Laptop-X1 \
    --to=liuhangbin@gmail.com \
    --cc=donald.hunter@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.