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 11EB045DAB; Tue, 26 Nov 2024 17:09:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A039840268; Tue, 26 Nov 2024 17:09:28 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by mails.dpdk.org (Postfix) with ESMTP id ED9454025F for ; Tue, 26 Nov 2024 17:09:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1732637367; x=1764173367; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=pgu2i8nF1vImY9JVZkT6lUySVAmaKGXpGXweHU2wWVQ=; b=gf5p2WkdV9JcfFq/4Ln4IhSwSBaDKpm/sTxpyBYObQSV4fd3g/SXTqxi Sj2jw4YFa8GBBSqAw2b7DGzMMCbrEroQYYOFT3cqxlQ7HvEBaeVJjW2dq ELFAPnFYxWh96YUEDAgdk/3Y0jYKuLpp0JYEsW004wSYN4E4y5hto7UQE c6cp1HIsTqwByKAUgxlpT+DZZ+yi2PprNBIJVBpZYKmW/CzvQ8GL3egxu 2PP3cwKDoJtHPnIKtmjKu5IrLmW4RR6ZenVBWmx8Nd82Ucs/4hgdl7iWi tNdnOIhopBPS+5F2/D0umEcpTrAyoT1Zlnnf0WstyJnuUDE8pq21qkvt7 g==; X-CSE-ConnectionGUID: spuOS2Q7Tumqx1KYuLX5Xw== X-CSE-MsgGUID: t/tpXVsgRRG+zKyJ6i26pg== X-IronPort-AV: E=McAfee;i="6700,10204,11268"; a="32180065" X-IronPort-AV: E=Sophos;i="6.12,186,1728975600"; d="scan'208";a="32180065" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2024 08:09:24 -0800 X-CSE-ConnectionGUID: zQAQpkn8Q46e5Df56c062w== X-CSE-MsgGUID: 0PvlqXBRRmSKAUOVpi+8zQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,186,1728975600"; d="scan'208";a="122638449" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa001.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 26 Nov 2024 08:09:23 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 26 Nov 2024 08:09:23 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) 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, 26 Nov 2024 08:09:23 -0800 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.43) 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; Tue, 26 Nov 2024 08:09:23 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nXYXXZfvxX7riCjzZl/tEd4MD8E+H4A7SHFMzsoQONkWmWSnbKXFHzvhxe1BylO9poZYGh3Ngul4BFFwXgquD06mM6+Qi5P+ASU2XJ8V7dez7d5lciIk2qO6fZTP5TVXK1YADGkIvGttcPvstgIQRjnU2eCg4GFqntg53R6d6+PYvrhtvM5bo0oQqxPG9NNXNf8mS34rtchahRgYsf+NMpRf/IDIkIKKTaeYErVl4nUoo/4tcQZ5KzQq+QGKL8xx9C4+rfX0TWJ4BdlCdo5+ZERx3zSakLNbE19Xesx8XU4CIrfswNIK4UeG9eh5snBVZZmMn8Oxe2UjBI2bCgpCZA== 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=OaITwlLCw89k60mOWJLU1GKKvRLZ2QZ29AZ+bpLMlmo=; b=pKWBdgRpSSZM7Ok/NHMU0Qm1yrqARZVbKO9g7lUUJHzVFLSuiAtATJ2PIrV03sSE2RX/ynMGCZ0I7i2F1tqsZNLtYCqXKLwY4Bj7aa5b4Pf/6FwWKIUU4v99yIN+hUHqIewFYXTITGu8qu4QkTUIahmP/vZ55JRTNncReE2UdheOJzq8VbPGY7SIX6dI10yu9kpxlyItVoAYEle1XN2whATM7HzRUGEflWeiVtIBKGuGFojxShuYPWZtcmmbidkADLR9HgDveFvVqIJgrCgeSfBDCqJqEuNzjt/Bj+jB7iaACPuCZt9CvJH4Gmf8RZomcrL5qhMPuA3bnRNFji6mgQ== 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 SA0PR11MB4525.namprd11.prod.outlook.com (2603:10b6:806:9d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov 2024 16:09:16 +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, 26 Nov 2024 16:09:16 +0000 Date: Tue, 26 Nov 2024 16:09:10 +0000 From: Bruce Richardson To: Anatoly Burakov CC: , Vladimir Medvedkin Subject: Re: [PATCH v2 1/3] net/ixgbe: initialize PTP to system time Message-ID: References: <38eca384ecd00e1601532dd10e20ef45aedf8434.1732288709.git.anatoly.burakov@intel.com> <672ea483818966221e348a09531a9975e2b83b38.1732534388.git.anatoly.burakov@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <672ea483818966221e348a09531a9975e2b83b38.1732534388.git.anatoly.burakov@intel.com> X-ClientProxiedBy: LO4P302CA0009.GBRP302.PROD.OUTLOOK.COM (2603:10a6:600:2c2::17) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|SA0PR11MB4525:EE_ X-MS-Office365-Filtering-Correlation-Id: d905ec7b-ee5a-4a02-46db-08dd0e34ad25 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?ahv9q4LqKAYhZ/iSaL83Ug5wYPhkCBtaMdAf3ID24o/cEZf1Jn8sxbvP5Gdq?= =?us-ascii?Q?TVbwr2OJWs2FKxKR/18jeQk2dmY+TnSZEUtbEbbFPruoKelgKpbZg2qD+l22?= =?us-ascii?Q?jv/T9NaCHX6qasC+LlRhNCQ9YRq+MoWtyhcWULtr8B0OMoGxglOmI+dMXJEv?= =?us-ascii?Q?Rkq6N5f1aG7qJg4qBUsS/ngjSulaGelZZDWgAtYuUXlvbWwl/kBVFXpTFi5h?= =?us-ascii?Q?un8vnHIV6GPDwbZyMLIHzbI/KddsY6udkiNVGFCauZroQIjtZBOp38iGlyVQ?= =?us-ascii?Q?HTrGERRmlwHQPeV5Im4W7PWTN5/FpH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I5mj2VM3pcUGE5Tz82Izs123rp057x5lpfKl/+p1JwX3wpdlAbjS4VK6iv?= =?us-ascii?Q?JC7vH+D60bAvnKKDBb47/Wv9zJsTP4J0zCazi3v/j6LpLWii4heqzC823BHR?= =?us-ascii?Q?XwnJCOdPY/0rnUo6qIzyoxrVc29LS8aVi1z9fpoTrh6BPg=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)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?O8h8RYOaqGQ13LpJF49R5qe0avQM4Ij4D9N+fYz9qZAG+OOShVOpaSBIuKiy?= =?us-ascii?Q?6qEcKLObD5cyPTKj0PCNCBenRBkCAGl9yprkEJ96xyMRIN1X2LYh8dpB9ft8?= =?us-ascii?Q?QYe7P3sY66vEdmHB24qIdOzlwzWd+OwjP36lbjrDimarDg/1FT8piA1YEA4a?= =?us-ascii?Q?cXGzR/twXVwvO7pfLpw0BzRuE0EQhhNRA4CWyManCLq8Sd//kavykPJEZpUe?= =?us-ascii?Q?3GT/7YaC/mHa7NtXEpQFVUyu5QzX4OCFAPAaFXXknIDJu6K3rs+RLwqyH+8T?= =?us-ascii?Q?JqbmrK+zvgnthj3K74lppMU/6jkthwFAg/dBlLg+bjkT02a/3ZG4NmkoyVBN?= =?us-ascii?Q?11TToMYNXrUEfniism0mIhzRU1+2DgBJ53E7Lc+FeHRxg11BKA8x1kXBZC07?= =?us-ascii?Q?p4uan5MXZbHRZhj7rt/sErYGTxecpOZUhaCfWazg/teO7P4/ALT2D6KjqXdn?= =?us-ascii?Q?6PfKeDm//tGB70AL5lX5+52pDn0kmdCDoj6hARQxgRwRj0pJTzq2ojEpgXWd?= =?us-ascii?Q?nWSR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BWg1HACBukSq1mf?= =?us-ascii?Q?cno4N55eDhDl2PS8r/jpcWC28oXjGbIrqk3FReKVY9IAIvhXIFwNcTNsIQx4?= =?us-ascii?Q?ONY/FeL8kJxLKIDCd2MIWJI1+E8HtEtVbyOAKezrzNXpp/QGJA/7DdhXU0Z7?= =?us-ascii?Q?ZLzQF/oaBBZqCtONLTn8XgwRG4nNPf8Et/zD5dUc6r3BS5RJdc1eJ8Gz2I1W?= =?us-ascii?Q?wg=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: d905ec7b-ee5a-4a02-46db-08dd0e34ad25 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 16:09:16.4402 (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: AaPof3+IWW33q88W3fCwewkQUhKHwN+GNOZbyVr1ssEC4qQwUf/ofXqX6YvzdIeI9loaR+P1XQt8NTS90l2xHD3/QQPreY3rL8c6/hPfGFI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4525 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 Mon, Nov 25, 2024 at 11:33:24AM +0000, Anatoly Burakov wrote: > Currently, ixgbe driver initializes PTP timestamp to 0. This is different > from what kernel driver does (which initializes it to system time). > > Align the DPDK driver to kernel driver by setting PTP timestamp to system > time when enabling PTP. > > Note that ixgbe driver always uses zero-based timestamps for PTP, so we > would only ever update the internal timecounter and not the actual NIC > registers. > > Implementation note: in order to get access to clock_gettime on MinGW, we > have to use rte_os_shim.h header, which provides a wrapper around that > function. However, what it *also* provides is wrapper macros around various > other OS-related functions such as read(). Due to one of the mailbox ops > in base code being called "read", MinGW will misinterpret a call into > that op as an attempt to call read() the OS function, and produce a > compile error. This is being worked around by using parentheses around > access to the read op. > > Signed-off-by: Anatoly Burakov > --- Series applied to dpdk-next-net-intel. Thanks, /Bruce