Previously, if pmd-rxq-affinity was used to pin an rxq to
a core that was not in pmd-cpu-mask the rxq was not polled
for and the user received a warning. This meant that no traffic
would be received from that rxq.

Now that pinned and non-pinned rxqs are assigned to PMDs in
a common call to rxq scheduling, if an invalid core is
selected in pmd-rxq-affinity the rxq can be assigned an
available PMD (if any).

A warning will still be logged as the requested core could
not be used.

Signed-off-by: Kevin Traynor <ktray...@redhat.com>
Acked-by: Sunil Pai G <sunil.pa...@intel.com>
Acked-by: David Marchand <david.march...@redhat.com>
---
 Documentation/topics/dpdk/pmd.rst | 6 +++---
 lib/dpif-netdev.c                 | 5 ++++-
 tests/pmd.at                      | 5 ++++-
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/Documentation/topics/dpdk/pmd.rst 
b/Documentation/topics/dpdk/pmd.rst
index e481e7941..065bd16ef 100644
--- a/Documentation/topics/dpdk/pmd.rst
+++ b/Documentation/topics/dpdk/pmd.rst
@@ -108,7 +108,7 @@ means that this thread will only poll the *pinned* Rx 
queues.
 
    If there are no *non-isolated* PMD threads, *non-pinned* RX queues will not
-   be polled. Also, if the provided ``<core-id>`` is not available (e.g. the
-   ``<core-id>`` is not in ``pmd-cpu-mask``), the RX queue will not be polled
-   by any PMD thread.
+   be polled. If the provided ``<core-id>`` is not available (e.g. the
+   ``<core-id>`` is not in ``pmd-cpu-mask``), the RX queue will be assigned to
+   a *non-isolated* PMD, that will remain *non-isolated*.
 
 If ``pmd-rxq-affinity`` is not set for Rx queues, they will be assigned to PMDs
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index aa8e42503..3a3aecac8 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -5208,9 +5208,12 @@ sched_numa_list_schedule(struct sched_numa_list 
*numa_list,
                             "Core %2u cannot be pinned with "
                             "port \'%s\' rx queue %d. Use pmd-cpu-mask to "
-                            "enable a pmd on core %u.",
+                            "enable a pmd on core %u. An alternative core "
+                            "will be assigned.",
                             rxq->core_id,
                             netdev_rxq_get_name(rxq->rx),
                             netdev_rxq_get_queue_id(rxq->rx),
                             rxq->core_id);
+                    rxqs = xrealloc(rxqs, (n_rxqs + 1) * sizeof *rxqs);
+                    rxqs[n_rxqs++] = rxq;
                     continue;
                 }
diff --git a/tests/pmd.at b/tests/pmd.at
index 406f25c89..f3020e184 100644
--- a/tests/pmd.at
+++ b/tests/pmd.at
@@ -590,7 +590,10 @@ AT_CHECK([ovs-vsctl set Open_vSwitch . 
other_config:pmd-cpu-mask=6])
 
 dnl We removed the cores requested by some queues from pmd-cpu-mask.
-dnl Those queues will not be polled.
+dnl Those queues will be polled by remaining non-isolated pmds.
 AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
+p1 0 0 1
+p1 1 0 1
 p1 2 0 2
+p1 3 0 1
 ])
 
-- 
2.31.1

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

Reply via email to