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 A107B45D44; Tue, 19 Nov 2024 17:29:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3EE304029B; Tue, 19 Nov 2024 17:29:39 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by mails.dpdk.org (Postfix) with ESMTP id 31AE84028A; Tue, 19 Nov 2024 17:29:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1732033777; x=1763569777; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=qSN7kGxWGyI2YAj2KH/9y6BuR7wSYX1YDNdQdwCXf8Y=; b=KriHdY3NQLHqJzzRE5yE2oWayF8BEBXuQUv9qwVezDeNYS5etW4O3npx nqujQ1oDwslMhp+gG4+hevG1FEOu3yba04TdskSDxiyG9Zlo2LofP1xj6 dxmhui7zEzN69+IdCs2Jk5MuqSWLY/voQS8G93wsGgtuRT9vc1ItwTPFP BQOVyluiu+Ujj8TZTUmpBS6Ra9eGZiGTVrFnKxuYSaJdaL1bjMdl3z0g2 75VxXpCqmefhJ6G0cWSrzLm4O1GuTcXR5aim5AI44iIR8I0yaBwhifmBh 82RI0Nj2Z8DQGoVjoM9Pr6nZ8wv0MMn0UJQcXpIdDR89WEUNBCeidqqyb w==; X-CSE-ConnectionGUID: Wta1zX2pQayAGXSqTLWKpg== X-CSE-MsgGUID: CYTSgWOpTF+mFBzhs7ktZw== X-IronPort-AV: E=McAfee;i="6700,10204,11261"; a="31972291" X-IronPort-AV: E=Sophos;i="6.12,166,1728975600"; d="scan'208";a="31972291" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2024 08:29:36 -0800 X-CSE-ConnectionGUID: MxCwXkpbQ1y8IDa4URyApg== X-CSE-MsgGUID: eJ5kTJJvStuyRU2HbFSgvQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,166,1728975600"; d="scan'208";a="90018142" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmviesa010.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 19 Nov 2024 08:29:36 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 19 Nov 2024 08:29:35 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 19 Nov 2024 08:29:35 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.170) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 19 Nov 2024 08:29:35 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YYA3pLBnSLOJMOvj+1qr54LfQSuUEDmX9OMKeK4CHxOEWuUDl5OC/Zthn8jpa4P5wrEbDKs6jAkuZUHp+BbkBRwTVFNyyA5EqRYNnOLgfc/oTQ1Kl9AaOjSBoX0Gvp9OozHD6xtqADlsfz/5k+OxGxlKqZOo47tYXKwe3VIzlkTSDUd3ihfWdcn8tM4vDICt5b185A4/3xd5C1PC+qq7/3W2QBUZnkx+hxPoHWRVvGoek8mTpAoTkDhbWGcFQV0cVtL8w7rYk8wU0IT0fTvTZbRrkHYCfcVP04j1I6s3OucYo4zGtP6W6iSQzaSDPS3USDmF0T/sYLubrfPqToZC5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YhCHMnaBdWb1uXtYdGPnL6P8HCJRRiscehzXKEE3SHU=; b=zFtGDZ/9eZ+tpPu1AJe0BNzJG5FDp00A0IDLrPhIdKaFQXCAc5wNp8ofR4J05tP15AKhcmCo8M5sG0LwHuiFjMF/PKMOZpPUnY1rcssaFV7WQaBg2GzI3i/adlSWTkCOA3YuM9l1lglpGbuD9/5wYwtBGrIt9wA3JqqMYfKY1ar2LXfJrZlyEHrB5sbrVk7yuI6Bn26HGjcpbARWmhE8SVV8hSo8G3GGhqVUp01OR6MeFNI7+NBRZ0OGkOhHhxbfJghkird98q9fzbuFDp/JX9ZqKhSKZ7UyX87GWBrbY4w8yF4EdP7du3ZfaaNOZvphsWm/HhN2SJ22D+PhPbVQ3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by PH8PR11MB6879.namprd11.prod.outlook.com (2603:10b6:510:229::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.21; Tue, 19 Nov 2024 16:29:32 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%4]) with mapi id 15.20.8093.018; Tue, 19 Nov 2024 16:29:32 +0000 Date: Tue, 19 Nov 2024 16:29:26 +0000 From: Bruce Richardson To: Thomas Monjalon CC: , , Ferruh Yigit , Andrew Rybchenko , Yuanhan Liu , Shani Peretz Subject: Re: [PATCH] ethdev: allow using devices with shortened PCI addresses Message-ID: References: <20241119155723.2307189-1-bruce.richardson@intel.com> <4711627.CvnuH1ECHv@thomas> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <4711627.CvnuH1ECHv@thomas> X-ClientProxiedBy: DUZPR01CA0122.eurprd01.prod.exchangelabs.com (2603:10a6:10:4bc::26) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|PH8PR11MB6879:EE_ X-MS-Office365-Filtering-Correlation-Id: 3a0da4e3-a839-426e-59d8-08dd08b758fa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?sBo+6/wfSiHBBzGn/ojtccctES1ReLw2JUm1j/FkTHyv5dtYUtLT7YEysw/I?= =?us-ascii?Q?DZZD3raAvi9OpzD7gMGxSl9H+UJbaF1ovPbs8J6HmUteP9WNjiEHHZK2rW2q?= =?us-ascii?Q?P5CN54bfFKB2E4cKEAdfrbieGC6LDQtUIdmmezkC1c4O+rCwRrUz/krmCMZ8?= =?us-ascii?Q?Q82vwoEp3SAG8KtcwYp87McYYX/BUOAGeiVa/2Ni7cncGzZ50omxTYdUGck/?= =?us-ascii?Q?KSkjyTUhG7lL1W3UGm6TC2MZ27QfBwcH3eXBNByAkeHl8Row2T+bmGheckMU?= =?us-ascii?Q?GbbThjE9wZNmUzHUQ3HmB4fWdGolpCcoMCskxKMxQVpRKRDEv6Jcft76OdtU?= =?us-ascii?Q?sGG8hbO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PEkuoM000PF?= =?us-ascii?Q?MU6Sky1N/9DMgGx9K6yYcvsDss2StHXVVm9s3Hi2dYmXO2fKzQRT3KZfhXdd?= =?us-ascii?Q?+myuNH4LyfxRcGUM/Do0VAOP?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?AwhtaBqQ8+jeQWqzRro2iE++5t0830YIB3NY6DGOwkq7hveHmCThHzF/sRDM?= =?us-ascii?Q?qrVZpfjRKRiCUc4sMdvdz71Y70rqaG+9E0v0SFWcG+C4opGXaVsfSYpW3aLo?= =?us-ascii?Q?htlpj5Tpembsjpct+j9V4sPOqFJWxFzH5BXpl7pzkHYg0hlFQKYhkNGG1e10?= =?us-ascii?Q?ozVoM+ezvAUogxAPvXRcfwC4WtC8uWIRrFZNN0zTTAqs4j8/YUTIorRwWA2n?= =?us-ascii?Q?G1Tni5qAfiTAcMt7pC9uaN8i1hao6fMoL6osn80DnBBcXW+zTWOf0QQWUa7v?= =?us-ascii?Q?uCa1/H6Qi353YuNdUpp8zcQuY19qa2ARqlYqlET+Sj9PIoxehRWNnARbH4fZ?= =?us-ascii?Q?vE7Vxz1/TajB1f/AEcghmEljtuXoEPlpwJ/GYV6Jt3ZuBQ4K+A+pL0UP3Y9i?= =?us-ascii?Q?ulGNFjBYz/elO3Jm7wdo4kU3zl7p2O6iprIWj07tpHLifnPEDdIxchsTj+24?= =?us-ascii?Q?zv79CNZyS9kEx0tLAK81QLr3VFXnoKE/kFsOsmGa+fI/VbhF581+7GOh2S0p?= =?us-ascii?Q?KH0HlVZWv6LSgqXRI1FgrS0Dle5naWY8apsUJcbOSN5qNaEG9XJluPWma4L6?= =?us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Ooyu4pFbKPvgDvdzwq5QAvrzm?= =?us-ascii?Q?EnRkSXde4ZR17FxGEDet96Cu5NJuYozUrEM+0tykY3FyiHed9TstC4rd8+ME?= =?us-ascii?Q?2cXw2GiSwvSSQ7ykmAH+gRZko0WFnxdZWaPuECbbN3WU53yRLU788JrbO6Rn?= =?us-ascii?Q?nQ=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 3a0da4e3-a839-426e-59d8-08dd08b758fa X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2024 16:29:32.2559 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: svJBErxLnPrJurrNRSrszht4ZanGBI5VxMXTf++1OXUA2F+Oxittenzr0KFQTBPcZ2q7Lb/E2xYsGk+nUHYJZk563IYC5lnnE1ktWPw6J0U= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR11MB6879 X-OriginatorOrg: intel.com 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 Tue, Nov 19, 2024 at 05:22:21PM +0100, Thomas Monjalon wrote: > 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. > Great. I'll test that patch when it gets submitted. /Bruce.