From: Donald Hunter <donald.hunter@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Jiri Pirko <jiri@resnulli.us>,
Jacob Keller <jacob.e.keller@intel.com>,
Stanislav Fomichev <sdf@google.com>,
donald.hunter@redhat.com
Subject: Re: [PATCH net-next v1 2/2] tools/net/ynl: Add multi message support to ynl
Date: Fri, 29 Mar 2024 18:57:28 +0000 [thread overview]
Message-ID: <m2plvcj27b.fsf@gmail.com> (raw)
In-Reply-To: <20240329084346.7a744d1e@kernel.org> (Jakub Kicinski's message of "Fri, 29 Mar 2024 08:43:46 -0700")
Jakub Kicinski <kuba@kernel.org> writes:
> On Fri, 29 Mar 2024 13:37:31 +0000 Donald Hunter wrote:
>> > We'd only support multiple "do" requests, I wonder if we should somehow
>> > call this out. Is --multi-do unnecessary extra typing?
>>
>> I prefer --multi but will update the help text to say "DO-OPERATIION"
>> and "... several do operations".
>
> Alright, technically doing multi-dump should also work, but maybe
> there's less of a benefit there, so we can keep the multi focused
> on do for now.
>
> Looking at the code again, are you sure we'll process all the responses
> not just the first one?
>
> Shouldn't this:
>
> + del reqs_by_seq[nl_msg.nl_seq]
> done = True
>
> be something like:
>
> del reqs_by_seq[nl_msg.nl_seq]
> done = len(reqs_by_seq) == 0
>
Hmm yes, that's a good catch. I need to check the DONE semantics for
these nftables batch operations.
> Would be good to add an example of multi executing some get operations.
I think this was a blind spot on my part because nftables doesn't
support batch for get operations:
https://elixir.bootlin.com/linux/latest/source/net/netfilter/nf_tables_api.c#L9092
I'll need to try using multi for gets without any batch messages and see how
everything behaves.
> My other concern is the formatting of the response. For mutli we should
> probably retain the indexes, e.g. 3 dos should produce an array with a
> length of 3, some of the entries may be None if the command only acked.
> Would that make sense?
As I said, a blind spot on my part - I didn't really think there was a
need to do anything for None responses but if get can work then an array
of responses will be needed.
next prev parent reply other threads:[~2024-03-29 18:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-27 18:16 [PATCH net-next v1 0/2] netlink: Add nftables spec w/ multi messages Donald Hunter
2024-03-27 18:16 ` [PATCH net-next v1 1/2] doc/netlink/specs: Add draft nftables spec Donald Hunter
2024-03-27 18:17 ` [PATCH net-next v1 2/2] tools/net/ynl: Add multi message support to ynl Donald Hunter
2024-03-29 0:57 ` Jakub Kicinski
2024-03-29 13:37 ` Donald Hunter
2024-03-29 15:43 ` Jakub Kicinski
2024-03-29 18:57 ` Donald Hunter [this message]
2024-03-29 21:01 ` Donald Hunter
2024-03-29 21:01 ` Donald Hunter
2024-03-29 21:46 ` Jakub Kicinski
2024-03-29 21:46 ` Jakub Kicinski
2024-03-29 22:12 ` Pablo Neira Ayuso
2024-03-27 22:45 ` [PATCH net-next v1 0/2] netlink: Add nftables spec w/ multi messages Pablo Neira Ayuso
2024-03-28 15:33 ` Donald Hunter
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=m2plvcj27b.fsf@gmail.com \
--to=donald.hunter@gmail.com \
--cc=davem@davemloft.net \
--cc=donald.hunter@redhat.com \
--cc=edumazet@google.com \
--cc=jacob.e.keller@intel.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--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 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).