From 4c4c9cd5aeb052555c0c99c9e0ec7935c2c990ba Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Apr 14 2021 19:41:26 +0000 Subject: Import openvswitch2.13-2.13.0-105 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.13.0.patch b/SOURCES/openvswitch-2.13.0.patch index 4892042..123143a 100644 --- a/SOURCES/openvswitch-2.13.0.patch +++ b/SOURCES/openvswitch-2.13.0.patch @@ -81740,7 +81740,7 @@ index 6187129c00..f080dec61f 100644 err = rte_vhost_driver_start(dev->vhost_id); diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c -index c6f3d27409..177261f96b 100644 +index c6f3d27409..2d2ce1a686 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -231,6 +231,14 @@ struct rtnl_link_stats64 { @@ -81828,6 +81828,15 @@ index c6f3d27409..177261f96b 100644 } do { +@@ -2562,7 +2571,7 @@ exit: + static struct tc_police + tc_matchall_fill_police(uint32_t kbits_rate, uint32_t kbits_burst) + { +- unsigned int bsize = MIN(UINT32_MAX / 1024, kbits_burst) * 1024 / 64; ++ unsigned int bsize = MIN(UINT32_MAX / 1024, kbits_burst) * 1024 / 8; + unsigned int bps = ((uint64_t) kbits_rate * 1000) / 8; + struct tc_police police; + struct tc_ratespec rate; diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c index f8c46bbaad..b42d314b65 100644 --- a/lib/netdev-offload-dpdk.c @@ -85391,6 +85400,20 @@ index 2adaf231fe..beb0ab0d66 100644 allow openvswitch_load_module_t modules_object_t:file { map getattr open read }; allow openvswitch_load_module_t modules_object_t:dir { getattr open read search }; allow openvswitch_load_module_t openvswitch_load_module_exec_t:file { entrypoint }; +diff --git a/tests/atlocal.in b/tests/atlocal.in +index 1dc7cd5d08..7e0b91a800 100644 +--- a/tests/atlocal.in ++++ b/tests/atlocal.in +@@ -165,6 +165,9 @@ find_command() + # Set HAVE_NC + find_command nc + ++# Set HAVE_TC ++find_command tc ++ + # Determine correct netcat option to quit on stdin EOF + if nc --version 2>&1 | grep -q nmap.org; then + # Nmap netcat diff --git a/tests/automake.mk b/tests/automake.mk index 9c7ebdce9b..d51d175f40 100644 --- a/tests/automake.mk @@ -86033,7 +86056,7 @@ index c8062c8acc..9466a8cc43 100644 NXT_FLOW_MOD: ADD table:255 ip actions=ct(commit,exec(load:0x1->NXM_NX_CT_MARK[])) NXT_FLOW_MOD: ADD table:255 ip actions=ct(commit,exec(load:0x1->NXM_NX_CT_LABEL[0..63],load:0->NXM_NX_CT_LABEL[64..127])) diff --git a/tests/ovs-vsctl.at b/tests/ovs-vsctl.at -index 55c7a6e179..c8babe3612 100644 +index 55c7a6e179..1f1fc3c79a 100644 --- a/tests/ovs-vsctl.at +++ b/tests/ovs-vsctl.at @@ -966,6 +966,14 @@ AT_CHECK([RUN_OVS_VSCTL([--if-exists del-zone-tp netdev zone=1])]) @@ -86051,6 +86074,33 @@ index 55c7a6e179..c8babe3612 100644 AT_CHECK([RUN_OVS_VSCTL([-- --id=@m create Datapath datapath_version=0 'capabilities={recirc=true}' -- set Open_vSwitch . datapaths:"system"=@m])], [0], [stdout]) AT_CHECK([RUN_OVS_VSCTL([list-dp-cap system])], [0], [recirc=true ]) +@@ -1631,3 +1639,26 @@ AT_CHECK([grep "server name" ovsdb-server.log], [0], + + OVS_VSCTL_CLEANUP + AT_CLEANUP ++ ++dnl ---------------------------------------------------------------------- ++AT_BANNER([set ingress policing test]) ++ ++AT_SETUP([set ingress_policing_rate and ingress_policing_burst]) ++AT_KEYWORDS([ingress_policing]) ++OVS_VSCTL_SETUP ++AT_CHECK([RUN_OVS_VSCTL_TOGETHER( ++ [add-br a], ++ [add-port a a1], ++ [set interface a1 ingress_policing_rate=100], ++ [set interface a1 ingress_policing_burst=10], ++ [--columns=ingress_policing_burst,ingress_policing_rate list interface a1])], ++ [0], ++ [ ++ ++ ++ ++ingress_policing_burst: 10 ++ingress_policing_rate: 100 ++]) ++OVS_VSCTL_CLEANUP ++AT_CLEANUP diff --git a/tests/ovsdb-client.at b/tests/ovsdb-client.at index 8d777a0275..5e3b26aea8 100644 --- a/tests/ovsdb-client.at @@ -87677,6 +87727,64 @@ index 68c8774d1a..9d5e24a292 100644 # OVS_CHECK_VXLAN() # # Do basic check for vxlan functionality, skip the test if it's not there. +diff --git a/tests/system-offloads-traffic.at b/tests/system-offloads-traffic.at +index 379a8a5e92..bfad66e051 100644 +--- a/tests/system-offloads-traffic.at ++++ b/tests/system-offloads-traffic.at +@@ -66,3 +66,53 @@ in_port(3),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:9, bytes:756, used: + + OVS_TRAFFIC_VSWITCHD_STOP + AT_CLEANUP ++ ++AT_SETUP([offloads - set ingress_policing_rate and ingress_policing_burst - offloads disabled]) ++AT_KEYWORDS([ingress_policing]) ++AT_SKIP_IF([test $HAVE_TC = "no"]) ++OVS_TRAFFIC_VSWITCHD_START() ++AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:hw-offload=false]) ++AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"]) ++ADD_NAMESPACES(at_ns0) ++ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24") ++AT_CHECK([ovs-vsctl set interface ovs-p0 ingress_policing_rate=100]) ++AT_CHECK([ovs-vsctl set interface ovs-p0 ingress_policing_burst=10]) ++AT_CHECK([ovs-vsctl --columns=other_config list open], [0], [dnl ++other_config : {hw-offload="false"} ++]) ++AT_CHECK([tc -o -s -d filter show dev ovs-p0 ingress | ++ sed -n 's/.*\(rate [[0-9]]*[[a-zA-Z]]* burst [[0-9]]*[[a-zA-Z]]*\).*/\1/; T; p; q'], ++ [0],[dnl ++rate 100Kbit burst 1280b ++]) ++AT_CHECK([tc -s -d filter show dev ovs-p0 ingress | grep basic | ++ sed -n 's/.*\(basic\).*/\1/; T; p; q'], [0], [dnl ++basic ++]) ++OVS_TRAFFIC_VSWITCHD_STOP ++AT_CLEANUP ++ ++AT_SETUP([offloads - set ingress_policing_rate and ingress_policing_burst - offloads enabled]) ++AT_KEYWORDS([ingress_policing]) ++AT_SKIP_IF([test $HAVE_TC = "no"]) ++OVS_TRAFFIC_VSWITCHD_START() ++AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:hw-offload=true]) ++AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"]) ++ADD_NAMESPACES(at_ns0) ++ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24") ++AT_CHECK([ovs-vsctl set interface ovs-p0 ingress_policing_rate=100]) ++AT_CHECK([ovs-vsctl set interface ovs-p0 ingress_policing_burst=10]) ++AT_CHECK([ovs-vsctl --columns=other_config list open], [0], [dnl ++other_config : {hw-offload="true"} ++]) ++AT_CHECK([tc -o -s -d filter show dev ovs-p0 ingress | ++ sed -n 's/.*\(rate [[0-9]]*[[a-zA-Z]]* burst [[0-9]]*[[a-zA-Z]]*\).*/\1/; T; p; q'], ++ [0],[dnl ++rate 100Kbit burst 1280b ++]) ++AT_CHECK([tc -o -s -d filter show dev ovs-p0 ingress | grep matchall | ++ sed -n 's/.*\(matchall\).*/\1/; T; p; q'], [0], [dnl ++matchall ++]) ++OVS_TRAFFIC_VSWITCHD_STOP ++AT_CLEANUP diff --git a/tests/system-route.at b/tests/system-route.at new file mode 100644 index 0000000000..1714273e35 diff --git a/SPECS/openvswitch2.13.spec b/SPECS/openvswitch2.13.spec index 6b55949..fa413e9 100644 --- a/SPECS/openvswitch2.13.spec +++ b/SPECS/openvswitch2.13.spec @@ -59,7 +59,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.13.0 -Release: 104%{?commit0:.%{date}git%{shortcommit0}}%{?commit1:dpdk%{shortcommit1}}%{?dist} +Release: 105%{?commit0:.%{date}git%{shortcommit0}}%{?commit1:dpdk%{shortcommit1}}%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -710,6 +710,10 @@ exit 0 %endif %changelog +* Wed Apr 14 2021 Open vSwitch CI - 2.13.0-105 +- Merging upstream branch-2.13 + [0aaf7c02b702ebd002e5936868dd117706c505b4] + * Fri Apr 09 2021 Open vSwitch CI - 2.13.0-104 - Merging upstream branch-2.13 [1334a398c9b34857cb1e2939b3aaa56277064d46]