From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5ECAC45D45 for ; Tue, 19 Nov 2024 17:22:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 50CF340B94; Tue, 19 Nov 2024 17:22:27 +0100 (CET) Received: from fout-a2-smtp.messagingengine.com (fout-a2-smtp.messagingengine.com [103.168.172.145]) by mails.dpdk.org (Postfix) with ESMTP id 186754028A; Tue, 19 Nov 2024 17:22:25 +0100 (CET) Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfout.phl.internal (Postfix) with ESMTP id A0506138010C; Tue, 19 Nov 2024 11:22:24 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Tue, 19 Nov 2024 11:22:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1732033344; x=1732119744; bh=iLZPH130DQg3wvZVtYE9L094I4Dx9g8BaaZn0baaP08=; b= mrtnEyN0jdlMugeCWShLwh8qRPEO/eyU1FWAAnxsOLIsZsQsowEUEOW43WOTgrjY ZkQm5HgH0/vmxAcWT/QrnpWm0tOAjk3SWKTkKNt3UAAdS23+Nr3DODpPd3esuFT6 pTOm3OSxnLxaTKEyDQC13p5ELUAc/A3uzcSM68zCUPuXZLW1mwqYLtznzpnd6q85 Bz+30EOMNcSjAsQYdC4Jzba5PoKU/mJEE8SmAGuUTLElAWYiDnlRIhWAy3fObZSD ok/gRRp/yFHy5QGeWxLVi1asxXCPjNmz4FziadK2yhg87cdkBaHWdVdp4GiWDgRr op4R12xUwG/RpWLOStwilQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1732033344; x= 1732119744; bh=iLZPH130DQg3wvZVtYE9L094I4Dx9g8BaaZn0baaP08=; b=W j2Bu5wTXpFdB7Qfk7Gq5CIbjzfyMIsHnC/kk5Kb4fbjjvC+vuj5CscdV2csSPAUW 2+BjtVxaGRZRP2PO+F8+pceii3EGuVZ3etwJYqq6NHHbDPBwHLo02z2kFaesJ0pI h7bDNqbIiM3HFRAFj99UegksWRqxwIdFKEM0sHlh9BgVrhWsDZMs7/hf7cujKZJi 1SOEoHR02jaNKtcd/t7ZjaDXzsPkufswoX+EHOZNv0HiK0w789E+IG4QQW14oh9o V6fQlKsGR52x/LJkf11JNSy7L67y/o1WVyOMk7wlxtu8Vq93LSpPNeQIrskdyOb/ Jr8wNFYrvHptbGMnWC4pQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrfedvgdekhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecu hfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlh honhdrnhgvtheqnecuggftrfgrthhtvghrnhepjeduveehieevuddutdevfffgtdegkeeu veejffejgedtgeegkefgvdeugfefkeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvthdpnhgs pghrtghpthhtohepjedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepsghruhgtvg drrhhitghhrghrughsohhnsehinhhtvghlrdgtohhmpdhrtghpthhtohepuggvvhesughp ughkrdhorhhgpdhrtghpthhtohepshhtrggslhgvseguphgukhdrohhrghdprhgtphhtth hopehfvghrrhhuhhdrhihighhithesrghmugdrtghomhdprhgtphhtthhopegrnhgurhgv fidrrhihsggthhgvnhhkohesohhkthgvthhlrggsshdrrhhupdhrtghpthhtohephihlih husehfrhhiuggrhihlihhnuhigrdhorhhgpdhrtghpthhtohepshhhphgvrhgvthiisehn vhhiughirgdrtghomh X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 19 Nov 2024 11:22:22 -0500 (EST) From: Thomas Monjalon To: Bruce Richardson Cc: dev@dpdk.org, stable@dpdk.org, Ferruh Yigit , Andrew Rybchenko , Yuanhan Liu , Shani Peretz Subject: Re: [PATCH] ethdev: allow using devices with shortened PCI addresses Date: Tue, 19 Nov 2024 17:22:21 +0100 Message-ID: <4711627.CvnuH1ECHv@thomas> In-Reply-To: <20241119155723.2307189-1-bruce.richardson@intel.com> References: <20241119155723.2307189-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 19/11/2024 16:57, Bruce Richardson: > When using a secondary process, e.g. pdump, not all PCI devices will be > probed correctly if the primary process has allowlisted devices using > the shortened syntax, omitting the initial "0000:" domain. This is due > to the strcmp failing to match a full address with a shortened one. > > Fix this issue by comparing the device names/addresses normally and then > having a special case second comparison for devices which start with > "0000:". > > Fixes: d948f596fee2 ("ethdev: fix port data mismatched in multiple process model") > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson > --- > lib/ethdev/ethdev_driver.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/lib/ethdev/ethdev_driver.c b/lib/ethdev/ethdev_driver.c > index 9afef06431..e5590076c1 100644 > --- a/lib/ethdev/ethdev_driver.c > +++ b/lib/ethdev/ethdev_driver.c > + /* for PCI devices, allow specifying name without a leading "0000:" */ > + if (strncmp(name, "0000:", 5) == 0 && /* is PCI address */ > + strcmp(eth_dev_shared_data->data[i].name, &name[5]) == 0) > + break; I'm afraid it is not enough in all cases. Shani is preparing a patch which uses the same PCI address formatting in all cases.