There are currently some checks for cross-numa polling cases to
ensure that they won't effect the accuracy of the PMD ALB.

If an rxq is pinned to a pmd core by the user it will not be
reassigned by OVS, so even if it is non-local numa polled it
will not impact PMD ALB accuracy.

To establish this, a check was made on whether the pmd core was
isolated or not. However, since other_config:pmd-rxq-isolate was
introduced, rxqs may be pinned but the pmd core not isolated.

It means that by setting pmd-rxq-isolate=false and doing non-local
numa pinning, PMD ALB may not run where it should.

If the core is isolated we can skip individual rxq checks but if not,
we should check the individual rxqs for pinning before we disallow
PMD ALB.

Also, update function comments to make it's operation clearer.

Fixes: 6193e03267c1 ("dpif-netdev: Allow pin rxq and non-isolate PMD.")

Signed-off-by: Kevin Traynor <ktray...@redhat.com>
---
 lib/dpif-netdev.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 9ae488d6e..dce4a6d42 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -5685,4 +5685,6 @@ sched_numa_list_put_in_place(struct sched_numa_list 
*numa_list)
 }
 
+/* Returns 'true' if OVS rxq scheduling algorithm assigned any unpinned rxq to
+ * a pmd core on a non-local numa node. */
 static bool
 sched_numa_list_cross_numa_polling(struct sched_numa_list *numa_list)
@@ -5690,16 +5692,19 @@ sched_numa_list_cross_numa_polling(struct 
sched_numa_list *numa_list)
     struct sched_numa *numa;
 
-    /* For each numa */
     HMAP_FOR_EACH (numa, node, &numa_list->numas) {
-        /* For each pmd */
         for (int i = 0; i < numa->n_pmds; i++) {
             struct sched_pmd *sched_pmd;
 
             sched_pmd = &numa->pmds[i];
-            /* For each rxq. */
+            if (sched_pmd->isolated) {
+                /* All rxqs on this pmd core are pinned. */
+                continue;
+            }
             for (unsigned k = 0; k < sched_pmd->n_rxq; k++) {
                 struct dp_netdev_rxq *rxq = sched_pmd->rxqs[k];
-
-                if (!sched_pmd->isolated &&
+                /* Check if the rxq is not pinned to a specific pmd core by the
+                 * user AND the pmd core that OVS assigned is non-local to the
+                 * rxq port. */
+                if (rxq->core_id == OVS_CORE_UNSPEC &&
                     rxq->pmd->numa_id !=
                         netdev_get_numa_id(rxq->port->netdev)) {
-- 
2.34.1

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to