patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Robin Jarry" <rjarry@redhat.com>
To: "David Marchand" <david.marchand@redhat.com>,
	"Stephen Hemminger" <stephen@networkplumber.org>
Cc: <dev@dpdk.org>, "Thomas Monjalon" <thomas@monjalon.net>,
	"Ferruh Yigit" <ferruh.yigit@amd.com>,
	"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>,
	"Ciara Power" <ciara.power@intel.com>,
	"Bruce Richardson" <bruce.richardson@intel.com>,
	"Keith Wiles" <keith.wiles@intel.com>, <stable@dpdk.org>
Subject: Re: [PATCH dpdk v3 2/2] ethdev: fix potential race in telemetry endpoints
Date: Tue, 15 Oct 2024 10:04:37 +0200	[thread overview]
Message-ID: <D4W82MPLU2TO.1LM7V38VAN8T4@redhat.com> (raw)
In-Reply-To: <CAJFAV8ytVV5DEuBB=ipMEDy2WvFZgSnqZAxWaf2JkCWhCLgupg@mail.gmail.com>

David Marchand, Oct 15, 2024 at 10:02:
> On Mon, Oct 14, 2024 at 10:01 PM Stephen Hemminger
>> If this happens often, and the function takes a long time (like doing i/o)
>> it might be worth changing this to reader/writer in future.
>
> Yes, this was an option mentionned when we discussed the issue in Montréal.
> For now, a spinlock seems enough.

As far as I know, no ethdev telemetry endpoint handlers do any i/o. They 
only access stuff in memory.

>> Also, would be best to add a comment here as to what is being protected
>> if you do another version.
>
> I can add something when applying, like:
>
> @@ -1400,6 +1400,7 @@ static int eth_dev_telemetry_do(const char *cmd,
> const char *params,
>  {
>         int ret;
>         telemetry_cb fn = arg;
> +       /* Protect against port removal while invoking callback,
> calling ethdev API. */
>         rte_spinlock_lock(rte_mcfg_ethdev_get_lock());
>         ret = fn(cmd, params, d);
>         rte_spinlock_unlock(rte_mcfg_ethdev_get_lock());

Ack, thank you.


  reply	other threads:[~2024-10-15  8:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20241002155709.2522273-1-david.marchand@redhat.com>
2024-10-02 15:57 ` [PATCH 2/2] ethdev: fix race on ports for telemetry commands David Marchand
2024-10-02 16:27   ` Bruce Richardson
2024-10-02 19:06     ` David Marchand
2024-10-02 19:09       ` Robin Jarry
2024-10-02 19:18         ` David Marchand
2024-10-02 19:26           ` Robin Jarry
2024-10-03  9:46             ` Bruce Richardson
2024-10-03  9:58               ` David Marchand
2024-10-08  2:07   ` lihuisong (C)
2024-10-08  6:48     ` David Marchand
2024-10-03 11:24 ` [PATCH dpdk v2 2/2] ethdev: fix potential race in telemetry endpoints Robin Jarry
2024-10-03 11:39   ` Bruce Richardson
     [not found] ` <20241014193237.1992382-1-rjarry@redhat.com>
2024-10-14 19:32   ` [PATCH dpdk v3 " Robin Jarry
2024-10-14 20:01     ` Stephen Hemminger
2024-10-15  8:02       ` David Marchand
2024-10-15  8:04         ` Robin Jarry [this message]
2024-10-15  8:38     ` David Marchand

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=D4W82MPLU2TO.1LM7V38VAN8T4@redhat.com \
    --to=rjarry@redhat.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=bruce.richardson@intel.com \
    --cc=ciara.power@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=keith.wiles@intel.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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).