From 08f326fc270d726d2dd7cb3b0d849c56383cd639 Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Nov 18 2021 04:36:01 +0000 Subject: Import openvswitch2.13-2.13.0-139 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.13.0.patch b/SOURCES/openvswitch-2.13.0.patch index fc0cf4d..4540f0c 100644 --- a/SOURCES/openvswitch-2.13.0.patch +++ b/SOURCES/openvswitch-2.13.0.patch @@ -85613,7 +85613,7 @@ index 409286ab15..cb197e9010 100644 ofproto_dpif_send_async_msg(upcall->ofproto, am); diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c -index 4407f9c97a..72c0a0efce 100644 +index 4407f9c97a..fd0e843334 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -1516,15 +1516,32 @@ xlate_lookup_ofproto_(const struct dpif_backer *backer, @@ -85736,7 +85736,54 @@ index 4407f9c97a..72c0a0efce 100644 ct_offset = nl_msg_start_nested(ctx->odp_actions, OVS_ACTION_ATTR_CT); if (ofc->flags & NX_CT_F_COMMIT) { -@@ -7519,7 +7552,8 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout) +@@ -6278,6 +6311,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( +@@ -6302,7 +6336,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 +@@ -6680,6 +6714,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; +@@ -6694,7 +6729,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) { +@@ -7096,6 +7131,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; + } + } +@@ -7519,7 +7560,8 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout) /* Restore pipeline metadata. May change flow's in_port and other * metadata to the values that existed when freezing was triggered. */ @@ -85746,7 +85793,7 @@ index 4407f9c97a..72c0a0efce 100644 /* Restore stack, if any. */ if (state->stack) { -@@ -7571,14 +7605,10 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout) +@@ -7571,14 +7613,10 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout) ctx.error = XLATE_INVALID_TUNNEL_METADATA; goto exit; } @@ -88131,7 +88178,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..7b5b2183bf 100644 +index ff1cc93707..a75388604f 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -5171,6 +5171,36 @@ AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: 2 @@ -88291,6 +88338,30 @@ index ff1cc93707..7b5b2183bf 100644 AT_SETUP([ofproto-dpif - conntrack - ofproto/trace]) OVS_VSWITCHD_START +@@ -10807,6 +10936,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/ovs-ofctl.at b/tests/ovs-ofctl.at index c8062c8acc..ebf0dc41c0 100644 --- a/tests/ovs-ofctl.at diff --git a/SPECS/openvswitch2.13.spec b/SPECS/openvswitch2.13.spec index b8aac4c..cb58bd7 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: 138%{?commit0:.%{date}git%{shortcommit0}}%{?commit1:dpdk%{shortcommit1}}%{?dist} +Release: 139%{?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 @@ -712,6 +712,12 @@ exit 0 %endif %changelog +* Thu Nov 18 2021 Open vSwitch CI - 2.13.0-139 +- Merging upstream branch-2.13 [RH git: 37c2767bbd] + Commit list: + 057a5b0708 ofproto-dpif-xlate: Fix check_pkt_larger incomplete translation. + + * Mon Nov 15 2021 Open vSwitch CI - 2.13.0-138 - Merging upstream branch-2.13 [RH git: 424b25f9ca] Commit list: