From 79c3c9d61fd735151c6c4f6f59710680a96e6351 Mon Sep 17 00:00:00 2001 From: Pravin B Shelar Date: Tue, 28 Jul 2015 11:29:54 -0700 Subject: [PATCH] tunnel: Mark GRE64 tunnel protocol deprecated. GRE64 was introduced to extend GRE key from 32-bit to 64-bit using key and sequence number field. But GRE64 is not standard protocol. There are not many users of this protocol. Therefore we have decided to deprecate it. Since GRE64 is not in upstream OVS kernel module removing it will bring upstream and out-of-tree module closer. Signed-off-by: Pravin B Shelar Acked-by: Jesse Gross --- NEWS | 2 ++ datapath/vport-gre.c | 1 + lib/netdev-vport.c | 41 ++++++++++++++++++++++++++++------------- tests/ofproto-macros.at | 1 + vswitchd/vswitch.xml | 4 ++++ 5 files changed, 36 insertions(+), 13 deletions(-) diff --git a/NEWS b/NEWS index fdcc0c6e6..fc07fbf45 100644 --- a/NEWS +++ b/NEWS @@ -108,6 +108,8 @@ v2.4.0 - xx xxx xxxx how daemons will talk with syslog. - Support for "ovs-appctl vlog/list-pattern" command that lets to query logging message format for each destination. + - GRE64 and ipsec_gre64 tunnel protocol is deprecated and will be removed + from OVS v2.5 release. v2.3.0 - 14 Aug 2014 diff --git a/datapath/vport-gre.c b/datapath/vport-gre.c index 7bbcf579f..e9e995a89 100644 --- a/datapath/vport-gre.c +++ b/datapath/vport-gre.c @@ -330,6 +330,7 @@ static struct vport *gre64_create(const struct vport_parms *parms) struct vport *vport; int err; + pr_warn_once("GRE64 tunnel protocol is deprecated."); err = gre_init(); if (err) return ERR_PTR(err); diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c index ea9abf9e7..f7e2d024d 100644 --- a/lib/netdev-vport.c +++ b/lib/netdev-vport.c @@ -242,6 +242,13 @@ netdev_vport_alloc(void) return &netdev->up; } +static struct netdev * +netdev_gre64_vport_alloc(void) +{ + VLOG_WARN_ONCE("GRE64 tunnel protocol is deprecated. It will be removed from OVS release 2.5."); + return netdev_vport_alloc(); +} + static int netdev_vport_construct(struct netdev *netdev_) { @@ -1315,7 +1322,7 @@ netdev_vport_range(struct unixctl_conn *conn, int argc, } -#define VPORT_FUNCTIONS(GET_CONFIG, SET_CONFIG, \ +#define VPORT_FUNCTIONS(ALLOC, GET_CONFIG, SET_CONFIG, \ GET_TUNNEL_CONFIG, GET_STATUS, \ BUILD_HEADER, \ PUSH_HEADER, POP_HEADER) \ @@ -1323,7 +1330,7 @@ netdev_vport_range(struct unixctl_conn *conn, int argc, netdev_vport_run, \ netdev_vport_wait, \ \ - netdev_vport_alloc, \ + ALLOC, \ netdev_vport_construct, \ netdev_vport_destruct, \ netdev_vport_dealloc, \ @@ -1385,9 +1392,10 @@ netdev_vport_range(struct unixctl_conn *conn, int argc, NULL, /* rx_drain */ -#define TUNNEL_CLASS(NAME, DPIF_PORT, BUILD_HEADER, PUSH_HEADER, POP_HEADER) \ +#define TUNNEL_CLASS(NAME, DPIF_PORT, ALLOC, BUILD_HEADER, PUSH_HEADER, POP_HEADER) \ { DPIF_PORT, \ - { NAME, VPORT_FUNCTIONS(get_tunnel_config, \ + { NAME, VPORT_FUNCTIONS(ALLOC, \ + get_tunnel_config, \ set_tunnel_config, \ get_netdev_tunnel_config, \ tunnel_get_status, \ @@ -1399,20 +1407,26 @@ netdev_vport_tunnel_register(void) /* The name of the dpif_port should be short enough to accomodate adding * a port number to the end if one is necessary. */ static const struct vport_class vport_classes[] = { - TUNNEL_CLASS("geneve", "genev_sys", netdev_geneve_build_header, + TUNNEL_CLASS("geneve", "genev_sys", netdev_vport_alloc, + netdev_geneve_build_header, push_udp_header, netdev_geneve_pop_header), - TUNNEL_CLASS("gre", "gre_sys", netdev_gre_build_header, + TUNNEL_CLASS("gre", "gre_sys", netdev_vport_alloc, + netdev_gre_build_header, netdev_gre_push_header, netdev_gre_pop_header), - TUNNEL_CLASS("ipsec_gre", "gre_sys", NULL, NULL, NULL), - TUNNEL_CLASS("gre64", "gre64_sys", NULL, NULL, NULL), - TUNNEL_CLASS("ipsec_gre64", "gre64_sys", NULL, NULL, NULL), - TUNNEL_CLASS("vxlan", "vxlan_sys", netdev_vxlan_build_header, + TUNNEL_CLASS("ipsec_gre", "gre_sys", netdev_vport_alloc, + NULL, NULL, NULL), + TUNNEL_CLASS("gre64", "gre64_sys", netdev_gre64_vport_alloc, + NULL, NULL, NULL), + TUNNEL_CLASS("ipsec_gre64", "gre64_sys", netdev_gre64_vport_alloc, + NULL, NULL, NULL), + TUNNEL_CLASS("vxlan", "vxlan_sys", netdev_vport_alloc, + netdev_vxlan_build_header, push_udp_header, netdev_vxlan_pop_header), - TUNNEL_CLASS("lisp", "lisp_sys", NULL, NULL, NULL), - TUNNEL_CLASS("stt", "stt_sys", NULL, NULL, NULL), + TUNNEL_CLASS("lisp", "lisp_sys", netdev_vport_alloc, NULL, NULL, NULL), + TUNNEL_CLASS("stt", "stt_sys", netdev_vport_alloc, NULL, NULL, NULL), }; static struct ovsthread_once once = OVSTHREAD_ONCE_INITIALIZER; @@ -1435,7 +1449,8 @@ netdev_vport_patch_register(void) { static const struct vport_class patch_class = { NULL, - { "patch", VPORT_FUNCTIONS(get_patch_config, + { "patch", VPORT_FUNCTIONS(netdev_vport_alloc, + get_patch_config, set_patch_config, NULL, NULL, NULL, NULL, NULL) }}; diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at index 74b02b7e3..aa0948091 100644 --- a/tests/ofproto-macros.at +++ b/tests/ofproto-macros.at @@ -123,6 +123,7 @@ check_logs () { /timeval.*disk: [[0-9]]* reads, [[0-9]]* writes/d /timeval.*context switches: [[0-9]]* voluntary, [[0-9]]* involuntary/d /ovs_rcu.*blocked [[0-9]]* ms waiting for .* to quiesce/d +/netdev_vport.*GRE64 tunnel protocol is deprecated*/d /|WARN|/p /|ERR|/p /|EMER|/p" ovs-vswitchd.log ovsdb-server.log diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index c43bfd1a7..191dac78b 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -1850,6 +1850,8 @@
gre64
+ GRE64 tunnel protocol is deprecated and will be removed from OVS + v2.5 release. It is same as GRE, but it allows 64 bit key. To store higher 32-bits of key, it uses GRE protocol sequence number field. This is non standard use of GRE protocol since OVS does not increment @@ -1860,6 +1862,8 @@
ipsec_gre64
+ GRE64 tunnel protocol is deprecated and will be removed from OVS + v2.5 release. Same as IPSEC_GRE except 64 bit key.
-- 2.20.1