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 D857245A9F; Thu, 3 Oct 2024 13:40:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C50514042E; Thu, 3 Oct 2024 13:40:00 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id 966E240298; Thu, 3 Oct 2024 13:39:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727955600; x=1759491600; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=SgDjQKrguKfFzGmThsVHPwR3213QQCLkOF3CPe1Q2V0=; b=VRgC3KR3Lstf/6ZE2SL4qxCkfnds+RQ6Ja27bFSqpXlvTqLjKOhdGu6g iiLN6IN80skCeveyAFRy8wqDprt3ZzITNSzD0DaZKQuJvWNNmd/cHJ+ym qL8JTHkFCnGawLaKGcm5g0ptDGKfNGqWKF6kf6kXWifgIsXUFv/RHNbg2 D/oQLKXr+DYig5JtiBGy6/DLcbA6Vn9Y+VSzn9/EBL6vkvoU0vpZ1VLEA vdQcAj0BqwPMh+sqo57ZXdn5ZBZJKovoxue73xwhGKoxmm7rIkKKaG1Uf l+z2JkvdAANDex4qmoAtAJWemrabirnYASxlmgda/UT2Kf28iyey/Iac/ g==; X-CSE-ConnectionGUID: +Gg2D2iFR/6JBAJuH6RfgQ== X-CSE-MsgGUID: cB/nvXcfRTeCUbydTa0C5Q== X-IronPort-AV: E=McAfee;i="6700,10204,11214"; a="44612269" X-IronPort-AV: E=Sophos;i="6.11,174,1725346800"; d="scan'208";a="44612269" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2024 04:39:58 -0700 X-CSE-ConnectionGUID: a01ofdm1ThOxo5JMt0Kupg== X-CSE-MsgGUID: 4F8dtYuoTnWmSa+hFf1DpQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,174,1725346800"; d="scan'208";a="105090538" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmviesa001.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 03 Oct 2024 04:39:58 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 3 Oct 2024 04:39:57 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 3 Oct 2024 04:39:57 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 3 Oct 2024 04:39:57 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.175) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 3 Oct 2024 04:39:57 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ubUAx+tCbv2iM/F0GGwApZhDVIANz+pt7SdInG+lOJRbGF3FlNvzGsaExCukL4iEWqyeJEO8sqXhYh81/aqRBM3V6bhPF5LphLVQwRMI/Mkddsj4+WFx86HJuf9l5ypTzOIlHBbYEZ3Mgi2wwxdpSTqhxwTQC4GQ5UJnzPyEMNmuUnpqiCxPCjAtxNhhadqaDx13SUnIaXXUG4G5lLGtAh0gBaOOjxKxVjn1AE1DZM/qJLnrrgB1Ullvt0Ed07BaKyi2UnbeguL17w5sMF98ORNb+1tziF2ITZA/vfS+CVYn7Ld4irletwCLmbaFen5HSLtbqHHJQmS1Ib4f4a9fFQ== 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=NGzh8JRixQ2UuzRc30ReJnPNNwZibTE16CWhG4QNBhc=; b=rhnkFcN0btqPBBWVsTYIn7SAxFXcmLmEEr3U/J4fgvkQHIrQKgJkEfDvqQifxaRnQ+sb+tqIshBDpa5UaE9f4Yd7TkX95yUDcuflwU1kHLsO91+MXWaQR4A4WoAUdwfyLdFI/a9RFpHRNjGuk33tIU7J7ZytvuNuCghxSyEiY92s2r09ipDly3WkPXWEiNwzCD9oY6rBLAV7kQolHlKRxU0yDR+TrZU4coDOILAHoxuoANfsvciEoktg1ALDR/O42G/zKO5DvMm/QEDbFi/PrzXOW1FmxrjSgG/H8pjDUdo+nFLAxgvHoR0N/WlVd7B5+6Nqx+FQuSXWI+ko/3XFJw== 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 DM4PR11MB7374.namprd11.prod.outlook.com (2603:10b6:8:102::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.18; Thu, 3 Oct 2024 11:39:54 +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.8026.014; Thu, 3 Oct 2024 11:39:54 +0000 Date: Thu, 3 Oct 2024 12:39:48 +0100 From: Bruce Richardson To: Robin Jarry CC: , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Ciara Power , Keith Wiles , , , Subject: Re: [PATCH dpdk v2 2/2] ethdev: fix potential race in telemetry endpoints Message-ID: References: <20241002155709.2522273-1-david.marchand@redhat.com> <20241003112438.902397-7-rjarry@redhat.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20241003112438.902397-7-rjarry@redhat.com> X-ClientProxiedBy: DB7PR05CA0002.eurprd05.prod.outlook.com (2603:10a6:10:36::15) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|DM4PR11MB7374:EE_ X-MS-Office365-Filtering-Correlation-Id: f924cc7f-84af-4d24-8226-08dce3a019c3 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr 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?JZtnkG/mEeR/R80dTisHCHnG9ibMmy8nppDE+H9MkhR2Cbr4syON8gBOA99z?= =?us-ascii?Q?87PXp8iNjvPiFjZLKuGJMF7gqiI79eJ7qdnacHZT3svTDE7y9qauEk8tZevu?= =?us-ascii?Q?z1upeXyrVb6b/A+xZ8IxaMm6XLC4qvDD1b0b4rRrVjpsX/3vbvKAp9nUgclx?= =?us-ascii?Q?iYNdKiU9LHFw/upQ8Ulf6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?= =?us-ascii?Q?rT1vM5QjqlBNbcIlAcbERKFQ0yXqaqVGq3Fw2QKxj+AFEvFJfTlUxkp4195U?= =?us-ascii?Q?8pzN8E3LJgAGP7KaewmusvlvbJMj/NfeSOK2A9LtUMDGUZ8XJDm41FVbU3Gu?= =?us-ascii?Q?pZIhiO1q96EJuPWAafCRb7elGHvPAEIK6H9t3Ut41xiLRQ1ePSACRxPyKQtR?= =?us-ascii?Q?gAulaSwbVUbdbAZuGhpU4YGWVWstcPPJHGB8R9RqAw=3D=3D?= 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?JGOURgDtRxuARaSI0dpUIzJcSjPP/JF83fOLfkK9jya4HfICutQAIgrXD5B4?= =?us-ascii?Q?hJBjHW/3eiUZqVYed+n0cO2OYTUdeIGJXsrcfgHOomlcA+KrXWhvzjB0VMc4?= =?us-ascii?Q?K858HtLOSPFtmf4ls+KE4+qiLzKdA2ruw6TRutaMk/KDxogB+KSzO77YHNOF?= =?us-ascii?Q?RKuVOKHwtI/yNUHEixbuLcol4/7JCLny2gcXmUWEsqKEmleynWu3vmOt5mR8?= =?us-ascii?Q?r7I55IERg/mOCwmtUiPK3471VVWoVFi8n2iY4cXrPCP0yRxkb8BIPzSNMuix?= =?us-ascii?Q?xIM0CuDBXAN5Jj93xFftMknOO6PkiflVdOKc02Gsetoniq3O5OCo+Ok5d3gs?= =?us-ascii?Q?4kIf73y707VEyRnsonf2Wx9MylJUbuW80FaZQ367QmLrLguhho5rUDEc70cY?= =?us-ascii?Q?15r0Faf/afFwnRcAvPCrsEcBgXJPJQPlL3VeNwx5Me/sYXl6JpiQK6+2lD7v?= =?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DfyioSfabjO+ke84XqLLjL9X9pJ9/Bb?= =?us-ascii?Q?U963UjaJa1IARdwev1cqu2M3pZTcZGwhI6BzeZFQw2uwdU71pCj94thTSezl?= =?us-ascii?Q?/o6sIZnF5Bi2x8x8q919fNSHZksNT75CBCU/n9Yo6btvd0GqGAax84Liv65a?= =?us-ascii?Q?7gDzd3J4tdH9beXuXfxAy9RTU3IeaEZQ1JwmcwIPIacVJL3Ez/0LHv/Ue3iB?= =?us-ascii?Q?c7yZ3o0TT3fyLRMeJfgd8B9pT/gFeOG9V2s0YO2pLwvWFxMyyrq4mwECtqZP?= =?us-ascii?Q?dQ=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: f924cc7f-84af-4d24-8226-08dce3a019c3 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Oct 2024 11:39:54.7640 (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: UHW3Gly81TafbhpJWAEmlIrIE2D/ILdetfhv6mGF2jbj67xX6N91pQO6kC2YUkyj/TtGKn6GfiV6wZNyCsUOLPY/+84h79kS8x2njDnTYRE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB7374 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 Thu, Oct 03, 2024 at 01:24:42PM +0200, Robin Jarry wrote: > While invoking telemetry commands (which may happen at any time, out of > control of the application), an application thread may concurrently > add/remove ports. The telemetry callbacks may then access partially > initialized/uninitialised ethdev data. > > Reuse the ethdev lock that protects port allocation/destruction and the > new telemetry callback register api that takes an additional private > argument. Pass eth_dev_telemetry_do as the main callback and the actual > endpoint callbacks as private argument. > > Fixes: c190daedb9b1 ("ethdev: add telemetry callbacks") > Cc: stable@dpdk.org > > Signed-off-by: Robin Jarry Acked-by: Bruce Richardson