diff --git a/SOURCES/openvswitch-2.13.0.patch b/SOURCES/openvswitch-2.13.0.patch index 23eecc4..e3f9ac9 100644 --- a/SOURCES/openvswitch-2.13.0.patch +++ b/SOURCES/openvswitch-2.13.0.patch @@ -746,6 +746,21 @@ index 38e52c8deb..55a98e2b0e 100644 Link State Change (LSC) detection configuration ----------------------------------------------- +diff --git a/Documentation/topics/dpdk/pmd.rst b/Documentation/topics/dpdk/pmd.rst +index 6f1fdcbc6f..b017b84f6a 100644 +--- a/Documentation/topics/dpdk/pmd.rst ++++ b/Documentation/topics/dpdk/pmd.rst +@@ -224,7 +224,9 @@ load then the actual reassignment will be performed. + + PMD Auto Load Balancing doesn't currently work if queues are assigned + cross NUMA as actual processing load could get worse after assignment +- as compared to what dry run predicts. ++ as compared to what dry run predicts. The only exception is when all ++ PMD threads are running on cores from a single NUMA node. In this case ++ Auto Load Balancing is still possible. + + The minimum time between 2 consecutive PMD auto load balancing iterations can + also be configured by:: diff --git a/Documentation/topics/dpdk/qos.rst b/Documentation/topics/dpdk/qos.rst index 103495415a..a98ec672fc 100644 --- a/Documentation/topics/dpdk/qos.rst @@ -39921,7 +39936,7 @@ index 68c33a0f96..9b251f81fa 100644 * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c -index d393aab5e3..888325e5f2 100644 +index d393aab5e3..49906960d3 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -83,9 +83,9 @@ @@ -40247,7 +40262,20 @@ index d393aab5e3..888325e5f2 100644 return 0; } -@@ -4940,9 +5083,17 @@ reconfigure_datapath(struct dp_netdev *dp) +@@ -4493,6 +4636,12 @@ struct rr_numa { + bool idx_inc; + }; + ++static size_t ++rr_numa_list_count(struct rr_numa_list *rr) ++{ ++ return hmap_count(&rr->numas); ++} ++ + static struct rr_numa * + rr_numa_list_lookup(struct rr_numa_list *rr, int numa_id) + { +@@ -4940,9 +5089,17 @@ reconfigure_datapath(struct dp_netdev *dp) /* Check for all the ports that need reconfiguration. We cache this in * 'port->need_reconfigure', because netdev_is_reconf_required() can @@ -40267,7 +40295,7 @@ index d393aab5e3..888325e5f2 100644 port->need_reconfigure = true; } } -@@ -5076,7 +5227,7 @@ reconfigure_datapath(struct dp_netdev *dp) +@@ -5076,7 +5233,7 @@ reconfigure_datapath(struct dp_netdev *dp) reload_affected_pmds(dp); /* Check if PMD Auto LB is to be enabled */ @@ -40276,7 +40304,28 @@ index d393aab5e3..888325e5f2 100644 } /* Returns true if one of the netdevs in 'dp' requires a reconfiguration */ -@@ -5320,7 +5471,7 @@ pmd_rebalance_dry_run(struct dp_netdev *dp) +@@ -5189,10 +5346,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); ++ /* If there is no available pmd on the local numa but there is only one ++ * numa for cross-numa polling, we can estimate the dry run. */ ++ if (!numa && rr_numa_list_count(&rr) == 1) { ++ numa = rr_numa_list_next(&rr, NULL); ++ } + if (!numa) { +- /* Abort if cross NUMA polling. */ +- VLOG_DBG("PMD auto lb dry run." +- " Aborting due to cross-numa polling."); ++ VLOG_DBG("PMD auto lb dry run: " ++ "There's no available (non-isolated) PMD thread on NUMA " ++ "node %d for port '%s' and there are PMD threads on more " ++ "than one NUMA node available for cross-NUMA polling. " ++ "Aborting.", numa_id, netdev_rxq_get_name(rxqs[i]->rx)); + goto cleanup; + } + +@@ -5320,7 +5484,7 @@ pmd_rebalance_dry_run(struct dp_netdev *dp) improvement = ((curr_variance - new_variance) * 100) / curr_variance; } @@ -40285,7 +40334,7 @@ index d393aab5e3..888325e5f2 100644 ret = false; } } -@@ -8040,6 +8191,7 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd, +@@ -8040,6 +8204,7 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd, if (pmd->ctx.now > pmd->rxq_next_cycle_store) { uint64_t curr_tsc; @@ -40293,7 +40342,7 @@ index d393aab5e3..888325e5f2 100644 struct pmd_auto_lb *pmd_alb = &pmd->dp->pmd_alb; if (pmd_alb->is_enabled && !pmd->isolated && (pmd->perf_stats.counters.n[PMD_CYCLES_ITER_IDLE] >= -@@ -8056,7 +8208,9 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd, +@@ -8056,7 +8221,9 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd, pmd_load = ((tot_proc * 100) / (tot_idle + tot_proc)); } diff --git a/SPECS/openvswitch2.13.spec b/SPECS/openvswitch2.13.spec index 9dfc2d6..7fed82c 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: 97%{?commit0:.%{date}git%{shortcommit0}}%{?commit1:dpdk%{shortcommit1}}%{?dist} +Release: 98%{?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 @@ -710,6 +710,10 @@ exit 0 %endif %changelog +* Mon Mar 22 2021 Kevin Traynor - 2.13.0-98 +- dpif-netdev: Allow PMD auto load balance with cross-numa. (#1938162) + [edeaca020b9d40fed8a0a474f35eeec5ed4e338f] + * Fri Mar 19 2021 Kevin Traynor - 2.13.0-97 - redhat: Update docs for test builds [0322f225d315978939c35b96237ffe611fa4fd1d]