Skip to content

net/mlx5: implicit mempool registration

Dmitry Kozlyuk dpdk-dev 8 versions – Applied

Status from this message: Applied, thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest4 patches 1 replyApplied
  2. v84 patches 1 replySuperseded
  3. v74 patches 0 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v64 patches0 repliesSuperseded
v54 patches2 repliesSuperseded
v44 patches21 repliesSuperseded
v34 patches8 repliesSuperseded
v24 patches3 repliesSuperseded

Changes in v9 from the cover letter

Fix another failure of mempool_autotest.
Use negative result of rte_mempool_populate_iova()
to report errors in unit tests instead of rte_errno.

Patches in v9 Applied

#Subject and filesSizeRepliesApplied
1/4mempool: add event callbacksapp/test/test_mempool.c lib/mempool/rte_mempool.c lib/mempool/rte_mempool.h +1 more+442 -00 replies
2/4mempool: add non-IO flagapp/proc-info/main.c app/test/test_mempool.c doc/guides/rel_notes/release_21_11.rst +2 more+134 -20 replies
3/4common/mlx5: add mempool registration facilitiesdrivers/common/mlx5/mlx5_common_mp.c drivers/common/mlx5/mlx5_common_mp.h drivers/common/mlx5/mlx5_common_mr.c +2 more+666 -00 replies
4/4net/mlx5: support mempool registrationdoc/guides/nics/mlx5.rst doc/guides/rel_notes/release_21_11.rst drivers/net/mlx5/linux/mlx5_mp_os.c +9 more+347 -1160 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchMatan AzradAndrew Rybchenko
1/4A-b R-b
2/4A-b R-b
3/4A-b
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v9 thread

Cover letter [dpdk-dev] [PATCH v9 0/4] net/mlx5: implicit mempool registration

MLX5 hardware has its internal IOMMU where PMD registers the memory. On the data path, PMD translates VA into a key consumed by the device IOMMU. It is impractical for the PMD to register all allocated memory because of increased lookup cost both in HW and SW. Most often mbuf memory comes from mempools, so if PMD tracks them, it can almost always have mbuf memory registered before an mbuf hits the PMD. This patchset adds such tracking in the PMD and internal API to support it.

Please see [1] for the discussion of the patch 2/4 and how it can be useful outside of the MLX5 PMD.

[1]: http://inbox.dpdk.org/dev/CH0PR12MB509112FADB778AB28AF3771DB9F99@CH0PR12MB5091.namprd12.prod.outlook.com/

v9 (CI):
Fix another failure of mempool_autotest.
Use negative result of rte_mempool_populate_iova()
to report errors in unit tests instead of rte_errno.
v8:
Fix mempool_autotest failure on Ubuntu 18.04 (CI).
v7 (internal CI):
1. Fix unit test compilation issues with GCC.
2. Keep rte_mempool_event description non-internal: Doxygen treats it as not documented otherwise, "doc" target fails.
v6:
Fix compilation issue in proc-info (CI).
v5:
1. Change non-IO flag inference + various fixes (Andrew).
2. Fix callback unregistration from secondary processes (Olivier).
3. Support non-IO flag in proc-dump (David).
4. Fix the usage of locks (Olivier).
5. Avoid resource leaks in unit test (Olivier).
v4: (Andrew)
1. Improve mempool event callbacks unit tests and documentation.
2. Make MEMPOOL_F_NON_IO internal and automatically inferred. Add unit tests for the inference logic.
v3: Improve wording and naming; fix typos (Thomas).
v2 (internal review and testing):
1. Change tracked mempool event from being created (CREATE) to being fully populated (READY), which is the state PMD is interested in.
2. Unit test the new mempool callback API.
3. Remove bogus "error" messages in normal conditions.
4. Fixes in PMD.

Dmitry Kozlyuk (4):
mempool: add event callbacks
mempool: add non-IO flag
common/mlx5: add mempool registration facilities net/mlx5: support mempool registration

 app/proc-info/main.c                   |   6 +-
 app/test/test_mempool.c                | 363 ++++++++++++++++
 doc/guides/nics/mlx5.rst               |  13 +
 doc/guides/rel_notes/release_21_11.rst |   9 +
 drivers/common/mlx5/mlx5_common_mp.c   |  50 +++
 drivers/common/mlx5/mlx5_common_mp.h   |  14 +
 drivers/common/mlx5/mlx5_common_mr.c   | 580 +++++++++++++++++++++++++
 drivers/common/mlx5/mlx5_common_mr.h   |  17 +
 drivers/common/mlx5/version.map        |   5 +
 drivers/net/mlx5/linux/mlx5_mp_os.c    |  44 ++
 drivers/net/mlx5/linux/mlx5_os.c       |   4 +-
 drivers/net/mlx5/mlx5.c                | 152 +++++++
 drivers/net/mlx5/mlx5.h                |  10 +
 drivers/net/mlx5/mlx5_mr.c             | 120 ++---
 drivers/net/mlx5/mlx5_mr.h             |   2 -
 drivers/net/mlx5/mlx5_rx.h             |  21 +-
 drivers/net/mlx5/mlx5_rxq.c            |  13 +
 drivers/net/mlx5/mlx5_trigger.c        |  77 +++-
 drivers/net/mlx5/windows/mlx5_os.c     |   1 +
 lib/mempool/rte_mempool.c              | 134 ++++++
 lib/mempool/rte_mempool.h              |  64 +++
 lib/mempool/version.map                |   8 +
 22 files changed, 1589 insertions(+), 118 deletions(-)
Signature · 1 line
2.25.1