From bcb8ede0b8b1bb2daf3541c87b83986e5fb94d9e Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Nov 18 2021 16:15:15 +0000 Subject: Import openvswitch2.15-2.15.0-53 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.15.0.patch b/SOURCES/openvswitch-2.15.0.patch index 3e05b95..6c82777 100644 --- a/SOURCES/openvswitch-2.15.0.patch +++ b/SOURCES/openvswitch-2.15.0.patch @@ -21183,7 +21183,7 @@ index 5fae46adfc..ccf97266c0 100644 ovs_mutex_destroy(&udpif->ukeys[i].mutex); } diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c -index 7108c8a301..3942ddbdc7 100644 +index 7108c8a301..e776ae904b 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -6177,11 +6177,32 @@ static void @@ -21234,7 +21234,41 @@ index 7108c8a301..3942ddbdc7 100644 ct_offset = nl_msg_start_nested(ctx->odp_actions, OVS_ACTION_ATTR_CT); if (ofc->flags & NX_CT_F_COMMIT) { -@@ -7127,7 +7143,9 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, +@@ -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 +@@ -6736,6 +6753,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; +@@ -6750,7 +6768,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) { +@@ -7127,7 +7145,9 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, break; case OFPACT_CT_CLEAR: @@ -21245,6 +21279,19 @@ index 7108c8a301..3942ddbdc7 100644 break; case OFPACT_NAT: +@@ -7156,6 +7176,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/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index fd0b2fdea0..5ce56adfae 100644 --- a/ofproto/ofproto-dpif.c @@ -22249,7 +22296,7 @@ index 199db8ed0f..59093c03c9 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 31064ed95e..f99a60444f 100644 +index 31064ed95e..19c85d43a3 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -342,6 +342,22 @@ AT_CHECK([test `egrep 'in_port\(6\)' br1_flows.txt |wc -l` -gt 3]) @@ -22443,6 +22490,30 @@ index 31064ed95e..f99a60444f 100644 OVS_VSWITCHD_STOP AT_CLEANUP +@@ -11204,6 +11325,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 5ddca67e71..604f15c2d1 100644 --- a/tests/ovs-ofctl.at diff --git a/SPECS/openvswitch2.15.spec b/SPECS/openvswitch2.15.spec index b103083..697810e 100644 --- a/SPECS/openvswitch2.15.spec +++ b/SPECS/openvswitch2.15.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.15.0 -Release: 52%{?dist} +Release: 53%{?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.15.0-53 +- Merging upstream branch-2.15 [RH git: 9221a2233d] + Commit list: + 01bc910e57 ofproto-dpif-xlate: Fix check_pkt_larger incomplete translation. + + * Mon Nov 15 2021 Open vSwitch CI - 2.15.0-52 - Merging upstream branch-2.15 [RH git: 001ae577c6] Commit list: