From bbf51719da7727051cb8bc20a9fa6c5bc8c02471 Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Aug 03 2021 00:28:10 +0000 Subject: Import openvswitch2.15-2.15.0-31 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.15.0.patch b/SOURCES/openvswitch-2.15.0.patch index 0dddcbc..d8b5512 100644 --- a/SOURCES/openvswitch-2.15.0.patch +++ b/SOURCES/openvswitch-2.15.0.patch @@ -18617,7 +18617,7 @@ index 9e2d06b3dd..cb3f30e5b6 100644 static inline void diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c -index 4381c618f1..f18441072a 100644 +index 4381c618f1..f6fe441dda 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -279,8 +279,9 @@ static bool dpcls_lookup(struct dpcls *cls, @@ -18753,7 +18753,69 @@ index 4381c618f1..f18441072a 100644 NULL); unixctl_command_register("dpif-netdev/subtable-lookup-prio-get", "", 0, 0, dpif_netdev_subtable_lookup_get, -@@ -3834,6 +3821,15 @@ dpif_netdev_flow_put(struct dpif *dpif, const struct dpif_flow_put *put) +@@ -2659,7 +2646,8 @@ dp_netdev_flow_offload_put(struct dp_flow_offload_item *offload) + struct dp_netdev_flow *flow = offload->flow; + odp_port_t in_port = flow->flow.in_port.odp_port; + const char *dpif_type_str = dpif_normalize_type(pmd->dp->class->type); +- bool modification = offload->op == DP_NETDEV_FLOW_OFFLOAD_OP_MOD; ++ bool modification = offload->op == DP_NETDEV_FLOW_OFFLOAD_OP_MOD ++ && flow->mark != INVALID_FLOW_MARK; + struct offload_info info; + struct netdev *port; + uint32_t mark; +@@ -2671,7 +2659,6 @@ dp_netdev_flow_offload_put(struct dp_flow_offload_item *offload) + + if (modification) { + mark = flow->mark; +- ovs_assert(mark != INVALID_FLOW_MARK); + } else { + /* + * If a mega flow has already been offloaded (from other PMD +@@ -2798,10 +2785,9 @@ queue_netdev_flow_del(struct dp_netdev_pmd_thread *pmd, + static void + queue_netdev_flow_put(struct dp_netdev_pmd_thread *pmd, + struct dp_netdev_flow *flow, struct match *match, +- const struct nlattr *actions, size_t actions_len) ++ const struct nlattr *actions, size_t actions_len, int op) + { + struct dp_flow_offload_item *offload; +- int op; + + if (!netdev_is_flow_api_enabled()) { + return; +@@ -2814,11 +2800,6 @@ queue_netdev_flow_put(struct dp_netdev_pmd_thread *pmd, + ovsthread_once_done(&offload_thread_once); + } + +- if (flow->mark != INVALID_FLOW_MARK) { +- op = DP_NETDEV_FLOW_OFFLOAD_OP_MOD; +- } else { +- op = DP_NETDEV_FLOW_OFFLOAD_OP_ADD; +- } + offload = dp_netdev_alloc_flow_offload(pmd, flow, op); + offload->match = *match; + offload->actions = xmalloc(actions_len); +@@ -3691,7 +3672,8 @@ dp_netdev_flow_add(struct dp_netdev_pmd_thread *pmd, + cmap_insert(&pmd->flow_table, CONST_CAST(struct cmap_node *, &flow->node), + dp_netdev_flow_hash(&flow->ufid)); + +- queue_netdev_flow_put(pmd, flow, match, actions, actions_len); ++ queue_netdev_flow_put(pmd, flow, match, actions, actions_len, ++ DP_NETDEV_FLOW_OFFLOAD_OP_ADD); + + if (OVS_UNLIKELY(!VLOG_DROP_DBG((&upcall_rl)))) { + struct ds ds = DS_EMPTY_INITIALIZER; +@@ -3778,7 +3760,8 @@ flow_put_on_pmd(struct dp_netdev_pmd_thread *pmd, + ovsrcu_set(&netdev_flow->actions, new_actions); + + queue_netdev_flow_put(pmd, netdev_flow, match, +- put->actions, put->actions_len); ++ put->actions, put->actions_len, ++ DP_NETDEV_FLOW_OFFLOAD_OP_MOD); + + if (stats) { + get_dpif_flow_status(pmd->dp, netdev_flow, stats, NULL); +@@ -3834,6 +3817,15 @@ dpif_netdev_flow_put(struct dpif *dpif, const struct dpif_flow_put *put) return error; } @@ -18769,7 +18831,7 @@ index 4381c618f1..f18441072a 100644 if (put->ufid) { ufid = *put->ufid; } else { -@@ -4159,7 +4155,6 @@ dpif_netdev_execute(struct dpif *dpif, struct dpif_execute *execute) +@@ -4159,7 +4151,6 @@ dpif_netdev_execute(struct dpif *dpif, struct dpif_execute *execute) } dp_packet_batch_init_packet(&pp, execute->packet); @@ -18777,7 +18839,7 @@ index 4381c618f1..f18441072a 100644 dp_netdev_execute_actions(pmd, &pp, false, execute->flow, execute->actions, execute->actions_len); dp_netdev_pmd_flush_output_packets(pmd, true); -@@ -4878,6 +4873,12 @@ struct rr_numa { +@@ -4878,6 +4869,12 @@ struct rr_numa { bool idx_inc; }; @@ -18790,7 +18852,7 @@ index 4381c618f1..f18441072a 100644 static struct rr_numa * rr_numa_list_lookup(struct rr_numa_list *rr, int numa_id) { -@@ -5590,10 +5591,17 @@ get_dry_run_variance(struct dp_netdev *dp, uint32_t *core_list, +@@ -5590,10 +5587,17 @@ get_dry_run_variance(struct dp_netdev *dp, uint32_t *core_list, for (int i = 0; i < n_rxqs; i++) { int numa_id = netdev_get_numa_id(rxqs[i]->port->netdev); numa = rr_numa_list_lookup(&rr, numa_id); @@ -18811,7 +18873,7 @@ index 4381c618f1..f18441072a 100644 goto cleanup; } -@@ -6203,12 +6211,14 @@ dp_netdev_run_meter(struct dp_netdev *dp, struct dp_packet_batch *packets_, +@@ -6203,12 +6207,14 @@ dp_netdev_run_meter(struct dp_netdev *dp, struct dp_packet_batch *packets_, /* Update all bands and find the one hit with the highest rate for each * packet (if any). */ for (int m = 0; m < meter->n_bands; ++m) { @@ -18830,7 +18892,7 @@ index 4381c618f1..f18441072a 100644 } /* Drain the bucket for all the packets, if possible. */ -@@ -6226,8 +6236,8 @@ dp_netdev_run_meter(struct dp_netdev *dp, struct dp_packet_batch *packets_, +@@ -6226,8 +6232,8 @@ dp_netdev_run_meter(struct dp_netdev *dp, struct dp_packet_batch *packets_, * (Only one band will be fired by a packet, and that * can be different for each packet.) */ for (int i = band_exceeded_pkt; i < cnt; i++) { @@ -18841,7 +18903,7 @@ index 4381c618f1..f18441072a 100644 exceeded_band[i] = m; } } -@@ -6246,8 +6256,8 @@ dp_netdev_run_meter(struct dp_netdev *dp, struct dp_packet_batch *packets_, +@@ -6246,8 +6252,8 @@ dp_netdev_run_meter(struct dp_netdev *dp, struct dp_packet_batch *packets_, /* Update the exceeding band for the exceeding packet. * (Only one band will be fired by a packet, and that * can be different for each packet.) */ @@ -18852,7 +18914,7 @@ index 4381c618f1..f18441072a 100644 exceeded_band[i] = m; } } -@@ -6329,16 +6339,14 @@ dpif_netdev_meter_set(struct dpif *dpif, ofproto_meter_id meter_id, +@@ -6329,16 +6335,14 @@ dpif_netdev_meter_set(struct dpif *dpif, ofproto_meter_id meter_id, config->bands[i].burst_size = config->bands[i].rate; } @@ -18874,7 +18936,7 @@ index 4381c618f1..f18441072a 100644 if (band_max_delta_t > meter->max_delta_t) { meter->max_delta_t = band_max_delta_t; } -@@ -8493,6 +8501,7 @@ const struct dpif_class dpif_netdev_class = { +@@ -8493,6 +8497,7 @@ const struct dpif_class dpif_netdev_class = { NULL, /* ct_timeout_policy_dump_next */ NULL, /* ct_timeout_policy_dump_done */ dpif_netdev_ct_get_timeout_policy_name, diff --git a/SPECS/openvswitch2.15.spec b/SPECS/openvswitch2.15.spec index e74c04e..4355da2 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: 30%{?dist} +Release: 31%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -697,6 +697,13 @@ exit 0 %endif %changelog +* Mon Aug 02 2021 Open vSwitch CI - 2.15.0-31 +- Merging upstream branch-2.15 [RH gerrit: 88fb0bba8a] + Commit list: + b29b04f85f dpif-netdev: Fix offloads of modified flows. + 1d0b89ea7b dpif-netdev: Fix flow modification after failure. + + * Mon Jul 26 2021 Open vSwitch CI - 2.15.0-30 - Merging upstream branch-2.15 [RH gerrit: a76a4dfca6] Commit list: