From: Jakub Kicinski <kuba@kernel.org>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Donald Hunter <donald.hunter@gmail.com>,
Jiri Pirko <jiri@resnulli.us>,
Jacob Keller <jacob.e.keller@intel.com>,
Stanislav Fomichev <sdf@google.com>
Subject: Re: [PATCH net-next 2/2] ynl: support un-nest sub-type for indexed-array
Date: Thu, 28 Mar 2024 09:04:15 -0700 [thread overview]
Message-ID: <20240328090415.3a6a7fb9@kernel.org> (raw)
In-Reply-To: <ZgUfQTtEjkFDwCX9@Laptop-X1>
On Thu, 28 Mar 2024 15:41:53 +0800 Hangbin Liu wrote:
> > # ip link add bond0 type bond mode 1 \
> > arp_ip_target 192.168.1.1,192.168.1.2 ns_ip6_target 2001::1,2001::2
> > # ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_link.yaml \
> > --do getlink --json '{"ifname": "bond0"}' --output-json | jq '.linkinfo'
> >
> > "arp-ip-target": [
> > {
> > "1": "192.168.1.1"
> > },
> > {
> > "2": "192.168.1.2"
> > }
> > ],
>
> For index array, do you think if we need to add the index in the result
> like upper example? Or we just omit the index and show it like:
Yes, the index in some funny dumps can actually be non-contiguous.
You should use the value from the attr, like the nest does.
prev parent reply other threads:[~2024-03-28 16:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-26 6:37 [PATCH net-next 0/2] ynl: rename array-nest to indexed-array Hangbin Liu
2024-03-26 6:37 ` [PATCH net-next 1/2] " Hangbin Liu
2024-03-27 3:46 ` Jakub Kicinski
2024-03-28 7:50 ` Hangbin Liu
2024-03-28 16:02 ` Jakub Kicinski
2024-03-26 6:37 ` [PATCH net-next 2/2] ynl: support un-nest sub-type for indexed-array Hangbin Liu
2024-03-28 7:41 ` Hangbin Liu
2024-03-28 16:04 ` Jakub Kicinski [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=20240328090415.3a6a7fb9@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=jacob.e.keller@intel.com \
--cc=jiri@resnulli.us \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@google.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 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.