[ovs-dev] [PATCH 1/3] Revert "dpif: Ensure ERSPAN GRE support"

Greg Rose gvrose8192 at gmail.com
Mon Jun 4 20:14:36 UTC 2018


This reverts commit 8929c55287abae37efeac1e8876e6b3c2ccad0b9.

This is the wrong direction for the solution to the ip_gre/gre kernel
module conflicts.

Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
---
 lib/dpif-netlink-rtnl.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/dpif-netlink-rtnl.c b/lib/dpif-netlink-rtnl.c
index 197cfb6..bec3fce 100644
--- a/lib/dpif-netlink-rtnl.c
+++ b/lib/dpif-netlink-rtnl.c
@@ -45,8 +45,8 @@ VLOG_DEFINE_THIS_MODULE(dpif_netlink_rtnl);
 #ifndef IFLA_GRE_MAX
 #define IFLA_GRE_MAX 0
 #endif
-#if IFLA_GRE_MAX < 24
-#define IFLA_GRE_ERSPAN_HWID 24
+#if IFLA_GRE_MAX < 18
+#define IFLA_GRE_COLLECT_METADATA 18
 #endif
 
 #ifndef IFLA_GENEVE_MAX
@@ -74,7 +74,7 @@ static const struct nl_policy vxlan_policy[] = {
     [IFLA_VXLAN_GPE] = { .type = NL_A_FLAG, .optional = true },
 };
 static const struct nl_policy gre_policy[] = {
-    [IFLA_GRE_ERSPAN_HWID] = { .type = NL_A_U16 },
+    [IFLA_GRE_COLLECT_METADATA] = { .type = NL_A_FLAG },
 };
 static const struct nl_policy geneve_policy[] = {
     [IFLA_GENEVE_COLLECT_METADATA] = { .type = NL_A_FLAG },
@@ -207,7 +207,7 @@ dpif_netlink_rtnl_gre_verify(const struct netdev_tunnel_config OVS_UNUSED *tnl,
     err = rtnl_policy_parse(kind, reply, gre_policy, gre,
                             ARRAY_SIZE(gre_policy));
     if (!err) {
-        if (!nl_attr_get_u16(gre[IFLA_GRE_ERSPAN_HWID])) {
+        if (!nl_attr_get_flag(gre[IFLA_GRE_COLLECT_METADATA])) {
             err = EINVAL;
         }
     }
@@ -328,7 +328,7 @@ dpif_netlink_rtnl_create(const struct netdev_tunnel_config *tnl_cfg,
     case OVS_VPORT_TYPE_ERSPAN:
     case OVS_VPORT_TYPE_IP6ERSPAN:
     case OVS_VPORT_TYPE_IP6GRE:
-        nl_msg_put_u16(&request, IFLA_GRE_ERSPAN_HWID, 0xdead);
+        nl_msg_put_flag(&request, IFLA_GRE_COLLECT_METADATA);
         break;
     case OVS_VPORT_TYPE_GENEVE:
         nl_msg_put_flag(&request, IFLA_GENEVE_COLLECT_METADATA);
-- 
1.8.3.1



More information about the dev mailing list