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 A0A4F45C16; Wed, 30 Oct 2024 16:31:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 889CA4028F; Wed, 30 Oct 2024 16:31:48 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by mails.dpdk.org (Postfix) with ESMTP id 7326A40281; Wed, 30 Oct 2024 16:31:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730302307; x=1761838307; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=jgRsWpfQIYllU58qi0cZaoMacp7Fn/OIY2ab6CFhP9g=; b=QOt3tH9f7tSiVDH5XV0/o5Sxpdx9hNYnwqwsbM5wvXz22OJj5W7gzkHH DPV7ovFr3RezRKykBYkl6/BP05XLG2ERijgbwPkXZaRkuC968vkuAxllt tOcrYyzOqGp23vYDBwOCqfNmE/2nfgmKjUf/qmAL4SLlgmnMlOUN2aV88 uRUW/o38URJsCTdPndT0JFj8zZI0Brp2chLQWQk1kFIZmS42AjCcyhNIC IjMbOeIHsVUD8jXh0EqrHiZ5KbRiRd/o4vG+3GKz9AmoDFMkpYPpd6Foc NNPVyNhGrv1Yl1vEVKF9cqRdeqrl0GYjqzVi/xZoAQojDAzDWCbBFrzcK Q==; X-CSE-ConnectionGUID: v2uNSzFSQay80GEe/mT+gg== X-CSE-MsgGUID: /qKNFBaOTYqkOdsV33hUkg== X-IronPort-AV: E=McAfee;i="6700,10204,11241"; a="41380585" X-IronPort-AV: E=Sophos;i="6.11,245,1725346800"; d="scan'208";a="41380585" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2024 08:31:45 -0700 X-CSE-ConnectionGUID: t8LJnIuFT5SnBrAF4aAtPA== X-CSE-MsgGUID: 190w+UNHRJuN+fKKjJNESg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,245,1725346800"; d="scan'208";a="86899892" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmviesa005.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 30 Oct 2024 08:31:45 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 30 Oct 2024 08:31:44 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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; Wed, 30 Oct 2024 08:31:44 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.173) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 30 Oct 2024 08:31:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=s8LCGjfoRYXBf7BIUiJPQbw5J1a2IbOHgc08KlR+58iDRwa6BQlF2hPl2f7wi34WEIrccnF8Yk8H5vB75Dx++JGYomyD49zwNd3kKzgFnS6Uu5K1+XxC6AWuogJnm9qcKX9Ux1N/ZzXPhThID8NLsMMTCdPGqU4SmkcMxt8HqfCerR5yD6zjkMeH+uVnXUYj441IvQOG5WzpVqyh/gExWYFgioZrneSkK+orue/llwDmMPFUi2uBTB600n/witRQSVPHuwJHOR9QAj7EkSPHbC8GXaX42z9+w3J5eherxiOMkrj1HQY0ZyToequDhv/GbtoU/px4v4428lYgd/2kgg== 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=8tkfjGrvnWCmraqSSKdV9cuxWU0Hbe2fzsQFLlfZgw0=; b=rjz0E/+Zx67uB6LlS9O6jpYRW9WspYcgg0m4NT2huxXkzzf/zbwBQCfa+56uCRE5/9qYGPf9kMnqZOUKC4UnDyRg2MadEMUiliECkWkWDwtIXclrX+kIjkXYdavYfgV+AkfxaEhrLR4VOFT4UdjutbnYCGSAUim1K8N2FEbCDohm/1xEM1NVR5qE9hcaV/wGLdaG2yTR126XhWZvATAmf3O2zjDWeZZe5mYx7zhdwehjGEqGRbkj4QsmL0z1VOj+Ltg/TYMrSo4V67yzRYlcrwPwOiAnbqqrAllawsTiZzyfY15TD4L/y62Q2cyONlAcA0fU0B5LoU8RdXiKH/7Qbg== 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 DM4PR11MB7205.namprd11.prod.outlook.com (2603:10b6:8:113::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.24; Wed, 30 Oct 2024 15:31:41 +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; Wed, 30 Oct 2024 15:31:41 +0000 Date: Wed, 30 Oct 2024 15:31:34 +0000 From: Bruce Richardson To: Soumyadeep Hore CC: , , , Subject: Re: [PATCH v2] net/ice: fix incorrect reading of PHY timestamp Message-ID: References: <20241025102625.801994-1-soumyadeep.hore@intel.com> <20241030021611.871536-1-soumyadeep.hore@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20241030021611.871536-1-soumyadeep.hore@intel.com> X-ClientProxiedBy: WA0P291CA0024.POLP291.PROD.OUTLOOK.COM (2603:10a6:1d0:1::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_|DM4PR11MB7205:EE_ X-MS-Office365-Filtering-Correlation-Id: bad04493-0d8c-492e-24a1-08dcf8f7f3a9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?aQU7zRpobtRHx0g38E/7mcvM5sCU3GvwiWHorD5DAiPC2cRVRJHaWy+Dd6nr?= =?us-ascii?Q?L2XtinyS2y1J6MhiB2sRVFpH1HwG1yvDbV5N3Z11rK84STEE/aoE8xbggnbx?= =?us-ascii?Q?nb4DhmsQHnc3ivf6OaPoKd9Dgg4ydXER3ptEhosnCQ7FrnDwvL8oT87ECvRE?= =?us-ascii?Q?qSj0grPF35ichBULaydUt+PaMU3nvXfWYd/UboMZNg7sW2aR44xRa3PUdV4Y?= =?us-ascii?Q?uBgcV3S3rohOiREVcY+COW/u09lm9bmbFvPaz7ZGDzOmX+BrtGFoi/LrSSi+?= =?us-ascii?Q?jJX7VqBMm6OCMs1SbNCnPMVoWsg3yrXOxqZ9034vzQW8l3UwrtmYzcOUpf+8?= =?us-ascii?Q?iTYLSXbzp9Sv5yio5YgY5QzHCnnT1O7E4Cb+KU1l+G0Gilh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3otwFd+hFImUb3s4z+qFkOlr8EXLDN/djtzHpQDJGnF?= =?us-ascii?Q?fyo=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)(376014)(366016)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?M3t2xKsTU5zxDLbEUs9f4w9mIcTxe+3Y+D0DtB305J+yT3vJHG6jg6kQq81V?= =?us-ascii?Q?U6uHk/VmB2Geureu2dJ6cgRG8mvstY0ClZE+0glFlRVQ8G4gEZa17L5gazAD?= =?us-ascii?Q?gLYcTy44GiJeaOPiU8y/UlBQeEvlhOGOpioOBprIkB5w3F1XGaHePsg/qrXY?= =?us-ascii?Q?El6nrzVqgWGl4qIgdOq/38qnLrxDp3//KNpLw8pC0wnNYvmPipl/JjxxDDT7?= =?us-ascii?Q?smDDGsl0JP6hNuL+cKQC2FhUWqOJLAN15V3aT4VzxLOvse+yxQKsTIAhTbVr?= =?us-ascii?Q?Mfu1ZcE/juhbTODSn7f5rU450Z4foIup8y5qUo4aPU6C2BNKeFhIXBjvlSDd?= =?us-ascii?Q?d/PQi7VuLNEIHqpFNzcB9uASoET6Cz/pQJYx6uh7kelDHPdKMtRjdcc8Bk3C?= =?us-ascii?Q?HQHS4jMva2YVxhqsOy8Gso/og7HCXkBgoi2LVm69y/RbR3Dxbn1UNyWMgENN?= =?us-ascii?Q?KoMmzXh3RfKCC5OlUd1MhglQowd2H1eM2tyvVf7v6+21VVZKdJhhSlC/4kKs?= =?us-ascii?Q?7PkLT4vMunFcvVl53KMRKKsQFiskAAss9AOIWHYXWyUGgTOtogzQdVFoVeuB?= =?us-ascii?Q?zHLivex/HS91wkkW7oLalbi+z3wdx8IHM+2qyAq+0E7SvGSqnf6HKcxQL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2VStAY023Ci0YAW+YyV9POdQBMB1P95jm9?= =?us-ascii?Q?yVWP4TLZW7++hLAmuGp0cuZ8mZEaXDhWlaG7dSBXzTStFECsgH0i85F4CCbd?= =?us-ascii?Q?OA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: bad04493-0d8c-492e-24a1-08dcf8f7f3a9 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2024 15:31:41.1084 (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: JnTUkJzPmvSDgtXL166V6yq8VQZctI7c+XI5bFctLxinR9uG1R41IFkh/jhDiz11vrDbjdrbppN/aVlFmtHZoFMAH4fH3uBvVA/2xix99Ms= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB7205 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 Wed, Oct 30, 2024 at 02:16:11AM +0000, Soumyadeep Hore wrote: > In ICE PMD, previously the ready bitmap checking before reading > PHY timestamp was not present. This caused incorrect Tx > timestamping. > > The ready bitmap checking is enabled and PHY timestamp is read once > the ready bitmap gives positive value. > > Fixes: 881169950d80 ("net/ice/base: implement initial PTP support for E830") > Cc: stable@dpdk.org > > Signed-off-by: Soumyadeep Hore > --- > v2: > - Addressed Bruce's comments > --- > drivers/net/ice/ice_ethdev.c | 18 +++++++++++++++++- > 1 file changed, 17 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c > index 70298ac330..6d0d37b3a0 100644 > --- a/drivers/net/ice/ice_ethdev.c > +++ b/drivers/net/ice/ice_ethdev.c > @@ -6597,10 +6597,26 @@ ice_timesync_read_tx_timestamp(struct rte_eth_dev *dev, > struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > struct ice_adapter *ad = > ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); > - uint64_t ts_ns, tstamp; > + uint64_t ts_ns, tstamp, tstamp_ready = 0; > + uint64_t end_time; > const uint64_t mask = 0xFFFFFFFF; > int ret; > > + end_time = rte_get_timer_cycles() + rte_get_timer_hz(); > + Patch code itself looks fine, but don't you think that 1sec is an excessively long time to wait? Maybe do a V3 with a lower timeout threshold. /Bruce