From bda466eba284361c95b519a8b667254111f1e4ab Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Nov 18 2021 22:19:17 +0000 Subject: Import openvswitch2.16-2.16.0-32 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.16.0.patch b/SOURCES/openvswitch-2.16.0.patch index a1ce8d0..a2b6e28 100644 --- a/SOURCES/openvswitch-2.16.0.patch +++ b/SOURCES/openvswitch-2.16.0.patch @@ -1848,7 +1848,7 @@ index b30a11c24b..41835f6f4d 100644 } diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c -index a426fcfeb6..1bab22aa5e 100644 +index a426fcfeb6..970f78bb52 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -6177,11 +6177,32 @@ static void @@ -1899,6 +1899,53 @@ index a426fcfeb6..1bab22aa5e 100644 ct_offset = nl_msg_start_nested(ctx->odp_actions, OVS_ACTION_ATTR_CT); if (ofc->flags & NX_CT_F_COMMIT) { +@@ -6333,6 +6349,7 @@ xlate_check_pkt_larger(struct xlate_ctx *ctx, + * then ctx->exit would be true. Reset to false so that we can + * do flow translation for 'IF_LESS_EQUAL' case. finish_freezing() + * would have taken care of Undoing the changes done for freeze. */ ++ bool old_exit = ctx->exit; + ctx->exit = false; + + offset_attr = nl_msg_start_nested( +@@ -6357,7 +6374,7 @@ xlate_check_pkt_larger(struct xlate_ctx *ctx, + ctx->was_mpls = old_was_mpls; + ctx->conntracked = old_conntracked; + ctx->xin->flow = old_flow; +- ctx->exit = true; ++ ctx->exit = old_exit; + } + + static void +@@ -6738,6 +6755,7 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, + return; + } + ++ bool exit = false; + OFPACT_FOR_EACH (a, ofpacts, ofpacts_len) { + struct ofpact_controller *controller; + const struct ofpact_metadata *metadata; +@@ -6752,7 +6770,7 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, + + recirc_for_mpls(a, ctx); + +- if (ctx->exit) { ++ if (ctx->exit || exit) { + /* Check if need to store the remaining actions for later + * execution. */ + if (ctx->freezing) { +@@ -7160,6 +7178,12 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, + ofpacts_len); + xlate_check_pkt_larger(ctx, ofpact_get_CHECK_PKT_LARGER(a), + remaining_acts, remaining_acts_len); ++ if (ctx->xbridge->support.check_pkt_len) { ++ /* If datapath supports check_pkt_len, then ++ * xlate_check_pkt_larger() does the translation for the ++ * ofpacts following 'a'. */ ++ exit = true; ++ } + break; + } + } diff --git a/ovsdb/file.c b/ovsdb/file.c index 59220824fa..9f44007d97 100644 --- a/ovsdb/file.c @@ -4046,7 +4093,7 @@ index f5a520862c..ac5b0fd0c6 100644 # Register SSL only if the OpenSSL module is available Stream.register_method("ssl", SSLStream) diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at -index 956a69e1fa..1dad6f62c6 100644 +index 956a69e1fa..0c127a6474 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -9695,6 +9695,26 @@ OFPST_TABLE reply (OF1.3) (xid=0x2): @@ -4076,6 +4123,30 @@ index 956a69e1fa..1dad6f62c6 100644 AT_SETUP([ofproto-dpif - ICMPv6]) OVS_VSWITCHD_START add_of_ports br0 1 +@@ -11404,6 +11424,23 @@ Megaflow: recirc_id=0x3,eth,ip,in_port=1,nw_frag=no + Datapath actions: 4 + ]) + ++ovs-ofctl del-flows br0 ++ ++AT_DATA([flows.txt], [dnl ++table=0,in_port=1 actions=load:0x1->NXM_NX_REG1[[]],resubmit(,1),load:0x2->NXM_NX_REG1[[]],resubmit(,1),load:0x3->NXM_NX_REG1[[]],resubmit(,1) ++table=1,in_port=1,reg1=0x1 actions=check_pkt_larger(200)->NXM_NX_REG0[[0]],resubmit(,4) ++table=1,in_port=1,reg1=0x2 actions=output:2 ++table=1,in_port=1,reg1=0x3 actions=output:4 ++table=4,in_port=1 actions=output:3 ++]) ++ ++AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flows br0 flows.txt]) ++AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout]) ++AT_CHECK([cat stdout | grep Datapath -B1], [0], [dnl ++Megaflow: recirc_id=0,eth,ip,in_port=1,nw_frag=no ++Datapath actions: check_pkt_len(size=200,gt(3),le(3)),2,4 ++]) ++ + OVS_VSWITCHD_STOP + AT_CLEANUP + diff --git a/tests/ovsdb-data.at b/tests/ovsdb-data.at index 8cd2a26cb3..25c6acdac6 100644 --- a/tests/ovsdb-data.at diff --git a/SPECS/openvswitch2.16.spec b/SPECS/openvswitch2.16.spec index 8c2d9ab..5d4d334 100644 --- a/SPECS/openvswitch2.16.spec +++ b/SPECS/openvswitch2.16.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.16.0 -Release: 31%{?dist} +Release: 32%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -699,6 +699,12 @@ exit 0 %endif %changelog +* Thu Nov 18 2021 Open vSwitch CI - 2.16.0-32 +- Merging upstream branch-2.16 [RH git: e90e06a818] + Commit list: + 1d8e0f861f ofproto-dpif-xlate: Fix check_pkt_larger incomplete translation. + + * Mon Nov 15 2021 Open vSwitch CI - 2.16.0-31 - Merging upstream branch-2.16 [RH git: 77a249d38b] Commit list: