]> www.infradead.org Git - users/jedix/linux-maple.git/commit
vxlan: Track reserved bits explicitly as part of the configuration
authorPetr Machata <petrm@nvidia.com>
Thu, 5 Dec 2024 15:40:54 +0000 (16:40 +0100)
committerJakub Kicinski <kuba@kernel.org>
Mon, 9 Dec 2024 22:47:04 +0000 (14:47 -0800)
commite4f8647767cfac0291def86ddfac23b925294701
tree89592f67ef24fb96334587fd75ad6f107b943a80
parente713130dfb4d6b5a2cd42f33a94b6ac983d2989d
vxlan: Track reserved bits explicitly as part of the configuration

In order to make it possible to configure which bits in VXLAN header should
be considered reserved, introduce a new field vxlan_config::reserved_bits.
Have it cover the whole header, except for the VNI-present bit and the bits
for VNI itself, and have individual enabled features clear more bits off
reserved_bits.

(This is expressed as first constructing a used_bits set, and then
inverting it to get the reserved_bits. The set of used_bits will be useful
on its own for validation of user-set reserved_bits in a following patch.)

The patch also moves a comment relevant to the validation from the unparsed
validation site up to the new site. Logically this patch should add the new
comment, and a later patch that removes the unparsed bits would remove the
old comment. But keeping both legs in the same patch is better from the
history spelunking point of view.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://patch.msgid.link/984dbf98d5940d3900268dbffaf70961f731d4a4.1733412063.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/vxlan/vxlan_core.c
include/net/vxlan.h