From b1e39630a6fbe17bba15ff6f565bbf10c5fe4f7e Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Feb 25 2022 16:43:22 +0000 Subject: Import openvswitch2.16-2.16.0-56 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.16.0.patch b/SOURCES/openvswitch-2.16.0.patch index a56e00e..e3a3241 100644 --- a/SOURCES/openvswitch-2.16.0.patch +++ b/SOURCES/openvswitch-2.16.0.patch @@ -1261,7 +1261,7 @@ index a782d9678a..ac4885538c 100644 /* Flow-Table and classifiers diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c -index bddce75b63..0b47c1a486 100644 +index bddce75b63..221d10aa52 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -984,7 +984,9 @@ dpif_netdev_subtable_lookup_set(struct unixctl_conn *conn, int argc OVS_UNUSED, @@ -1274,7 +1274,56 @@ index bddce75b63..0b47c1a486 100644 if (subtbl_changes) { lookup_dpcls_changed++; lookup_subtable_changed += subtbl_changes; -@@ -4061,7 +4063,10 @@ dpif_netdev_execute(struct dpif *dpif, struct dpif_execute *execute) +@@ -2221,13 +2223,24 @@ static void + do_del_port(struct dp_netdev *dp, struct dp_netdev_port *port) + OVS_REQUIRES(dp->port_mutex) + { +- netdev_flow_flush(port->netdev); +- netdev_uninit_flow_api(port->netdev); + hmap_remove(&dp->ports, &port->node); + seq_change(dp->port_seq); + + reconfigure_datapath(dp); + ++ /* Flush and disable offloads only after 'port' has been made ++ * inaccessible through datapath reconfiguration. ++ * This prevents having PMDs enqueuing offload requests after ++ * the flush. However, the flush doesn't provide any synchronization ++ * with the offload thread, so some requests could still be in the ++ * queue. ++ * When only this port is deleted instead of the whole datapath, ++ * revalidator threads are still active and can still enqueue ++ * offload modification or deletion. Managing those stray requests ++ * is done in the offload threads. */ ++ netdev_flow_flush(port->netdev); ++ netdev_uninit_flow_api(port->netdev); ++ + port_destroy(port); + } + +@@ -2711,6 +2724,10 @@ queue_netdev_flow_del(struct dp_netdev_pmd_thread *pmd, + ovsthread_once_done(&offload_thread_once); + } + ++ if (!netdev_is_flow_api_enabled()) { ++ return; ++ } ++ + offload = dp_netdev_alloc_flow_offload(pmd, flow, + DP_NETDEV_FLOW_OFFLOAD_OP_DEL); + dp_netdev_append_flow_offload(offload); +@@ -2758,9 +2775,7 @@ dp_netdev_pmd_remove_flow(struct dp_netdev_pmd_thread *pmd, + ovs_assert(cls != NULL); + dpcls_remove(cls, &flow->cr); + cmap_remove(&pmd->flow_table, node, dp_netdev_flow_hash(&flow->ufid)); +- if (flow->mark != INVALID_FLOW_MARK) { +- queue_netdev_flow_del(pmd, flow); +- } ++ queue_netdev_flow_del(pmd, flow); + flow->dead = true; + + dp_netdev_flow_unref(flow); +@@ -4061,7 +4076,10 @@ dpif_netdev_execute(struct dpif *dpif, struct dpif_execute *execute) flow_hash_5tuple(execute->flow, 0)); } @@ -1286,7 +1335,7 @@ index bddce75b63..0b47c1a486 100644 dp_netdev_execute_actions(pmd, &pp, false, execute->flow, execute->actions, execute->actions_len); dp_netdev_pmd_flush_output_packets(pmd, true); -@@ -4071,6 +4076,24 @@ dpif_netdev_execute(struct dpif *dpif, struct dpif_execute *execute) +@@ -4071,6 +4089,24 @@ dpif_netdev_execute(struct dpif *dpif, struct dpif_execute *execute) dp_netdev_pmd_unref(pmd); } @@ -1311,7 +1360,7 @@ index bddce75b63..0b47c1a486 100644 return 0; } -@@ -8942,9 +8965,12 @@ dpcls_create_subtable(struct dpcls *cls, const struct netdev_flow_key *mask) +@@ -8942,9 +8978,12 @@ dpcls_create_subtable(struct dpcls *cls, const struct netdev_flow_key *mask) /* Get the preferred subtable search function for this (u0,u1) subtable. * The function is guaranteed to always return a valid implementation, and @@ -1326,7 +1375,7 @@ index bddce75b63..0b47c1a486 100644 cmap_insert(&cls->subtables_map, &subtable->cmap_node, mask->hash); /* Add the new subtable at the end of the pvector (with no hits yet) */ -@@ -8973,6 +8999,10 @@ dpcls_find_subtable(struct dpcls *cls, const struct netdev_flow_key *mask) +@@ -8973,6 +9012,10 @@ dpcls_find_subtable(struct dpcls *cls, const struct netdev_flow_key *mask) /* Checks for the best available implementation for each subtable lookup * function, and assigns it as the lookup function pointer for each subtable. * Returns the number of subtables that have changed lookup implementation. @@ -1337,7 +1386,7 @@ index bddce75b63..0b47c1a486 100644 */ static uint32_t dpcls_subtable_lookup_reprobe(struct dpcls *cls) -@@ -8985,10 +9015,13 @@ dpcls_subtable_lookup_reprobe(struct dpcls *cls) +@@ -8985,10 +9028,13 @@ dpcls_subtable_lookup_reprobe(struct dpcls *cls) uint32_t u0_bits = subtable->mf_bits_set_unit0; uint32_t u1_bits = subtable->mf_bits_set_unit1; void *old_func = subtable->lookup_func; diff --git a/SPECS/openvswitch2.16.spec b/SPECS/openvswitch2.16.spec index 3ab5a1f..c12bd43 100644 --- a/SPECS/openvswitch2.16.spec +++ b/SPECS/openvswitch2.16.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.16.0 -Release: 55%{?dist} +Release: 56%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -699,6 +699,13 @@ exit 0 %endif %changelog +* Fri Feb 25 2022 Open vSwitch CI - 2.16.0-56 +- Merging upstream branch-2.16 [RH git: e4d6d108a3] + Commit list: + fb4767b472 dpif-netdev: Fix a race condition in deletion of offloaded flows. + 3e72eae031 dpif-netdev: Move port flush after datapath reconfiguration. + + * Thu Feb 24 2022 Open vSwitch CI - 2.16.0-55 - Merging upstream branch-2.16 [RH git: 970214133d] Commit list: