Hi David,

On 11/10/21 17:53, David Marchand wrote:
Previously in OVS, a PMD thread running on cpu X used lcore X.
This assumption limited OVS to run PMD threads on physical cpu <
RTE_MAX_LCORE.

DPDK 20.08 introduced a new API that associates a non-EAL thread to a free
lcore. This new API does not change the thread characteristics (like CPU
affinity) and let OVS run its PMD threads on any cpu regardless of
RTE_MAX_LCORE.

The DPDK multiprocess feature is not compatible with this new API and is
disabled.

DPDK still limits the number of lcores to RTE_MAX_LCORE (128 on x86_64)
which should be enough for OVS pmd threads (hopefully).

DPDK lcore/OVS pmd threads mapping are logged at threads when trying to
attach a OVS PMD thread, and when detaching.
A new command is added to help get DPDK point of view of the DPDK lcores
at any time:

$ ovs-appctl dpdk/lcore-list
lcore 0, socket 0, role RTE, cpuset 0
lcore 1, socket 0, role NON_EAL, cpuset 1
lcore 2, socket 0, role NON_EAL, cpuset 15

Signed-off-by: David Marchand <[email protected]>
Acked-by: Kevin Traynor <[email protected]>
---
Changes since v7:
- rebased on dpdk-latest,
- removed #pragma,

Changes since v6:
- handled corner case when registering max number of PMD threads, then
   removing all successfully registered, leaving the ones who had failed,
- reworded warning when reaching max number of PMD threads,
- added a comment in command about reaching max number of PMD threads,
- fixed typo in debug command name,

Changes since v5:
- rebased,
- commitlog tweaks,
- dropped use of global ALLOW_EXPERIMENTAL flag and pinpointed
   experimental API,

Changes since v4:
- rebased on the master branch,
- disabled DPDK mp feature,
- updated DPDK documentation and manual with the new command,
- added notes in NEWS,

Changes since v3:
- rebased on current HEAD,
- switched back to simple warning rather than abort when registering a
   thread fails,

Changes since v2:
- introduced a new api in DPDK 20.08 (still being discussed), inbox thread at
   
http://inbox.dpdk.org/dev/[email protected]/T/#t
- this current patch depends on a patch on master I sent:
   
https://patchwork.ozlabs.org/project/openvswitch/patch/[email protected]/
- dropped 'dpdk-lcore-mask' compat handling,

Changes since v1:
- rewired existing configuration 'dpdk-lcore-mask' to use --lcores,
- switched to a bitmap to track lcores,
- added a command to dump current mapping (Flavio): used an experimental
   API to get DPDK lcores cpuset since it is the most reliable/portable
   information,
- used the same code for the logs when starting DPDK/PMD threads,
- addressed Ilya comments,

---
  Documentation/howto/dpdk.rst |  5 +++++
  NEWS                         |  2 ++
  lib/dpdk-stub.c              |  9 +++++++--
  lib/dpdk-unixctl.man         |  3 +++
  lib/dpdk.c                   | 36 +++++++++++++++++++++++++++++++++---
  lib/dpdk.h                   |  3 ++-
  lib/dpif-netdev.c            | 10 +++++++++-
  7 files changed, 61 insertions(+), 7 deletions(-)


The path looks good to me. Multiprocess was not supported before with
OVS, so disabling it is not a problem.

Reviewed-by: Maxime Coquelin <[email protected]>

Thanks,
Maxime

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to