DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal/hotplug: suppress one error log on primary process
@ 2021-05-19  6:45 Changpeng Liu
  2021-07-10  8:12 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Changpeng Liu @ 2021-05-19  6:45 UTC (permalink / raw)
  To: dev; +Cc: changpeng.liu

This is a normal case that the primary process already
owned one PCI device while the secondary process try to
attach it, so suppress the error log here to exclude
this case.

Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
---
 lib/eal/common/hotplug_mp.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/eal/common/hotplug_mp.c b/lib/eal/common/hotplug_mp.c
index ae6010e..bf55056 100644
--- a/lib/eal/common/hotplug_mp.c
+++ b/lib/eal/common/hotplug_mp.c
@@ -98,10 +98,9 @@ static int cmp_dev_name(const struct rte_device *dev, const void *_name)
 	memset(&da, 0, sizeof(da));
 	if (req->t == EAL_DEV_REQ_TYPE_ATTACH) {
 		ret = local_dev_probe(req->devargs, &dev);
-		if (ret != 0) {
+		if (ret != 0 && ret != -EEXIST) {
 			RTE_LOG(ERR, EAL, "Failed to hotplug add device on primary\n");
-			if (ret != -EEXIST)
-				goto finish;
+			goto finish;
 		}
 		ret = eal_dev_hotplug_request_to_secondary(&tmp_req);
 		if (ret != 0) {
-- 
1.9.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] eal/hotplug: suppress one error log on primary process
  2021-05-19  6:45 [dpdk-dev] [PATCH] eal/hotplug: suppress one error log on primary process Changpeng Liu
@ 2021-07-10  8:12 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2021-07-10  8:12 UTC (permalink / raw)
  To: Changpeng Liu; +Cc: dev

19/05/2021 08:45, Changpeng Liu:
> This is a normal case that the primary process already
> owned one PCI device while the secondary process try to
> attach it, so suppress the error log here to exclude
> this case.
> 
> Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>

Applied, thanks.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-10  8:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19  6:45 [dpdk-dev] [PATCH] eal/hotplug: suppress one error log on primary process Changpeng Liu
2021-07-10  8:12 ` Thomas Monjalon

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git