Commit 3924f72a authored by David S. Miller's avatar David S. Miller

Merge branch 'lwtunnel-add-ip-and-ip6-options-setting-and-dumping'

Xin Long says:

====================
lwtunnel: add ip and ip6 options setting and dumping

With this patchset, users can configure options by ip route encap
for geneve, vxlan and ersapn lwtunnel, like:

  # ip r a 1.1.1.0/24 encap ip id 1 geneve class 0 type 0 \
    data "1212121234567890" dst 10.1.0.2 dev geneve1

  # ip r a 1.1.1.0/24 encap ip id 1 vxlan gbp 456 \
    dst 10.1.0.2 dev erspan1

  # ip r a 1.1.1.0/24 encap ip id 1 erspan ver 1 idx 123 \
    dst 10.1.0.2 dev erspan1

iproute side patch is attached on the reply of this mail.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 426071f1 b0a21810
...@@ -27,6 +27,7 @@ enum lwtunnel_ip_t { ...@@ -27,6 +27,7 @@ enum lwtunnel_ip_t {
LWTUNNEL_IP_TOS, LWTUNNEL_IP_TOS,
LWTUNNEL_IP_FLAGS, LWTUNNEL_IP_FLAGS,
LWTUNNEL_IP_PAD, LWTUNNEL_IP_PAD,
LWTUNNEL_IP_OPTS,
__LWTUNNEL_IP_MAX, __LWTUNNEL_IP_MAX,
}; };
...@@ -41,11 +42,51 @@ enum lwtunnel_ip6_t { ...@@ -41,11 +42,51 @@ enum lwtunnel_ip6_t {
LWTUNNEL_IP6_TC, LWTUNNEL_IP6_TC,
LWTUNNEL_IP6_FLAGS, LWTUNNEL_IP6_FLAGS,
LWTUNNEL_IP6_PAD, LWTUNNEL_IP6_PAD,
LWTUNNEL_IP6_OPTS,
__LWTUNNEL_IP6_MAX, __LWTUNNEL_IP6_MAX,
}; };
#define LWTUNNEL_IP6_MAX (__LWTUNNEL_IP6_MAX - 1) #define LWTUNNEL_IP6_MAX (__LWTUNNEL_IP6_MAX - 1)
enum {
LWTUNNEL_IP_OPTS_UNSPEC,
LWTUNNEL_IP_OPTS_GENEVE,
LWTUNNEL_IP_OPTS_VXLAN,
LWTUNNEL_IP_OPTS_ERSPAN,
__LWTUNNEL_IP_OPTS_MAX,
};
#define LWTUNNEL_IP_OPTS_MAX (__LWTUNNEL_IP_OPTS_MAX - 1)
enum {
LWTUNNEL_IP_OPT_GENEVE_UNSPEC,
LWTUNNEL_IP_OPT_GENEVE_CLASS,
LWTUNNEL_IP_OPT_GENEVE_TYPE,
LWTUNNEL_IP_OPT_GENEVE_DATA,
__LWTUNNEL_IP_OPT_GENEVE_MAX,
};
#define LWTUNNEL_IP_OPT_GENEVE_MAX (__LWTUNNEL_IP_OPT_GENEVE_MAX - 1)
enum {
LWTUNNEL_IP_OPT_VXLAN_UNSPEC,
LWTUNNEL_IP_OPT_VXLAN_GBP,
__LWTUNNEL_IP_OPT_VXLAN_MAX,
};
#define LWTUNNEL_IP_OPT_VXLAN_MAX (__LWTUNNEL_IP_OPT_VXLAN_MAX - 1)
enum {
LWTUNNEL_IP_OPT_ERSPAN_UNSPEC,
LWTUNNEL_IP_OPT_ERSPAN_VER,
LWTUNNEL_IP_OPT_ERSPAN_INDEX,
LWTUNNEL_IP_OPT_ERSPAN_DIR,
LWTUNNEL_IP_OPT_ERSPAN_HWID,
__LWTUNNEL_IP_OPT_ERSPAN_MAX,
};
#define LWTUNNEL_IP_OPT_ERSPAN_MAX (__LWTUNNEL_IP_OPT_ERSPAN_MAX - 1)
enum { enum {
LWT_BPF_PROG_UNSPEC, LWT_BPF_PROG_UNSPEC,
LWT_BPF_PROG_FD, LWT_BPF_PROG_FD,
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment