netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] netlink: add variable-length / auto integers
@ 2023-10-18 21:39 Jakub Kicinski
  2023-10-18 21:39 ` [PATCH net-next 1/3] tools: ynl-gen: make the mnl_type() method public Jakub Kicinski
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Jakub Kicinski @ 2023-10-18 21:39 UTC (permalink / raw)
  To: davem; +Cc: netdev, edumazet, pabeni, Jakub Kicinski

Add netlink support for "common" / variable-length / auto integers
which are carried at the message level as either 4B or 8B depending
on the exact value. This saves space and will hopefully decrease
the number of instances where we realize that we needed more bits
after uAPI is set is stone. It also loosens the alignment requirements,
avoiding the need for padding.

This mini-series is a fuller version of the previous RFC:
https://lore.kernel.org/netdev/20121204.130914.1457976839967676240.davem@davemloft.net/
No user included here. I have tested (and will use) it
in the upcoming page pool API but the assumption is that
it will be widely applicable. So sending without a user.

Jakub Kicinski (3):
  tools: ynl-gen: make the mnl_type() method public
  netlink: add variable-length / auto integers
  netlink: specs: add support for auto-sized scalars

 Documentation/netlink/genetlink-c.yaml        |  3 +-
 Documentation/netlink/genetlink-legacy.yaml   |  3 +-
 Documentation/netlink/genetlink.yaml          |  3 +-
 Documentation/userspace-api/netlink/specs.rst | 18 ++++-
 include/net/netlink.h                         | 69 ++++++++++++++++++-
 include/uapi/linux/netlink.h                  |  5 ++
 lib/nlattr.c                                  | 22 ++++++
 net/netlink/policy.c                          | 14 +++-
 tools/net/ynl/lib/nlspec.py                   |  6 ++
 tools/net/ynl/lib/ynl.c                       |  6 ++
 tools/net/ynl/lib/ynl.h                       | 17 +++++
 tools/net/ynl/lib/ynl.py                      | 14 ++++
 tools/net/ynl/ynl-gen-c.py                    | 44 ++++++------
 13 files changed, 192 insertions(+), 32 deletions(-)

-- 
2.41.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-10-20 22:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-18 21:39 [PATCH net-next 0/3] netlink: add variable-length / auto integers Jakub Kicinski
2023-10-18 21:39 ` [PATCH net-next 1/3] tools: ynl-gen: make the mnl_type() method public Jakub Kicinski
2023-10-18 21:39 ` [PATCH net-next 2/3] netlink: add variable-length / auto integers Jakub Kicinski
2023-10-20  7:24   ` Nicolas Dichtel
2023-10-18 21:39 ` [PATCH net-next 3/3] netlink: specs: add support for auto-sized scalars Jakub Kicinski
2023-10-20  7:44   ` Nicolas Dichtel
2023-10-20  7:24 ` [PATCH net-next 0/3] netlink: add variable-length / auto integers Nicolas Dichtel
2023-10-20 22:35 ` Jakub Kicinski

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).