[ovs-dev] [PATCH] vswitchd: Separate disable system and route.

William Tu u9012063 at gmail.com
Tue Jun 25 21:52:38 UTC 2019


Previously, '--disable-system' disables both system dp and the system
routing table.  The patch makes '--disable-system' only disable system
dp and adds '--disable-system-route' for disabling the route table.
This fixes failures when 'make check-system-userspace' for tunnel cases.

As a consequence, hitting errors due to OVS userspace parses the IGMP packet
but its datapaths do not, so odp_flow_key_to_flow() return ODP_FIT_TOO_LITTLE.
commit c645550bb249 ("odp-util: Always report ODP_FIT_TOO_LITTLE for IGMP.")
Fix it by filtering out the IGMP-related error message.

Signed-off-by: William Tu <u9012063 at gmail.com>
Signed-off-by: Yi-Hung Wei <yihung.wei at gmail.com>
Co-authored-by: Yi-Hung Wei <yihung.wei at gmail.com>
---
 tests/ofproto-macros.at          | 2 +-
 tests/system-userspace-macros.at | 4 +++-
 vswitchd/ovs-vswitchd.c          | 5 +++++
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at
index 807ae025d763..db0cd5108fd4 100644
--- a/tests/ofproto-macros.at
+++ b/tests/ofproto-macros.at
@@ -195,7 +195,7 @@ m4_define([_OVS_VSWITCHD_START],
 # 'vswitchd-aux-args' provides a way to pass extra command line arguments
 # to ovs-vswitchd
 m4_define([OVS_VSWITCHD_START],
-  [_OVS_VSWITCHD_START([--enable-dummy$3 --disable-system $4])
+  [_OVS_VSWITCHD_START([--enable-dummy$3 --disable-system --disable-system-route $4])
    AT_CHECK([add_of_br 0 $1 m4_if([$2], [], [], [| uuidfilt])], [0], [$2])
 ])
 
diff --git a/tests/system-userspace-macros.at b/tests/system-userspace-macros.at
index 92ffbf6d503f..9d5f3bf419d3 100644
--- a/tests/system-userspace-macros.at
+++ b/tests/system-userspace-macros.at
@@ -36,7 +36,9 @@ m4_define([OVS_TRAFFIC_VSWITCHD_START],
 m4_define([OVS_TRAFFIC_VSWITCHD_STOP],
   [OVS_VSWITCHD_STOP([dnl
 $1";/netdev_linux.*obtaining netdev stats via vport failed/d
-/dpif_netlink.*Generic Netlink family 'ovs_datapath' does not exist. The Open vSwitch kernel module is probably not loaded./d"])
+/dpif_netlink.*Generic Netlink family 'ovs_datapath' does not exist. The Open vSwitch kernel module is probably not loaded./d
+/dpif_netdev(revalidator.*)|ERR|internal error parsing flow key.*proto=2.*/d
+/dpif(revalidator.*)|WARN|netdev at ovs-netdev: failed to.*proto=2.*/d"])
    AT_CHECK([:; $2])
   ])
 
diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c
index 4ee23ca435e9..1e72b628b1bd 100644
--- a/vswitchd/ovs-vswitchd.c
+++ b/vswitchd/ovs-vswitchd.c
@@ -161,6 +161,7 @@ parse_options(int argc, char *argv[], char **unixctl_pathp)
         OPT_BOOTSTRAP_CA_CERT,
         OPT_ENABLE_DUMMY,
         OPT_DISABLE_SYSTEM,
+        OPT_DISABLE_SYSTEM_ROUTE,
         DAEMON_OPTION_ENUMS,
         OPT_DPDK,
         SSL_OPTION_ENUMS,
@@ -178,6 +179,7 @@ parse_options(int argc, char *argv[], char **unixctl_pathp)
         {"bootstrap-ca-cert", required_argument, NULL, OPT_BOOTSTRAP_CA_CERT},
         {"enable-dummy", optional_argument, NULL, OPT_ENABLE_DUMMY},
         {"disable-system", no_argument, NULL, OPT_DISABLE_SYSTEM},
+        {"disable-system-route", no_argument, NULL, OPT_DISABLE_SYSTEM_ROUTE},
         {"dpdk", optional_argument, NULL, OPT_DPDK},
         {"dummy-numa", required_argument, NULL, OPT_DUMMY_NUMA},
         {NULL, 0, NULL, 0},
@@ -227,6 +229,9 @@ parse_options(int argc, char *argv[], char **unixctl_pathp)
 
         case OPT_DISABLE_SYSTEM:
             dp_blacklist_provider("system");
+            break;
+
+        case OPT_DISABLE_SYSTEM_ROUTE:
             ovs_router_disable_system_routing_table();
             break;
 
-- 
2.7.4



More information about the dev mailing list