From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next 0/3] netlink: add variable-length / auto integers
Date: Wed, 18 Oct 2023 14:39:18 -0700 [thread overview]
Message-ID: <20231018213921.2694459-1-kuba@kernel.org> (raw)
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
next reply other threads:[~2023-10-18 21:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-18 21:39 Jakub Kicinski [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231018213921.2694459-1-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).