[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m2msrllsgy.fsf@gmail.com>
Date: Tue, 27 Feb 2024 17:36:29 +0000
From: Donald Hunter <donald.hunter@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>, Eric
Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Jacob
Keller <jacob.e.keller@...el.com>, Jiri Pirko <jiri@...nulli.us>,
Stanislav Fomichev <sdf@...gle.com>, donald.hunter@...hat.com
Subject: Re: [RFC net-next 1/4] doc/netlink: Add batch op definitions to
netlink-raw schema
Jakub Kicinski <kuba@...nel.org> writes:
> On Tue, 27 Feb 2024 16:52:40 +0000 Donald Hunter wrote:
>> > I'm not familiar with nftables nl. Can you explain what the batch ops
>> > are for and how they function?
>> >
>> > Begin / end makes it sound like some form of a transaction, is it?
>>
>> Yes, it's handled as a transaction, containing multiple messages wrapped
>> in BATCH_BEGIN / BATCH_END in a single skb.
>>
>> The transaction batching could be implemented without any schema changes
>> by just adding multi-message capability to ynl. Then it would be the
>> caller's responsibility to specify the right begin / end messages.
>
> That's where I was going with my questions :)
> Feels like we need to figure out a nice API at the library level
> and/or CLI. That could be more generally useful if anyone wants
> to save syscalls.
Yep, I'm probably guilty of trying to put too much into the schema
again.
>From a library API perspective, it'll need to take a list of tuples,
e.g. something like this:
ynl.do_multi([ (method, vals, flags), ... ])
As for the CLI, it will likely take a bit of experimentation to find a
usable balance between args and json payload.
Powered by blists - more mailing lists