lwtunnel: add options setting and dumping for geneve
authorXin Long <lucien.xin@gmail.com>
Wed, 6 Nov 2019 09:01:05 +0000 (17:01 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Nov 2019 05:14:21 +0000 (21:14 -0800)
commit4ece477870774698e6e73d5821a3dd1605ca123b
tree75615976d944899d7636050fc106391f153f2f43
parent0eb8eb2f96851e49d54c301aa3b0672706e6b171
lwtunnel: add options setting and dumping for geneve

To add options setting and dumping, .build_state(), .fill_encap() and
.get_encap_size() in ip_tun_lwt_ops needs to be extended:

ip_tun_build_state():
  ip_tun_parse_opts():
    ip_tun_parse_opts_geneve()

ip_tun_fill_encap_info():
  ip_tun_fill_encap_opts():
    ip_tun_fill_encap_opts_geneve()

ip_tun_encap_nlsize()
   ip_tun_opts_nlsize():
     if (tun_flags & TUNNEL_GENEVE_OPT)

ip_tun_parse_opts(), ip_tun_fill_encap_opts() and ip_tun_opts_nlsize()
processes LWTUNNEL_IP_OPTS.

ip_tun_parse_opts_geneve(), ip_tun_fill_encap_opts_geneve() and
if (tun_flags & TUNNEL_GENEVE_OPT) processes LWTUNNEL_IP_OPTS_GENEVE.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/lwtunnel.h
net/ipv4/ip_tunnel_core.c