Re: [PATCH net-next] docs: netlink: clarify the historical baggage of Netlink flags
From: Nikolay Aleksandrov <razor@blackwall.org>
Date: 2022-09-28 14:40:29
On 28/09/2022 17:21, Jakub Kicinski wrote:
On Wed, 28 Sep 2022 10:03:07 +0300 Nikolay Aleksandrov wrote:quoted
The part about NLM_F_BULK is correct now, but won't be soon. I have patches to add bulk delete to mdbs as well, and IIRC there were plans for other object types. I can update the doc once they are applied, but IMO it will be more useful to explain why they are used instead of who's using them, i.e. the BULK was added to support flush for FDBs w/ filtering initially and it's a flag so others can re-use it (my first attempt targeted only FDBs[1], but after a discussion it became clear that it will be more beneficial if other object types can re-use it so moved to a flag). The first version of the fdb flush support used only netlink attributes to do the flush via setlink, later moved to a specific RTM command (RTM_FLUSHNEIGH)[2] and finally settled on the flag[3][4] so everyone can use it.I thought that's all FDB-ish stuff. Not really looking forward to the use of flags spreading but within rtnl it may make some sense. We can just update the docs tho, no?
Sure, that's ok.
BTW how would you define the exact semantics of NLM_F_BULK vs it not being set, in abstract terms?
Well, BULK is a delete modified to act on multiple objects, so I'd say if it is not set the DELETE targets a single object vs multiple objects if set. Obviously in more formal terms, sorry not at a PC right now. :)