Re: [PATCH net-next 0/4] netlink: add 'bitmap' attribute type and API

From
Jakub Kicinski <kuba@kernel.org>
Date
2022-07-21 18:13:49
Also in
lkml
Reply to
Alexander Lobakin, 2022-07-21
On Thu, 21 Jul 2022 17:59:46 +0200 Alexander Lobakin wrote:
BTW, Ethtool bitsets provide similar functionality, but it operates
with u32s (u64 is more convenient and optimal on most platforms) and
Netlink bitmaps is a generic interface providing policies and data
verification (Ethtool bitsets are declared simply as %NLA_BINARY),
generic getters/setters etc.
Are you saying we don't need the other two features ethtool bitmaps
provide? Masking and compact vs named representations?

I think that straight up bitmap with a fixed word is awkward and leads
to too much boilerplate code. People will avoid using it. What about
implementing a bigint type instead? Needing more than 64b is extremely
rare, so in 99% of the cases the code outside of parsing can keep using
its u8/u16/u32.
Thread (13 messages) 13 messages, 2 authors, last reply 2022-07-26
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help