Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vxlan: expose COLLECT_METADATA flag to user space

Two vxlan driver flags FLOWBASED and COLLECT_METADATA need to be set to
make use of its new flow mode. The former already exposed. Expose the latter.

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Alexei Starovoitov and committed by
David S. Miller
f8a9b1bc 7576012e

+6
+5
drivers/net/vxlan.c
··· 2463 2463 [IFLA_VXLAN_L2MISS] = { .type = NLA_U8 }, 2464 2464 [IFLA_VXLAN_L3MISS] = { .type = NLA_U8 }, 2465 2465 [IFLA_VXLAN_FLOWBASED] = { .type = NLA_U8 }, 2466 + [IFLA_VXLAN_COLLECT_METADATA] = { .type = NLA_U8 }, 2466 2467 [IFLA_VXLAN_PORT] = { .type = NLA_U16 }, 2467 2468 [IFLA_VXLAN_UDP_CSUM] = { .type = NLA_U8 }, 2468 2469 [IFLA_VXLAN_UDP_ZERO_CSUM6_TX] = { .type = NLA_U8 }, ··· 2817 2816 if (data[IFLA_VXLAN_FLOWBASED] && 2818 2817 nla_get_u8(data[IFLA_VXLAN_FLOWBASED])) 2819 2818 conf.flags |= VXLAN_F_FLOW_BASED; 2819 + 2820 + if (data[IFLA_VXLAN_COLLECT_METADATA] && 2821 + nla_get_u8(data[IFLA_VXLAN_COLLECT_METADATA])) 2822 + conf.flags |= VXLAN_F_COLLECT_METADATA; 2820 2823 2821 2824 if (data[IFLA_VXLAN_PORT_RANGE]) { 2822 2825 const struct ifla_vxlan_port_range *p
+1
include/uapi/linux/if_link.h
··· 383 383 IFLA_VXLAN_GBP, 384 384 IFLA_VXLAN_REMCSUM_NOPARTIAL, 385 385 IFLA_VXLAN_FLOWBASED, 386 + IFLA_VXLAN_COLLECT_METADATA, 386 387 __IFLA_VXLAN_MAX 387 388 }; 388 389 #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)