diff --git a/SOURCES/openvswitch-2.13.0.patch b/SOURCES/openvswitch-2.13.0.patch index 24daaec..0df9a40 100644 --- a/SOURCES/openvswitch-2.13.0.patch +++ b/SOURCES/openvswitch-2.13.0.patch @@ -84193,7 +84193,7 @@ index 90b405c737..309dc59c5f 100644 diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c -index 6187129c00..f080dec61f 100644 +index 6187129c00..4da7f0352a 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -152,9 +152,18 @@ typedef uint16_t dpdk_port_t; @@ -84325,7 +84325,17 @@ index 6187129c00..f080dec61f 100644 } rte_pktmbuf_attach_extbuf(pkt, buf, rte_malloc_virt2iova(buf), buf_len, -@@ -5110,7 +5124,11 @@ netdev_dpdk_reconfigure(struct netdev *netdev) +@@ -2885,6 +2899,9 @@ netdev_dpdk_send__(struct netdev_dpdk *dev, int qid, + bool concurrent_txq) + { + if (OVS_UNLIKELY(!(dev->flags & NETDEV_UP))) { ++ rte_spinlock_lock(&dev->stats_lock); ++ dev->stats.tx_dropped += dp_packet_batch_size(batch); ++ rte_spinlock_unlock(&dev->stats_lock); + dp_packet_delete_batch(batch, true); + return; + } +@@ -5110,7 +5127,11 @@ netdev_dpdk_reconfigure(struct netdev *netdev) if (dev->hw_ol_features & NETDEV_TX_TSO_OFFLOAD) { netdev->ol_flags |= NETDEV_TX_OFFLOAD_TCP_TSO; netdev->ol_flags |= NETDEV_TX_OFFLOAD_TCP_CKSUM; @@ -84337,7 +84347,7 @@ index 6187129c00..f080dec61f 100644 } dev->tx_q = netdev_dpdk_alloc_txq(netdev->n_txq); -@@ -5186,6 +5204,7 @@ netdev_dpdk_vhost_client_reconfigure(struct netdev *netdev) +@@ -5186,6 +5207,7 @@ netdev_dpdk_vhost_client_reconfigure(struct netdev *netdev) struct netdev_dpdk *dev = netdev_dpdk_cast(netdev); int err; uint64_t vhost_flags = 0; @@ -84345,7 +84355,7 @@ index 6187129c00..f080dec61f 100644 bool zc_enabled; ovs_mutex_lock(&dev->mutex); -@@ -5251,17 +5270,24 @@ netdev_dpdk_vhost_client_reconfigure(struct netdev *netdev) +@@ -5251,17 +5273,24 @@ netdev_dpdk_vhost_client_reconfigure(struct netdev *netdev) if (userspace_tso_enabled()) { netdev->ol_flags |= NETDEV_TX_OFFLOAD_TCP_TSO; netdev->ol_flags |= NETDEV_TX_OFFLOAD_TCP_CKSUM; @@ -88528,7 +88538,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..bd9abb21bb 100644 +index 4407f9c97a..f2a47fc697 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); @@ -88619,7 +88629,25 @@ index 4407f9c97a..bd9abb21bb 100644 static struct xbundle * xbundle_lookup(struct xlate_cfg *xcfg, const struct ofbundle *ofbundle) { -@@ -2991,7 +3025,7 @@ xlate_normal(struct xlate_ctx *ctx) +@@ -2101,9 +2135,14 @@ mirror_packet(struct xlate_ctx *ctx, struct xbundle *xbundle, + int snaplen; + + /* Get the details of the mirror represented by the rightmost 1-bit. */ +- ovs_assert(mirror_get(xbridge->mbridge, raw_ctz(mirrors), +- &vlans, &dup_mirrors, +- &out, &snaplen, &out_vlan)); ++ if (OVS_UNLIKELY(!mirror_get(xbridge->mbridge, raw_ctz(mirrors), ++ &vlans, &dup_mirrors, ++ &out, &snaplen, &out_vlan))) { ++ /* The mirror got reconfigured before we got to read it's ++ * configuration. */ ++ mirrors = zero_rightmost_1bit(mirrors); ++ continue; ++ } + + + /* If this mirror selects on the basis of VLAN, and it does not select +@@ -2991,7 +3030,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) @@ -88628,7 +88656,7 @@ index 4407f9c97a..bd9abb21bb 100644 ) { update_learning_table(ctx, in_xbundle, flow->dl_src, vlan, is_grat_arp); -@@ -3000,12 +3034,14 @@ xlate_normal(struct xlate_ctx *ctx) +@@ -3000,12 +3039,14 @@ xlate_normal(struct xlate_ctx *ctx) struct xc_entry *entry; /* Save just enough info to update mac learning table later. */ @@ -88649,7 +88677,7 @@ index 4407f9c97a..bd9abb21bb 100644 } /* Determine output bundle. */ -@@ -3076,6 +3112,7 @@ xlate_normal(struct xlate_ctx *ctx) +@@ -3076,6 +3117,7 @@ xlate_normal(struct xlate_ctx *ctx) xlate_report(ctx, OFT_DETAIL, "MLD query, flooding"); xlate_normal_flood(ctx, in_xbundle, &xvlan); } @@ -88657,7 +88685,7 @@ index 4407f9c97a..bd9abb21bb 100644 } else { if (is_ip_local_multicast(flow, wc)) { /* RFC4541: section 2.1.2, item 2: Packets with a dst IP -@@ -3198,12 +3235,11 @@ compose_sample_action(struct xlate_ctx *ctx, +@@ -3198,12 +3240,11 @@ compose_sample_action(struct xlate_ctx *ctx, odp_port_t odp_port = ofp_port_to_odp_port( ctx->xbridge, ctx->xin->flow.in_port.ofp_port); uint32_t pid = dpif_port_get_pid(ctx->xbridge->dpif, odp_port); @@ -88675,7 +88703,7 @@ index 4407f9c97a..bd9abb21bb 100644 if (is_sample) { nl_msg_end_nested(ctx->odp_actions, actions_offset); nl_msg_end_nested(ctx->odp_actions, sample_offset); -@@ -3248,7 +3284,9 @@ compose_ipfix_action(struct xlate_ctx *ctx, odp_port_t output_odp_port) +@@ -3248,7 +3289,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; @@ -88686,7 +88714,7 @@ index 4407f9c97a..bd9abb21bb 100644 return; } -@@ -3497,6 +3535,9 @@ propagate_tunnel_data_to_flow__(struct flow *dst_flow, +@@ -3497,6 +3540,9 @@ propagate_tunnel_data_to_flow__(struct flow *dst_flow, dst_flow->dl_dst = dmac; dst_flow->dl_src = smac; @@ -88696,7 +88724,7 @@ index 4407f9c97a..bd9abb21bb 100644 dst_flow->packet_type = htonl(PT_ETH); dst_flow->nw_dst = src_flow->tunnel.ip_dst; dst_flow->nw_src = src_flow->tunnel.ip_src; -@@ -3572,7 +3613,7 @@ propagate_tunnel_data_to_flow(struct xlate_ctx *ctx, struct eth_addr dmac, +@@ -3572,7 +3618,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, @@ -88705,7 +88733,7 @@ index 4407f9c97a..bd9abb21bb 100644 { struct netdev_tnl_build_header_params tnl_params; struct ovs_action_push_tnl tnl_push_data; -@@ -3702,7 +3743,7 @@ native_tunnel_output(struct xlate_ctx *ctx, const struct xport *xport, +@@ -3702,7 +3748,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; @@ -88714,7 +88742,7 @@ index 4407f9c97a..bd9abb21bb 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 +3837,7 @@ xlate_flow_is_protected(const struct xlate_ctx *ctx, const struct flow *flow, co +@@ -3796,7 +3842,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, @@ -88723,7 +88751,7 @@ index 4407f9c97a..bd9abb21bb 100644 { struct flow *flow = &ctx->xin->flow; struct flow old_flow = ctx->xin->flow; -@@ -3838,8 +3879,9 @@ patch_port_output(struct xlate_ctx *ctx, const struct xport *in_dev, +@@ -3838,8 +3884,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)) { @@ -88734,7 +88762,7 @@ index 4407f9c97a..bd9abb21bb 100644 if (!ctx->freezing) { xlate_action_set(ctx); } -@@ -3854,7 +3896,7 @@ patch_port_output(struct xlate_ctx *ctx, const struct xport *in_dev, +@@ -3854,7 +3901,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, @@ -88743,7 +88771,7 @@ index 4407f9c97a..bd9abb21bb 100644 ctx->mirrors = old_mirrors2; ctx->base_flow = old_base_flow; ctx->odp_actions->size = old_size; -@@ -4071,7 +4113,21 @@ terminate_native_tunnel(struct xlate_ctx *ctx, struct flow *flow, +@@ -4071,7 +4118,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)) { @@ -88766,7 +88794,7 @@ index 4407f9c97a..bd9abb21bb 100644 } } -@@ -4081,7 +4137,7 @@ terminate_native_tunnel(struct xlate_ctx *ctx, struct flow *flow, +@@ -4081,7 +4142,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, @@ -88775,7 +88803,7 @@ index 4407f9c97a..bd9abb21bb 100644 { const struct xport *xport = get_ofp_port(ctx->xbridge, ofp_port); struct flow_wildcards *wc = ctx->wc; -@@ -4111,6 +4167,10 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t ofp_port, +@@ -4111,6 +4172,10 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t ofp_port, if (xport->pt_mode == NETDEV_PT_LEGACY_L3) { flow->packet_type = PACKET_TYPE_BE(OFPHTN_ETHERTYPE, ntohs(flow->dl_type)); @@ -88786,7 +88814,7 @@ index 4407f9c97a..bd9abb21bb 100644 } } -@@ -4118,7 +4178,7 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t ofp_port, +@@ -4118,7 +4183,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"); } @@ -88795,7 +88823,7 @@ index 4407f9c97a..bd9abb21bb 100644 return; } -@@ -4203,7 +4263,8 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t ofp_port, +@@ -4203,7 +4268,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. */ @@ -88805,7 +88833,7 @@ index 4407f9c97a..bd9abb21bb 100644 flow->tunnel = flow_tnl; /* Restore tunnel metadata */ } else if (terminate_native_tunnel(ctx, flow, wc, -@@ -4796,7 +4857,7 @@ put_controller_user_action(struct xlate_ctx *ctx, +@@ -4796,7 +4862,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, @@ -88814,7 +88842,7 @@ index 4407f9c97a..bd9abb21bb 100644 } static void -@@ -6123,11 +6184,32 @@ static void +@@ -6123,11 +6189,32 @@ static void compose_conntrack_action(struct xlate_ctx *ctx, struct ofpact_conntrack *ofc, bool is_last_action) { @@ -88825,7 +88853,7 @@ index 4407f9c97a..bd9abb21bb 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 @@ -88843,14 +88871,14 @@ index 4407f9c97a..bd9abb21bb 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 +6221,6 @@ compose_conntrack_action(struct xlate_ctx *ctx, struct ofpact_conntrack *ofc, +@@ -6139,11 +6226,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); @@ -88862,7 +88890,7 @@ index 4407f9c97a..bd9abb21bb 100644 ct_offset = nl_msg_start_nested(ctx->odp_actions, OVS_ACTION_ATTR_CT); if (ofc->flags & NX_CT_F_COMMIT) { -@@ -6278,6 +6355,7 @@ xlate_check_pkt_larger(struct xlate_ctx *ctx, +@@ -6278,6 +6360,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. */ @@ -88870,7 +88898,7 @@ index 4407f9c97a..bd9abb21bb 100644 ctx->exit = false; offset_attr = nl_msg_start_nested( -@@ -6302,7 +6380,7 @@ xlate_check_pkt_larger(struct xlate_ctx *ctx, +@@ -6302,7 +6385,7 @@ xlate_check_pkt_larger(struct xlate_ctx *ctx, ctx->was_mpls = old_was_mpls; ctx->conntracked = old_conntracked; ctx->xin->flow = old_flow; @@ -88879,7 +88907,7 @@ index 4407f9c97a..bd9abb21bb 100644 } static void -@@ -6680,13 +6758,14 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, +@@ -6680,13 +6763,14 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, return; } @@ -88895,7 +88923,7 @@ index 4407f9c97a..bd9abb21bb 100644 if (ctx->error) { break; -@@ -6694,7 +6773,7 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, +@@ -6694,7 +6778,7 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, recirc_for_mpls(a, ctx); @@ -88904,7 +88932,7 @@ index 4407f9c97a..bd9abb21bb 100644 /* Check if need to store the remaining actions for later * execution. */ if (ctx->freezing) { -@@ -7067,7 +7146,9 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, +@@ -7067,7 +7151,9 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, break; case OFPACT_CT_CLEAR: @@ -88915,7 +88943,7 @@ index 4407f9c97a..bd9abb21bb 100644 break; case OFPACT_NAT: -@@ -7085,17 +7166,18 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, +@@ -7085,17 +7171,18 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, break; case OFPACT_CHECK_PKT_LARGER: { @@ -88939,7 +88967,7 @@ index 4407f9c97a..bd9abb21bb 100644 break; } } -@@ -7519,7 +7601,8 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout) +@@ -7519,7 +7606,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. */ @@ -88949,7 +88977,7 @@ index 4407f9c97a..bd9abb21bb 100644 /* Restore stack, if any. */ if (state->stack) { -@@ -7571,14 +7654,10 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout) +@@ -7571,14 +7659,10 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout) ctx.error = XLATE_INVALID_TUNNEL_METADATA; goto exit; } diff --git a/SPECS/openvswitch2.13.spec b/SPECS/openvswitch2.13.spec index c09e4af..58bce95 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: 180%{?commit0:.%{date}git%{shortcommit0}}%{?commit1:dpdk%{shortcommit1}}%{?dist} +Release: 181%{?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 +* Wed May 04 2022 Open vSwitch CI - 2.13.0-181 +- Merging upstream branch-2.13 [RH git: b866251882] + Commit list: + 2236212ce1 ofproto-dpif-xlate: Remove mirror assert. + 27df8dc13f netdev-dpdk: Fix tx drops statistic for a down netdev. + + * Thu Apr 28 2022 Timothy Redaelli - 2.13.0-180 - vhost: fix queue number check when setting inflight FD [RH git: 727183c8a9] [ upstream commit 6442c329b9d2ded0f44b27d2016aaba8ba5844c5 ]