Skip to content

Release ethdev shared memory on port cleanup

David Marchand dpdk-dev 4 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. v4 Latest3 patches 1 replyApplied
  2. v33 patches 2 repliesSuperseded
  3. v22 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches3 repliesSuperseded

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/3ethdev: protect shared memory accesses under one locklib/eal/common/eal_common_mcfg.c lib/eal/common/eal_memcfg.h lib/eal/include/rte_eal_memconfig.h +5 more+68 -520 replies
2/3ethdev: avoid panicking in absence of ethdev shared datalib/ethdev/ethdev_driver.c lib/ethdev/ethdev_private.c lib/ethdev/ethdev_private.h +2 more+60 -270 replies
3/3ethdev: cleanup shared data with the last portlib/ethdev/ethdev_driver.c lib/ethdev/ethdev_private.c lib/ethdev/ethdev_private.h +1 more+33 -10 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchMorten Brørup
1/3A-b
2/3
3/3A-b

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

Read the v4 thread

Cover letter [PATCH v4 0/3] Release ethdev shared memory on port cleanup

This series was triggered after investigating why the eal_flags_file_prefix_autotest unit test was failing in the case of statically built binaries [1]).

For now, I went with a simple (naive) approach and put all accesses to the shared data under a single lock: ethdev maintainers, it is your turn to shine and give me reasons why we should keep the locks the way they were ;-).
And let's see what the CI reports...

1: https://inbox.dpdk.org/dev/[email protected]/T/#m0e4c23f7be80bbdac076a387f4a2f9094dd07e0a

Signature · 31 lines
David Marchand

Changes since v3:
- updated commitlogs,

Changes since v2:
- fixed multiprocess via patch 2,
- fixed "ownership" history (not releasing shared mem if some owner is
  registered),

Changes since v1:
- fixed uaf in port cleanup,

David Marchand (3):
  ethdev: protect shared memory accesses under one lock
  ethdev: avoid panicking in absence of ethdev shared data
  ethdev: cleanup shared data with the last port

 lib/eal/common/eal_common_mcfg.c    |  6 ++
 lib/eal/common/eal_memcfg.h         |  1 +
 lib/eal/include/rte_eal_memconfig.h |  4 ++
 lib/eal/version.map                 |  1 +
 lib/ethdev/ethdev_driver.c          | 53 ++++++++++-----
 lib/ethdev/ethdev_private.c         | 38 +++++++----
 lib/ethdev/ethdev_private.h         | 13 +++-
 lib/ethdev/ethdev_trace.h           |  6 +-
 lib/ethdev/rte_ethdev.c             | 99 ++++++++++++++++++-----------
 9 files changed, 151 insertions(+), 70 deletions(-)

-- 
2.41.0