From c10de8c4445f6cc68fdd44abc2ab0074beabd022 Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Apr 05 2022 19:11:01 +0000 Subject: Import openvswitch2.13-2.13.0-172 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.13.0.patch b/SOURCES/openvswitch-2.13.0.patch index c68b0a9..bd33308 100644 --- a/SOURCES/openvswitch-2.13.0.patch +++ b/SOURCES/openvswitch-2.13.0.patch @@ -82459,7 +82459,7 @@ index 68c33a0f96..9b251f81fa 100644 * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c -index d393aab5e3..a73102ea98 100644 +index d393aab5e3..cf099658ad 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -83,9 +83,9 @@ @@ -83032,6 +83032,28 @@ index d393aab5e3..a73102ea98 100644 if (band_max_delta_t > meter->max_delta_t) { meter->max_delta_t = band_max_delta_t; } +@@ -6035,15 +6216,15 @@ static struct dp_netdev_pmd_thread * + dp_netdev_get_pmd(struct dp_netdev *dp, unsigned core_id) + { + struct dp_netdev_pmd_thread *pmd; +- const struct cmap_node *pnode; + +- pnode = cmap_find(&dp->poll_threads, hash_int(core_id, 0)); +- if (!pnode) { +- return NULL; ++ CMAP_FOR_EACH_WITH_HASH (pmd, node, hash_int(core_id, 0), ++ &dp->poll_threads) { ++ if (pmd->core_id == core_id) { ++ return dp_netdev_pmd_try_ref(pmd) ? pmd : NULL; ++ } + } +- pmd = CONTAINER_OF(pnode, struct dp_netdev_pmd_thread, node); + +- return dp_netdev_pmd_try_ref(pmd) ? pmd : NULL; ++ return NULL; + } + + /* Sets the 'struct dp_netdev_pmd_thread' for non-pmd threads. */ @@ -7800,6 +7981,7 @@ const struct dpif_class dpif_netdev_class = { NULL, /* ct_timeout_policy_dump_next */ NULL, /* ct_timeout_policy_dump_done */ @@ -88449,7 +88471,7 @@ index 114aff8ea3..0fc6d2ea60 100644 enum xc_type type; union { diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c -index 4407f9c97a..2ec1f4eb85 100644 +index 4407f9c97a..f269384429 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -460,7 +460,7 @@ static void xlate_commit_actions(struct xlate_ctx *ctx); @@ -88540,6 +88562,15 @@ index 4407f9c97a..2ec1f4eb85 100644 static struct xbundle * xbundle_lookup(struct xlate_cfg *xcfg, const struct ofbundle *ofbundle) { +@@ -2991,7 +3025,7 @@ xlate_normal(struct xlate_ctx *ctx) + bool is_grat_arp = is_gratuitous_arp(flow, wc); + if (ctx->xin->allow_side_effects + && flow->packet_type == htonl(PT_ETH) +- && in_port->pt_mode != NETDEV_PT_LEGACY_L3 ++ && in_port && in_port->pt_mode != NETDEV_PT_LEGACY_L3 + ) { + update_learning_table(ctx, in_xbundle, flow->dl_src, vlan, + is_grat_arp); @@ -3000,12 +3034,14 @@ xlate_normal(struct xlate_ctx *ctx) struct xc_entry *entry; @@ -91894,7 +91925,7 @@ index 4893280a99..a0487341c9 100644 bad_action 'fin_timeout(foo=bar)' "invalid key 'foo' in 'fin_timeout' argument" diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at -index ff1cc93707..70a4f6b8a6 100644 +index ff1cc93707..48bb50f259 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -4534,6 +4534,54 @@ recirc_id(0),in_port(90),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=6,fr @@ -91952,7 +91983,7 @@ index ff1cc93707..70a4f6b8a6 100644 AT_SETUP([ofproto-dpif - exit]) OVS_VSWITCHD_START add_of_ports br0 1 2 3 10 11 12 13 14 -@@ -5171,6 +5219,36 @@ AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: 2 +@@ -5171,6 +5219,65 @@ AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: 2 OVS_VSWITCHD_STOP AT_CLEANUP @@ -91982,14 +92013,43 @@ index ff1cc93707..70a4f6b8a6 100644 + echo "n_packets=$n" + test "$n" = 1 +} -+OVS_WAIT_UNTIL([check_flows], [ovs dump-flows br0]) ++OVS_WAIT_UNTIL([check_flows], [ovs-ofctl dump-flows br0]) ++ ++OVS_VSWITCHD_STOP ++AT_CLEANUP ++ ++# Checks for regression against a bug in which OVS crashed ++# with in_port=OFPP_NONE or in_port=OFPP_CONTROLLER and ++# recirculation is involved. ++AT_SETUP([ofproto-dpif - packet-out recirculation with OFPP_NONE and OFPP_CONTROLLER]) ++OVS_VSWITCHD_START ++add_of_ports br0 1 2 ++ ++AT_DATA([flows.txt], [dnl ++table=0 ip actions=mod_dl_dst:83:83:83:83:83:83,ct(table=1) ++table=1 ip actions=ct(commit),normal ++]) ++AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) ++ ++packet=ffffffffffff00102030405008004500001c00000000401100000a000002ffffffff0035111100080000 ++AT_CHECK([ovs-ofctl packet-out br0 "in_port=none,packet=$packet actions=table"]) ++AT_CHECK([ovs-ofctl packet-out br0 "in_port=controller,packet=$packet actions=table"]) ++ ++# Dumps out the flow table, extracts the number of packets that have gone ++# through the (single) flow in table 1, and returns success if it's exactly 2. ++check_flows () { ++ n=$(ovs-ofctl dump-flows br0 table=1 | sed -n 's/.*n_packets=\([[0-9]]\{1,\}\).*/\1/p') ++ echo "n_packets=$n" ++ test "$n" = 2 ++} ++OVS_WAIT_UNTIL([check_flows], [ovs-ofctl dump-flows br0]) + +OVS_VSWITCHD_STOP +AT_CLEANUP AT_SETUP([ofproto-dpif - debug_slow action]) OVS_VSWITCHD_START -@@ -7067,7 +7145,7 @@ dnl configure bridge IPFIX and ensure that sample action generation works at the +@@ -7067,7 +7174,7 @@ dnl configure bridge IPFIX and ensure that sample action generation works at the dnl datapath level. AT_SETUP([ofproto-dpif - Bridge IPFIX sanity check]) OVS_VSWITCHD_START @@ -91998,7 +92058,7 @@ index ff1cc93707..70a4f6b8a6 100644 dnl Sample every packet using bridge-based sampling. AT_CHECK([ovs-vsctl -- set bridge br0 ipfix=@fix -- \ -@@ -7083,6 +7161,28 @@ flow-dump from the main thread: +@@ -7083,6 +7190,28 @@ flow-dump from the main thread: packets:2, bytes:68, used:0.001s, actions:userspace(pid=0,ipfix(output_port=4294967295)) ]) @@ -92027,7 +92087,7 @@ index ff1cc93707..70a4f6b8a6 100644 AT_CHECK([ovs-appctl revalidator/purge]) dnl dnl Add a slowpath meter. The userspace action should be metered. -@@ -8134,6 +8234,34 @@ AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], +@@ -8134,6 +8263,34 @@ AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], OVS_VSWITCHD_STOP AT_CLEANUP @@ -92062,7 +92122,7 @@ index ff1cc93707..70a4f6b8a6 100644 dnl ---------------------------------------------------------------------- AT_BANNER([ofproto-dpif -- megaflows]) -@@ -8632,6 +8760,29 @@ recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(dst=50:54:00:00:00:0c),eth_ty +@@ -8632,6 +8789,29 @@ recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(dst=50:54:00:00:00:0c),eth_ty OVS_VSWITCHD_STOP AT_CLEANUP @@ -92092,7 +92152,7 @@ index ff1cc93707..70a4f6b8a6 100644 m4_define([OFPROTO_DPIF_MEGAFLOW_DISABLED], [AT_SETUP([ofproto-dpif megaflow - disabled$1]) OVS_VSWITCHD_START([], [], [], [m4_if([$1], [], [], [--dummy-numa="0,0,0,0,1,1,1,1"])]) -@@ -9215,6 +9366,26 @@ OFPST_TABLE reply (OF1.3) (xid=0x2): +@@ -9215,6 +9395,26 @@ OFPST_TABLE reply (OF1.3) (xid=0x2): OVS_VSWITCHD_STOP AT_CLEANUP @@ -92119,7 +92179,7 @@ index ff1cc93707..70a4f6b8a6 100644 AT_SETUP([ofproto-dpif - ICMPv6]) OVS_VSWITCHD_START add_of_ports br0 1 -@@ -10537,6 +10708,87 @@ dnl +@@ -10537,6 +10737,87 @@ dnl NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=106 in_port=2 (via action) data_len=106 (unbuffered) udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:0a,dl_dst=50:54:00:00:00:09,nw_src=10.1.1.2,nw_dst=10.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=2,tp_dst=1 udp_csum:553 ]) @@ -92207,7 +92267,7 @@ index ff1cc93707..70a4f6b8a6 100644 OVS_VSWITCHD_STOP AT_CLEANUP -@@ -10807,6 +11059,23 @@ Megaflow: recirc_id=0x3,eth,ip,in_port=1,nw_frag=no +@@ -10807,6 +11088,23 @@ Megaflow: recirc_id=0x3,eth,ip,in_port=1,nw_frag=no Datapath actions: 4 ]) diff --git a/SPECS/openvswitch2.13.spec b/SPECS/openvswitch2.13.spec index 1e52cae..e680a2c 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: 171%{?commit0:.%{date}git%{shortcommit0}}%{?commit1:dpdk%{shortcommit1}}%{?dist} +Release: 172%{?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 @@ -715,6 +715,13 @@ exit 0 %endif %changelog +* Tue Apr 05 2022 Open vSwitch CI - 2.13.0-172 +- Merging upstream branch-2.13 [RH git: c9fd039a8d] + Commit list: + 6919581c46 dpif-netdev: Fix dp_netdev_get_pmd() function getting correct core_id. + 9746203388 ofproto-dpif-xlate: Fix NULL pointer dereference in xlate_normal(). + + * Wed Mar 30 2022 Open vSwitch CI - 2.13.0-171 - Merging upstream branch-2.13 [RH git: 7763266297] Commit list: