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 6731C4560E; Fri, 12 Jul 2024 15:50:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4595040653; Fri, 12 Jul 2024 15:50:17 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 2955D402CB for ; Fri, 12 Jul 2024 15:50:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720792214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=slep22XvdPPNMqnZ2/5EoRJ7KbcnOJ9EsWFIHkqD1+w=; b=bddb5XqVqmgpViK3CSkQ4OA5b9+KG+Os7re4+4Yczo0VFLgEy+S6UaoWH58q0j4uUtkUp4 hQv3M9qBrkqvFdqUrSS7I+rVddOMev3J1lA3UwfdScTtD3GmoOvi1oydVYjhWsD5IgIYYQ MgS4MD9qoNJMo2N0VM0kGq/7PTSLTKI= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-387-Ac6JfkE3Of-c3UTQYgzahg-1; Fri, 12 Jul 2024 09:50:13 -0400 X-MC-Unique: Ac6JfkE3Of-c3UTQYgzahg-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-52ea88005bfso2091703e87.2 for ; Fri, 12 Jul 2024 06:50:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720792211; x=1721397011; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=slep22XvdPPNMqnZ2/5EoRJ7KbcnOJ9EsWFIHkqD1+w=; b=IrdELELDodYUb9IwUujI3CfaRHm4bmFyz23i8XvluuW3rfc56UBx+hCbhcAzrCRq9e 5sFa7ze+m3+5UK37mgoH1p11hwpxKTnm4/C08dEtHVI8LhB8Gph/cfkDWqxgF0kiibLk e3xOKrHNtI6bKiz6Ohtvvf9dF2ckZloYaW/OB9iCVo6g13iV4JZLMKiDRIVW+5LnuWK5 SdweGc5X3UBfgsNJhxZIhXrEiAIvXj6Ko9DWF2duPDRND0R5W7w1W4o4NeQZykxZfBpb JAaYdFmkHRYWUMce8oML1FfP/L2a+q1ZnDny8WCeeiHuT97++BRc1Jf2cMFLKab4K1/3 OZXQ== X-Forwarded-Encrypted: i=1; AJvYcCUm3mkdghUNytnqYCTckPwROOJqPIgu8L3rLaI/zLlW7U1ogAoJYAhlhpiLSmDCdbOn4CilndZ2yB7OXUM= X-Gm-Message-State: AOJu0YygE/I2nRV76Czb8ekVBbeRMs0raU+1U/EwrSdouKq46YJ+sVBX eKaSF1+vZINKaqascescNoIWzDG0LcIzcgQXpdhMcSYEMbRibOBn9v885cbW8v1FZp5iWpdiAh6 vgvjbEMH8TnJw//iO2Ov5/3FrVbwANVbu+IfT9iQCUrpkov6cizi+7/iKa9eOyXmUzsGvy+Fc/g XwHnUgE6HBvw/KBsc= X-Received: by 2002:a05:6512:3b82:b0:52c:8abe:51fb with SMTP id 2adb3069b0e04-52eb9991350mr7816249e87.10.1720792211663; Fri, 12 Jul 2024 06:50:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGcMyKP0r1Y4zGm8fCZC+T/PKaUZnG5S38QMfvvjvCD+EpL5h/ujZI3NrrsMs3YoeVacsw6I87QYFiT3MzNz9U= X-Received: by 2002:a05:6512:3b82:b0:52c:8abe:51fb with SMTP id 2adb3069b0e04-52eb9991350mr7816226e87.10.1720792211304; Fri, 12 Jul 2024 06:50:11 -0700 (PDT) MIME-Version: 1.0 References: <20240701200117.6349-1-shperetz@nvidia.com> <20240708165145.1405107-1-shperetz@nvidia.com> In-Reply-To: <20240708165145.1405107-1-shperetz@nvidia.com> From: David Marchand Date: Fri, 12 Jul 2024 15:49:59 +0200 Message-ID: Subject: Re: [PATCH v3] eal/common: fix inconsistent representation of PCI numbers To: Shani Peretz Cc: chenbox@nvidia.com, dev@dpdk.org, dsosnowski@nvidia.com, jblunck@infradead.org, mkashani@nvidia.com, nipun.gupta@amd.com, roretzla@linux.microsoft.com, thomas@monjalon.net X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Jul 8, 2024 at 6:52=E2=80=AFPM Shani Peretz w= rote: > > DPDK allows for two ways to specify PCI device numbers: > a full version ("0000:08:00.0") and a short version ("08:00.0"). > The problem arises when the application uses one format (e.g., full) > when running testpmd, but then tries to use the other format (e.g., short= ) > in a subsequent command, leading to a failure. > > The cmp_dev_name func, which is responsible for comparing PCI device name= s, > is not handling the inconsistent PCI number representations correctly. > The suggested fix is to use the pci_parse function, which can parse > the PCI device name and fill a struct rte_pci_addr with the standardized > representation of the PCI number. > By comparing the struct rte_pci_addr instances instead of the string > representations, the application can ensure consistent handling of > PCI device numbers, regardless of the format used. > > Fixes: a3ee360f4440 ("eal: add hotplug add/remove device") > Cc: jblunck@infradead.org > > Signed-off-by: Shani Peretz > Acked-by: Dariusz Sosnowski > Acked-by: Thomas Monjalon I find it strange that Thomas acked this patch (for example, the commit title prefix is wrong). I don't understand the issue. Please provide a reproducer. And ideally we need a unit test to track regressions on this topic. Thanks. --=20 David Marchand