diff --git a/SOURCES/openvswitch-2.13.0.patch b/SOURCES/openvswitch-2.13.0.patch index cbfdd7c..c3c2f53 100644 --- a/SOURCES/openvswitch-2.13.0.patch +++ b/SOURCES/openvswitch-2.13.0.patch @@ -86738,7 +86738,7 @@ index 409286ab15..61d5cf9782 100644 } ds_put_format(&ds, " %u: (keys %d)\n", revalidator->id, elements); diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c -index 4407f9c97a..97fcbb6584 100644 +index 4407f9c97a..4ad5c510e9 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); @@ -86813,7 +86813,18 @@ index 4407f9c97a..97fcbb6584 100644 if (is_sample) { nl_msg_end_nested(ctx->odp_actions, actions_offset); nl_msg_end_nested(ctx->odp_actions, sample_offset); -@@ -3572,7 +3589,7 @@ propagate_tunnel_data_to_flow(struct xlate_ctx *ctx, struct eth_addr dmac, +@@ -3248,7 +3265,9 @@ compose_ipfix_action(struct xlate_ctx *ctx, odp_port_t output_odp_port) + struct dpif_ipfix *ipfix = ctx->xbridge->ipfix; + odp_port_t tunnel_out_port = ODPP_NONE; + +- if (!ipfix || ctx->xin->flow.in_port.ofp_port == OFPP_NONE) { ++ if (!ipfix || ++ (output_odp_port == ODPP_NONE && ++ ctx->xin->flow.in_port.ofp_port == OFPP_NONE)) { + return; + } + +@@ -3572,7 +3591,7 @@ propagate_tunnel_data_to_flow(struct xlate_ctx *ctx, struct eth_addr dmac, static int native_tunnel_output(struct xlate_ctx *ctx, const struct xport *xport, const struct flow *flow, odp_port_t tunnel_odp_port, @@ -86822,7 +86833,7 @@ index 4407f9c97a..97fcbb6584 100644 { struct netdev_tnl_build_header_params tnl_params; struct ovs_action_push_tnl tnl_push_data; -@@ -3702,7 +3719,7 @@ native_tunnel_output(struct xlate_ctx *ctx, const struct xport *xport, +@@ -3702,7 +3721,7 @@ native_tunnel_output(struct xlate_ctx *ctx, const struct xport *xport, entry->tunnel_hdr.hdr_size = tnl_push_data.header_len; entry->tunnel_hdr.operation = ADD; @@ -86831,7 +86842,7 @@ index 4407f9c97a..97fcbb6584 100644 /* Similar to the stats update in revalidation, the x_cache entries * are populated by the previous translation are used to update the -@@ -3796,7 +3813,7 @@ xlate_flow_is_protected(const struct xlate_ctx *ctx, const struct flow *flow, co +@@ -3796,7 +3815,7 @@ xlate_flow_is_protected(const struct xlate_ctx *ctx, const struct flow *flow, co */ static void patch_port_output(struct xlate_ctx *ctx, const struct xport *in_dev, @@ -86840,7 +86851,7 @@ index 4407f9c97a..97fcbb6584 100644 { struct flow *flow = &ctx->xin->flow; struct flow old_flow = ctx->xin->flow; -@@ -3838,8 +3855,9 @@ patch_port_output(struct xlate_ctx *ctx, const struct xport *in_dev, +@@ -3838,8 +3857,9 @@ patch_port_output(struct xlate_ctx *ctx, const struct xport *in_dev, if (!process_special(ctx, out_dev) && may_receive(out_dev, ctx)) { if (xport_stp_forward_state(out_dev) && xport_rstp_forward_state(out_dev)) { @@ -86851,7 +86862,7 @@ index 4407f9c97a..97fcbb6584 100644 if (!ctx->freezing) { xlate_action_set(ctx); } -@@ -3854,7 +3872,7 @@ patch_port_output(struct xlate_ctx *ctx, const struct xport *in_dev, +@@ -3854,7 +3874,7 @@ patch_port_output(struct xlate_ctx *ctx, const struct xport *in_dev, mirror_mask_t old_mirrors2 = ctx->mirrors; xlate_table_action(ctx, flow->in_port.ofp_port, 0, true, true, @@ -86860,7 +86871,7 @@ index 4407f9c97a..97fcbb6584 100644 ctx->mirrors = old_mirrors2; ctx->base_flow = old_base_flow; ctx->odp_actions->size = old_size; -@@ -4071,7 +4089,21 @@ terminate_native_tunnel(struct xlate_ctx *ctx, struct flow *flow, +@@ -4071,7 +4091,21 @@ terminate_native_tunnel(struct xlate_ctx *ctx, struct flow *flow, (flow->dl_type == htons(ETH_TYPE_ARP) || flow->nw_proto == IPPROTO_ICMPV6) && is_neighbor_reply_correct(ctx, flow)) { @@ -86883,7 +86894,7 @@ index 4407f9c97a..97fcbb6584 100644 } } -@@ -4081,7 +4113,7 @@ terminate_native_tunnel(struct xlate_ctx *ctx, struct flow *flow, +@@ -4081,7 +4115,7 @@ terminate_native_tunnel(struct xlate_ctx *ctx, struct flow *flow, static void compose_output_action__(struct xlate_ctx *ctx, ofp_port_t ofp_port, const struct xlate_bond_recirc *xr, bool check_stp, @@ -86892,7 +86903,7 @@ index 4407f9c97a..97fcbb6584 100644 { const struct xport *xport = get_ofp_port(ctx->xbridge, ofp_port); struct flow_wildcards *wc = ctx->wc; -@@ -4118,7 +4150,7 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t ofp_port, +@@ -4118,7 +4152,7 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t ofp_port, if (truncate) { xlate_report_error(ctx, "Cannot truncate output to patch port"); } @@ -86901,7 +86912,7 @@ index 4407f9c97a..97fcbb6584 100644 return; } -@@ -4203,7 +4235,8 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t ofp_port, +@@ -4203,7 +4237,8 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t ofp_port, xr->recirc_id); } else if (is_native_tunnel) { /* Output to native tunnel port. */ @@ -86911,7 +86922,7 @@ index 4407f9c97a..97fcbb6584 100644 flow->tunnel = flow_tnl; /* Restore tunnel metadata */ } else if (terminate_native_tunnel(ctx, flow, wc, -@@ -4796,7 +4829,7 @@ put_controller_user_action(struct xlate_ctx *ctx, +@@ -4796,7 +4831,7 @@ put_controller_user_action(struct xlate_ctx *ctx, ctx->xin->flow.in_port.ofp_port); uint32_t pid = dpif_port_get_pid(ctx->xbridge->dpif, odp_port); odp_put_userspace_action(pid, &cookie, sizeof cookie, ODPP_NONE, @@ -86920,7 +86931,7 @@ index 4407f9c97a..97fcbb6584 100644 } static void -@@ -6123,11 +6156,32 @@ static void +@@ -6123,11 +6158,32 @@ static void compose_conntrack_action(struct xlate_ctx *ctx, struct ofpact_conntrack *ofc, bool is_last_action) { @@ -86931,7 +86942,7 @@ index 4407f9c97a..97fcbb6584 100644 + if (ofc->zone_src.field) { + union mf_subvalue value; + memset(&value, 0xff, sizeof(value)); -+ + + zone = mf_get_subfield(&ofc->zone_src, &ctx->xin->flow); + if (ctx->xin->frozen_state) { + /* If the upcall is a resume of a recirculation, we only need to @@ -86949,14 +86960,14 @@ index 4407f9c97a..97fcbb6584 100644 + } else { + zone = ofc->zone_imm; + } - ++ + size_t ct_offset; + ovs_u128 old_ct_label_mask = ctx->wc->masks.ct_label; + uint32_t old_ct_mark_mask = ctx->wc->masks.ct_mark; /* Ensure that any prior actions are applied before composing the new * conntrack action. */ xlate_commit_actions(ctx); -@@ -6139,11 +6193,6 @@ compose_conntrack_action(struct xlate_ctx *ctx, struct ofpact_conntrack *ofc, +@@ -6139,11 +6195,6 @@ compose_conntrack_action(struct xlate_ctx *ctx, struct ofpact_conntrack *ofc, do_xlate_actions(ofc->actions, ofpact_ct_get_action_len(ofc), ctx, is_last_action, false); @@ -86968,7 +86979,7 @@ index 4407f9c97a..97fcbb6584 100644 ct_offset = nl_msg_start_nested(ctx->odp_actions, OVS_ACTION_ATTR_CT); if (ofc->flags & NX_CT_F_COMMIT) { -@@ -6278,6 +6327,7 @@ xlate_check_pkt_larger(struct xlate_ctx *ctx, +@@ -6278,6 +6329,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. */ @@ -86976,7 +86987,7 @@ index 4407f9c97a..97fcbb6584 100644 ctx->exit = false; offset_attr = nl_msg_start_nested( -@@ -6302,7 +6352,7 @@ xlate_check_pkt_larger(struct xlate_ctx *ctx, +@@ -6302,7 +6354,7 @@ xlate_check_pkt_larger(struct xlate_ctx *ctx, ctx->was_mpls = old_was_mpls; ctx->conntracked = old_conntracked; ctx->xin->flow = old_flow; @@ -86985,7 +86996,7 @@ index 4407f9c97a..97fcbb6584 100644 } static void -@@ -6680,13 +6730,14 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, +@@ -6680,13 +6732,14 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, return; } @@ -87001,7 +87012,7 @@ index 4407f9c97a..97fcbb6584 100644 if (ctx->error) { break; -@@ -6694,7 +6745,7 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, +@@ -6694,7 +6747,7 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, recirc_for_mpls(a, ctx); @@ -87010,7 +87021,7 @@ index 4407f9c97a..97fcbb6584 100644 /* Check if need to store the remaining actions for later * execution. */ if (ctx->freezing) { -@@ -7085,17 +7136,18 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, +@@ -7085,17 +7138,18 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, break; case OFPACT_CHECK_PKT_LARGER: { @@ -87034,7 +87045,7 @@ index 4407f9c97a..97fcbb6584 100644 break; } } -@@ -7519,7 +7571,8 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout) +@@ -7519,7 +7573,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. */ @@ -87044,7 +87055,7 @@ index 4407f9c97a..97fcbb6584 100644 /* Restore stack, if any. */ if (state->stack) { -@@ -7571,14 +7624,10 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout) +@@ -7571,14 +7626,10 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout) ctx.error = XLATE_INVALID_TUNNEL_METADATA; goto exit; } @@ -89683,7 +89694,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..694146b428 100644 +index ff1cc93707..0dc2ef7dc2 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 @@ -89778,7 +89789,45 @@ index ff1cc93707..694146b428 100644 AT_SETUP([ofproto-dpif - debug_slow action]) OVS_VSWITCHD_START -@@ -8134,6 +8212,34 @@ AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], +@@ -7067,7 +7145,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 +-add_of_ports br0 1 2 ++add_of_ports br0 1 2 3 + + 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: + packets:2, bytes:68, used:0.001s, actions:userspace(pid=0,ipfix(output_port=4294967295)) + ]) + ++AT_CHECK([ovs-appctl revalidator/purge]) ++ ++dnl Check sample is performed even if only one of the ports is present. ++AT_DATA([flows.txt], [dnl ++table=0,in_port=3,tcp actions=load:0xffff->NXM_OF_IN_PORT[],ct(zone=1,table=1) ++table=1,tcp, actions=output:2 ++]) ++AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) ++ ++for i in `seq 1 3`; do ++ AT_CHECK([ovs-appctl netdev-dummy/receive p3 'in_port(3),eth(src=50:54:00:00:00:08,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no)']) ++done ++ ++AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/.*\(packets:\)/\1/' | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl ++flow-dump from the main thread: ++packets:2, bytes:236, used:0.001s, actions:userspace(pid=0,ipfix(output_port=2)),2 ++packets:2, bytes:236, used:0.001s, actions:userspace(pid=0,ipfix(output_port=4294967295)),ct(zone=1),recirc(0x1) ++]) ++ ++AT_CHECK([ovs-ofctl del-flows br0 in_port=3]) ++AT_CHECK([ovs-ofctl del-flows br0 table=1]) ++ + 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], OVS_VSWITCHD_STOP AT_CLEANUP @@ -89813,7 +89862,7 @@ index ff1cc93707..694146b428 100644 dnl ---------------------------------------------------------------------- AT_BANNER([ofproto-dpif -- megaflows]) -@@ -8632,6 +8738,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 +8760,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 @@ -89843,7 +89892,7 @@ index ff1cc93707..694146b428 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 +9344,26 @@ OFPST_TABLE reply (OF1.3) (xid=0x2): +@@ -9215,6 +9366,26 @@ OFPST_TABLE reply (OF1.3) (xid=0x2): OVS_VSWITCHD_STOP AT_CLEANUP @@ -89870,7 +89919,7 @@ index ff1cc93707..694146b428 100644 AT_SETUP([ofproto-dpif - ICMPv6]) OVS_VSWITCHD_START add_of_ports br0 1 -@@ -10540,6 +10689,62 @@ udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:0a,dl_dst=50:54:00:00:00:09,nw_src=10. +@@ -10540,6 +10711,62 @@ udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:0a,dl_dst=50:54:00:00:00:09,nw_src=10. OVS_VSWITCHD_STOP AT_CLEANUP @@ -89933,7 +89982,7 @@ index ff1cc93707..694146b428 100644 AT_SETUP([ofproto-dpif - conntrack - ofproto/trace]) OVS_VSWITCHD_START -@@ -10807,6 +11012,23 @@ Megaflow: recirc_id=0x3,eth,ip,in_port=1,nw_frag=no +@@ -10807,6 +11034,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 a1002ec..3075032 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: 157%{?commit0:.%{date}git%{shortcommit0}}%{?commit1:dpdk%{shortcommit1}}%{?dist} +Release: 158%{?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,12 @@ exit 0 %endif %changelog +* Wed Feb 09 2022 Open vSwitch CI - 2.13.0-158 +- Merging upstream branch-2.13 [RH git: fe171fdd17] + Commit list: + ba8cc78271 ofproto: Fix ipfix not always sampling on egress. (#2016346) + + * Wed Feb 09 2022 Open vSwitch CI - 2.13.0-157 - Merging upstream branch-2.13 [RH git: 3975fea486] Commit list: