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 1AEBD462AE for ; Mon, 24 Feb 2025 21:38:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0D35D427C6; Mon, 24 Feb 2025 21:38:35 +0100 (CET) Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by mails.dpdk.org (Postfix) with ESMTP id 2C6E040DD0 for ; Mon, 24 Feb 2025 21:38:32 +0100 (CET) Received: by mail-pj1-f49.google.com with SMTP id 98e67ed59e1d1-2fbfc9ff0b9so7579745a91.2 for ; Mon, 24 Feb 2025 12:38:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1740429511; x=1741034311; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=caX+1oC37UzadIhwIGH6xLVfirCRuauWoaWz2hGKc+Y=; b=I5tp5Gs7FwftCLMqy9V4+UWTn7I7MwB874BgQMMumM3qb5eYbLYegalj6TwQI4o/ak Wa9bqupkQHGoIb1fyLsAfdOQYyZL4Tatr1OklEnHQ9Ids5ro2SYUnL55/wdNh5lEkLG3 BK7DYY6rCofW4qusDSe2qvRnlhZ6cclDEV8mecReCjDlx7CTAUsx0JaAE4LbUaumO21a xJZoTfQ/egbHvIJSFXqIEiSETfpZDLGKyDBoUZmujMRFWxdQCVswy8Dbc1s65Zeb58R2 94pz1/2CZZAx3/AwV1jFFXc96/PF6AkzLkOqE0E5PzVNvZ8WOyJZ+fMF/z37fdmN6dHG PF3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740429511; x=1741034311; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=caX+1oC37UzadIhwIGH6xLVfirCRuauWoaWz2hGKc+Y=; b=CdT3Z8jfsDMMPH3N7QIh72EqVNUgklH0GmLxTtryCTg6dEuFC3AeJ/rjMHctqvK4ye AAGK4zz57HHiajfl8NfZgWTUwqtfGv+fbQd4NOaLpAaPv22rFGr/I/0eUergryaMoQvs V24PT0WtRICMaul8k2TaM1/I6m5dZQUdfS5/3yYGcxhjLvkSIfOnpdg88c5D8gAki7NQ aiEZp1v1h20FxO2a59qEJLlbLPTxAiyCSsNmUJ0H+RVbI4HsIc9F0xKH2PXPFPS1b4b6 CPuuR7VmsKMxVxyazjTLsy1GRnv93izSb7WWvp6rn6atHP1ey2lnX8EnLkzyNOuI5iIZ ThRA== X-Forwarded-Encrypted: i=1; AJvYcCXpx64DHCjHD2TrYXxK1cUCDlctSmDbyiyGvynNOlEZhqNTmogturLsfFVDjlPg/WoGqO/HPs8=@dpdk.org X-Gm-Message-State: AOJu0YxrwwzIHEj4qc3cXoUmo1XP1kDTX2u1I93rb+/hrocFlGdVrE5M LvicoBxAs7s8hQv0DZSbAHz89FzxQoPz04nsGSYKJqG4cr+MuQ6Ja3UZKB1fXng= X-Gm-Gg: ASbGncui8HyY2WU63+CzJAe4JE0TbWPGTIiqLHyd1CpLoi2PK1JQTqkYslkrKBT2XyY gaEPTUDcbxBq6JiYvR5XyAyKxrTajiB7UAo7tqf1OIUnLce0DqlBXvQFqz6nJzGC8UcI6EB1MsY oWmCM9QGkqGdZNwFyGKGbOwUjonwkKg7wW5M/5pKPGGEEeKUa+ozaBrEkTDQ6w2hDQKxNf3fWwC 0yFIHZSjoads30C3ywDoaYzwo6gZUN0wseXwPmvjfcJbTwZKZlNzAt/SnHWaNlp2gdBfYFJFMWO gL2X32wqheWL42miE0jJO+pDpgRT7oUEGZWQP0+s7OMFVIZvGP6dAFobjhkQEfl4KHD+xGe2N+k jFm4= X-Google-Smtp-Source: AGHT+IFp1GBurCBGNH8C+oVnxvOA99xQDKHsl77kyr+zRmLEsAW0PswKPx2rNZvzlHAWsKSUSYSdgA== X-Received: by 2002:a17:90b:254d:b0:2f6:be57:49cd with SMTP id 98e67ed59e1d1-2fe68cf4016mr847281a91.25.1740429511265; Mon, 24 Feb 2025 12:38:31 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2230a0b2387sm238325ad.258.2025.02.24.12.38.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2025 12:38:30 -0800 (PST) Date: Mon, 24 Feb 2025 12:38:28 -0800 From: Stephen Hemminger To: Shani Peretz Cc: , , Chenbo Xia , Nipun Gupta , Gaetan Rivet Subject: Re: [PATCH v7 1/4] bus/pci: fix registration of PCI device Message-ID: <20250224123828.2feb3e56@hermes.local> In-Reply-To: <20250212163836.178976-1-shperetz@nvidia.com> References: <20250206105428.237346-1-shperetz@nvidia.com> <20250212163836.178976-1-shperetz@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Wed, 12 Feb 2025 18:38:32 +0200 Shani Peretz wrote: > When registering a new PCI device, the device->name field stored > the user-provided string from devargs (e.g., "08:00.0" or "0000:08:00.0"). > This approach led to inconsistencies when registering new devices. > > This patch fix this issue by saving the parsed PCI in device->name, > so when a new PCI device is registering the name displayed in the device > list will be the parsed version. > > Fixes: 23eaa9059ec2 ("bus/pci: use given name as generic name") > > Cc: stable@dpdk.org > Signed-off-by: Shani Peretz Is there a bugzilla entry for this? Would like to be able to see what exactly was broken. The PCI name thing goes back to 17.01 release where this was added. Did something regress? If so why is there no test for this? commit 23eaa9059ec24e95e32361f333ed0686f82bea74 Author: Gaetan Rivet Date: Sat Jul 15 19:56:39 2017 +0200 bus/pci: use given name as generic name When an application requests the use of a PCI device, it can currently interchangeably use either the longform DomBDF format (0000:00:00.0) or the shorter BDF format (00:00.0). When a device is inserted via the hotplug API, it must first be scanned and then will be identified by its name using `find_device`. The name of the device must match the name given by the user to be found and then probed. A new function sets the expected name for a scanned PCI device. It was previously generated from parsing the PCI address. This canonical name is superseded when an rte_devargs exists describing the device. In such case, the device takes the given name found within the rte_devargs. As the rte_devargs is linked to the rte_pci_device during scanning, it can be avoided during the probe. Additionally, this fixes the issue of the rte_devargs lookup not being done within rte_pci_probe_one. Fixes: beec692c5157 ("eal: add name field to generic device") Cc: stable@dpdk.org Signed-off-by: Gaetan Rivet