patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Artemy Kovalyov <artemyko@nvidia.com>
To: <dev@dpdk.org>
Cc: Thomas Monjalon <thomas@monjalon.net>, <stable@dpdk.org>,
	Qi Zhang <qi.z.zhang@intel.com>,
	Anatoly Burakov <anatoly.burakov@intel.com>
Subject: [PATCH v2 2/5] eal: fix multiprocess hotplug race
Date: Thu, 7 Mar 2024 07:01:10 +0000	[thread overview]
Message-ID: <20240307070113.29580-3-artemyko@nvidia.com> (raw)
In-Reply-To: <20240307070113.29580-1-artemyko@nvidia.com>

There exists a time gap between the creation of the multiprocess channel
and the registration of request action handlers. Within this window, a
secondary process that receives an eal_dev_mp_request broadcast
notification might respond with ENOTSUP. This, in turn, causes the
rte_dev_probe() operation to fail in another secondary process.
To avoid this, disregarding ENOTSUP responses to attach notifications.

Fixes: 244d5130719c ("eal: enable hotplug on multi-process")
Cc: stable@dpdk.org

Signed-off-by: Artemy Kovalyov <artemyko@nvidia.com>
---
 lib/eal/common/hotplug_mp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/eal/common/hotplug_mp.c b/lib/eal/common/hotplug_mp.c
index 6027819..e6a3f6b 100644
--- a/lib/eal/common/hotplug_mp.c
+++ b/lib/eal/common/hotplug_mp.c
@@ -428,6 +428,9 @@ int eal_dev_hotplug_request_to_secondary(struct eal_dev_mp_req *req)
 			if (req->t == EAL_DEV_REQ_TYPE_ATTACH &&
 				resp->result == -EEXIST)
 				continue;
+			if (req->t == EAL_DEV_REQ_TYPE_ATTACH &&
+				resp->result == -ENOTSUP)
+				continue;
 			if (req->t == EAL_DEV_REQ_TYPE_DETACH &&
 				resp->result == -ENOENT)
 				continue;
-- 
1.8.3.1


       reply	other threads:[~2024-03-07  7:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20231212042517.164353-2-artemyko@nvidia.com>
     [not found] ` <20240307070113.29580-1-artemyko@nvidia.com>
2024-03-07  7:01   ` Artemy Kovalyov [this message]
2024-03-13 16:05     ` Burakov, Anatoly
2024-03-07  7:01   ` [PATCH v2 3/5] ipc: fix mp channel closure to prevent message loss Artemy Kovalyov
2024-03-13 16:06     ` Burakov, Anatoly
2024-03-07  7:01   ` [PATCH v2 4/5] eal: fix first time primary autodetect Artemy Kovalyov
2024-03-13 16:06     ` Burakov, Anatoly
2024-03-07  7:01   ` [PATCH v2 5/5] eal: fix memzone fbarray cleanup Artemy Kovalyov
2024-03-13 16:17     ` Burakov, Anatoly

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=20240307070113.29580-3-artemyko@nvidia.com \
    --to=artemyko@nvidia.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.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).