Skip to content

netlink: add variable-length / auto integers

Jakub Kicinski netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3tools: ynl-gen: make the mnl_type() method publictools/net/ynl/ynl-gen-c.py+18 -200 replies
2/3netlink: add variable-length / auto integersDocumentation/userspace-api/netlink/specs.rst include/net/netlink.h include/uapi/linux/netlink.h +2 more+121 -71 reply
3/3netlink: specs: add support for auto-sized scalarsDocumentation/netlink/genetlink-c.yaml Documentation/netlink/genetlink-legacy.yaml Documentation/netlink/genetlink.yaml +5 more+53 -51 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchNicolas Dichtel
1/3
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/3] netlink: add variable-length / auto integers

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/[email protected]/
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(-)
Signature · 1 line
2.41.0