mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
netlink: specs: rt-route: describe lwtunnel IP options
Replace binary opts in lwtunnel-ip and lwtunnel-ip6 with a nested lwtunnel-ip-opts set. Add attribute sets for geneve, vxlan, and erspan IP options to match linux/lwtunnel.h. Note the kernel encodes LWTUNNEL_IP_OPTS_GENEVE differently for requests vs dumps. On the request path, the kernel iterates and reads one CLASS/TYPE/DATA triplet per geneve option. On the dump path, the kernel opens only one nested geneve option and writes a CLASS/TYPE/DATA triplet for every option within it. Before there is a proper way to handle it, I will just omit geneve options and use binary for it. Signed-off-by: Hangbin Liu <liuhangbin@kylinos.cn> Link: https://patch.msgid.link/20261008-ynl_rt_encap-v4-4-4ed2ccf7f949@kylinos.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
24d11a5586
commit
e32b5eb4f2
|
|
@ -377,7 +377,8 @@ attribute-sets:
|
|||
type: pad
|
||||
-
|
||||
name: opts
|
||||
type: binary # lwtunnel ip nest options
|
||||
type: nest
|
||||
nested-attributes: lwtunnel-ip-opts
|
||||
-
|
||||
name: ila-attrs
|
||||
name-prefix: ila-attr-
|
||||
|
|
@ -444,7 +445,8 @@ attribute-sets:
|
|||
type: pad
|
||||
-
|
||||
name: opts
|
||||
type: binary # lwtunnel ip nest options
|
||||
type: nest
|
||||
nested-attributes: lwtunnel-ip-opts
|
||||
-
|
||||
name: seg6-iptunnel
|
||||
name-prefix: seg6-iptunnel-
|
||||
|
|
@ -562,6 +564,45 @@ attribute-sets:
|
|||
-
|
||||
name: link
|
||||
type: u32
|
||||
-
|
||||
name: lwtunnel-ip-opts
|
||||
name-prefix: lwtunnel-ip-opts-
|
||||
attributes:
|
||||
-
|
||||
name: geneve
|
||||
type: binary
|
||||
-
|
||||
name: vxlan
|
||||
type: nest
|
||||
nested-attributes: lwtunnel-ip-opt-vxlan
|
||||
-
|
||||
name: erspan
|
||||
type: nest
|
||||
nested-attributes: lwtunnel-ip-opt-erspan
|
||||
-
|
||||
name: lwtunnel-ip-opt-vxlan
|
||||
name-prefix: lwtunnel-ip-opt-vxlan-
|
||||
attributes:
|
||||
-
|
||||
name: gbp
|
||||
type: u32
|
||||
-
|
||||
name: lwtunnel-ip-opt-erspan
|
||||
name-prefix: lwtunnel-ip-opt-erspan-
|
||||
attributes:
|
||||
-
|
||||
name: ver
|
||||
type: u8
|
||||
-
|
||||
name: index
|
||||
type: u32
|
||||
byte-order: big-endian
|
||||
-
|
||||
name: dir
|
||||
type: u8
|
||||
-
|
||||
name: hwid
|
||||
type: u8
|
||||
|
||||
operations:
|
||||
enum-model: directional
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user