diff options
| author | David S. Miller <davem@davemloft.net> | 2023-10-20 13:43:36 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2023-10-20 13:43:36 +0300 |
| commit | fd533a7ac7c2ab78a226121d0388d8cd8546dc52 (patch) | |
| tree | 7551ed1e2bbdcf071275ec67142a156190dfcd3f /include/uapi | |
| parent | a10f9bfe935dd49d09e1c284a73bcd322de12917 (diff) | |
| parent | 7d4caf54d2e8df2ed52240fe339adb13372c6251 (diff) | |
| download | linux-fd533a7ac7c2ab78a226121d0388d8cd8546dc52.tar.xz | |
Merge branch 'netlink-auto-integers'
Jakub Kicinski says:
====================
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/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.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi')
| -rw-r--r-- | include/uapi/linux/netlink.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h index e2ae82e3f9f7..f87aaf28a649 100644 --- a/include/uapi/linux/netlink.h +++ b/include/uapi/linux/netlink.h @@ -298,6 +298,8 @@ struct nla_bitfield32 { * entry has attributes again, the policy for those inner ones * and the corresponding maxtype may be specified. * @NL_ATTR_TYPE_BITFIELD32: &struct nla_bitfield32 attribute + * @NL_ATTR_TYPE_SINT: 32-bit or 64-bit signed attribute, aligned to 4B + * @NL_ATTR_TYPE_UINT: 32-bit or 64-bit unsigned attribute, aligned to 4B */ enum netlink_attribute_type { NL_ATTR_TYPE_INVALID, @@ -322,6 +324,9 @@ enum netlink_attribute_type { NL_ATTR_TYPE_NESTED_ARRAY, NL_ATTR_TYPE_BITFIELD32, + + NL_ATTR_TYPE_SINT, + NL_ATTR_TYPE_UINT, }; /** |
