ip_tunnels, bpf: define IP_TUNNEL_OPTS_MAX and use it
eBPF defines this as BPF_TUNLEN_MAX and OVS just uses the hard-coded value inside struct sw_flow_key. Thus, add and use IP_TUNNEL_OPTS_MAX for this, which makes the code a bit more generic and allows to remove BPF_TUNLEN_MAX from eBPF code. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
808c1b697c
commit
fca5fdf67d
@@ -55,7 +55,7 @@ struct ovs_tunnel_info {
|
||||
FIELD_SIZEOF(struct sw_flow_key, recirc_id))
|
||||
|
||||
struct sw_flow_key {
|
||||
u8 tun_opts[255];
|
||||
u8 tun_opts[IP_TUNNEL_OPTS_MAX];
|
||||
u8 tun_opts_len;
|
||||
struct ip_tunnel_key tun_key; /* Encapsulating tunnel key. */
|
||||
struct {
|
||||
|
Reference in New Issue
Block a user