DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: probb@iol.unh.edu
Subject: [PATCH v4 0/3] Release ethdev shared memory on port cleanup
Date: Wed, 27 Sep 2023 13:45:12 +0200	[thread overview]
Message-ID: <20230927114515.1245213-1-david.marchand@redhat.com> (raw)
In-Reply-To: <20230818091321.2404089-1-david.marchand@redhat.com>

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/20230816153439.551501-12-bruce.richardson@intel.com/T/#m0e4c23f7be80bbdac076a387f4a2f9094dd07e0a


-- 
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


  parent reply	other threads:[~2023-09-27 11:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18  9:13 [PATCH 0/2] " David Marchand
2023-08-18  9:13 ` [PATCH 1/2] ethdev: protect shared memory accesses under one lock David Marchand
2023-08-18  9:13 ` [PATCH 2/2] ethdev: cleanup shared data with the last port David Marchand
2023-08-18 11:36   ` David Marchand
2023-08-18 10:18 ` [PATCH 0/2] Release ethdev shared memory on port cleanup Morten Brørup
2023-08-31 15:34   ` Thomas Monjalon
2023-08-18 13:41 ` [PATCH v2 " David Marchand
2023-08-18 13:41   ` [PATCH v2 1/2] ethdev: protect shared memory accesses under one lock David Marchand
2023-08-18 13:41   ` [PATCH v2 2/2] ethdev: cleanup shared data with the last port David Marchand
2023-08-21  8:58 ` [PATCH v3 0/3] Release ethdev shared memory on port cleanup David Marchand
2023-08-21  8:58   ` [PATCH v3 1/3] ethdev: protect shared memory accesses under one lock David Marchand
2023-08-21  8:58   ` [PATCH v3 2/3] ethdev: avoid panicking in absence of ethdev shared data David Marchand
2023-08-21  8:58   ` [PATCH v3 3/3] ethdev: cleanup shared data with the last port David Marchand
2023-08-31 16:05   ` [PATCH v3 0/3] Release ethdev shared memory on port cleanup Thomas Monjalon
2023-09-01  7:32     ` David Marchand
2023-09-27 11:45 ` David Marchand [this message]
2023-09-27 11:45   ` [PATCH v4 1/3] ethdev: protect shared memory accesses under one lock David Marchand
2023-09-27 11:45   ` [PATCH v4 2/3] ethdev: avoid panicking in absence of ethdev shared data David Marchand
2023-09-27 11:45   ` [PATCH v4 3/3] ethdev: cleanup shared data with the last port David Marchand
2023-10-11 12:53   ` [PATCH v4 0/3] Release ethdev shared memory on port cleanup Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230927114515.1245213-1-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=probb@iol.unh.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).