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 A31EB45DAB; Tue, 26 Nov 2024 16:44:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3453E40268; Tue, 26 Nov 2024 16:44:19 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by mails.dpdk.org (Postfix) with ESMTP id D1E3F4025F for ; Tue, 26 Nov 2024 16:44:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1732635857; x=1764171857; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=uxwmTUab/CP87Ni+SScpKbjLS4rRby9I9/IRjPPKxnM=; b=mnLdx09XxhOgZhhLYsgLKJjG1HBo9oZaHGe3bfxtR005mEQYmxj66994 qrZ14jzflykwuZTpfZ+OsbghLeB4VFOK/mn1nRuR+HICJIGobgzE43wAp pkyEtLk3Iu2FI9VJXi31Wt1R02erkOPuQI1jK9PfqhAohMUUYbmISdSPp MCqq88A3iJgeS9y/cE10pmh3m2A1VVtxv6Qj2J92ng9bYG9p/Fct8tNCW jrktc26aLEkq1jbdgCGCMxcGBrebLyMbij9GF/kzwzPCVbZ4/T0AkFK+X PmyYLHOuPuTSXQB5tpHi/SnvhOwftdLABNOxdZutqJb0K6RuDEUi2ynFh w==; X-CSE-ConnectionGUID: afwDdguUQmerZaD2w3ZsCQ== X-CSE-MsgGUID: +OOxoYd0SrqYSmxpZl83Wg== X-IronPort-AV: E=McAfee;i="6700,10204,11268"; a="32744261" X-IronPort-AV: E=Sophos;i="6.12,186,1728975600"; d="scan'208";a="32744261" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2024 07:44:15 -0800 X-CSE-ConnectionGUID: ofopyoNWS3ex5g+JvIx4GQ== X-CSE-MsgGUID: g7nC6thSS/iKSy6CtAEIMQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,186,1728975600"; d="scan'208";a="122501107" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orviesa002.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 26 Nov 2024 07:44:15 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) 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 07:44:14 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx603.amr.corp.intel.com (10.22.229.16) 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 07:44:14 -0800 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.47) by edgegateway.intel.com (134.134.137.103) 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 07:44:14 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=m1mvvzTyQj/noIizmq9tINxJmaHCiM3tPON3B5QFt4md9bWq6Gt02mtDjXI7/r8HJ78xBpfO6DiFKBo8/hJMvyDzj/dG+jvWbwIyNUBxL31aSXU22faLUKMCWfd1hZ2XgC1wlm/bjYfnIrPriALKU9YzVexHjF9PCJKlmRw5rEsKNIXS+Okj/uiIBjgdfyY9vM8FH+8iwaX6SSspHhw/vsYigU/PF4P/Yvt6hIGJp5My9gGvgab3vhnINjtAf9sLJM2ecm0hJr8Gr2T5lNaLNjzBUijPrqaTwR+WZMTvfT0Ko0BO5mlytKFf2ndByYWtOjMHOBRHcARv+GeVNiOUfQ== 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=KINHw/JFy44AgiFqD7fcZeRxPTahNlrksWHWnI8O95E=; b=BfnjKj5RMYooIGceFQyEiU7WjLn6/dQ53n7ymAoJuKPoaLTxbsrCF/TNEUPHREanoCGk28OjyuR3JeZnh6+BGewsNIjqty68cHyXSTePGXx24sn/ERofvAqnWGoR11akuy473W6v/HZnwtWepyfMI2Qp8+yQg4Qw0KEwJlxmtp7Zc7A61xVClKHohwnd7X5SJ2qGRTyYgjJF7v4VP/KJyJ8DhfPchUlnZDkvmkZ4IbGLlRFtfBf5eRig0wkzAk3OEYlz4ojiChGzUFGJdsAo+1gf8FaAzfem9SdOOFzvsKPwRWHUVYR05th1BFWymB0GvZlQvK1P7Cu0ufQk9i7DWQ== 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 PH7PR11MB7515.namprd11.prod.outlook.com (2603:10b6:510:278::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.20; Tue, 26 Nov 2024 15:44:04 +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 15:44:04 +0000 Date: Tue, 26 Nov 2024 15:43:59 +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: LO4P123CA0663.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:316::10) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|PH7PR11MB7515:EE_ X-MS-Office365-Filtering-Correlation-Id: d51bc465-7e1f-4b15-36f4-08dd0e3127f6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?vRh9FWF9M7cHgFsmlMkd0FVdnb6crsMWnRZW8g71OxzR52UxuTXU3oixJeuO?= =?us-ascii?Q?u/XEebOBa4tzDlkEfek9ug2fF7AtAxk7se412/FXM7HD8/d3QX9+HxzJFXOW?= =?us-ascii?Q?MAPb8/ZwHsEyjMdfGCEicxppCotuhozJC4Xhx0UuDf1DPDIVqTt0ZU3hCsAg?= =?us-ascii?Q?MsaX+gi4rqNhnagtlhFQi7xYnTSo5dJIUebpm9gXkKMR393SgqYYK3FvPe8K?= =?us-ascii?Q?EyshlMH3y7rfnK6ecXyUyG22flQTK+LfoDX5pFE9ejDy27zLrEfcVx/xl402?= =?us-ascii?Q?7pyc5k6S/xRXXo2FJ8h7/bSHzvRB38zPECLYm0SUjeseebMVzGJLTa+ff63B?= =?us-ascii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clPptCUCLBll5MR459?= =?us-ascii?Q?0xeMv+PAeNPxdU+o8Y00l0tVpxzj3Cd8FnHRDGJV1rp2riEVUTqMhq7ZV4tr?= =?us-ascii?Q?MsOHvhdaY3cwrkwDWZNDe5jGxwXDs9lXiuApo6k+YjqBag=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)(366016)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?+TrmwS1DQTTgkWBAZW2xJhFAa2pHvSQZDEO8laXeUE0QSAURUwn8Bw4dy9wq?= =?us-ascii?Q?tlR5c0d6+Mfdd+jFXCnn7S/eOmSI+iIyIjoIdTS99vsp53XBHrd+lArdj9/2?= =?us-ascii?Q?X9tt/SF5Ie/BGhICi8Rej17RmoZ8+cTCz1nxnNbf4mf2c44bC6OeHyuZ7TuW?= =?us-ascii?Q?h5IediqpEyx5PB4G9SWSjPxDy2ViHMoHwoIA7gwaIO1F4bkfmVp3m9OfqHlC?= =?us-ascii?Q?tdK4inIAspO5GVJy2k0gCkk1ueGw+P1WqOrHbJlDQlLpD7TFQSUYJE8Gq+5y?= =?us-ascii?Q?CLMA9eWpcIo2tb3wmTM9phXtPNuGDfvBHKpHDem+S8V55ZI9n68S9V+lzQCo?= =?us-ascii?Q?KjGn6JWgl2bpxu99ctbiV2ZYTckIoX9DHYTv/boPtBHYHAKwXwazlXP1mRAR?= =?us-ascii?Q?CstQLC7PtbO/xG1cT8TIWEEUjHl7fDctzhmo4LxWmqIWWIC2f2riggBsddKK?= =?us-ascii?Q?LoF+EOCVBJdmhKwPgrDzuRc6gCn+YZEknL9JA9Y1MTgDHja5FSoL+ChVP5CR?= =?us-ascii?Q?QZTG5oZOysENN1k2Z+0xUS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= =?us-ascii?Q?O4+wlsUZ+RPr7wxl6tGonCcwnwFdLNnSpdd5L5Asun/rX1CGhM/nGXsX3CKo?= =?us-ascii?Q?9RXZ+TxWtVUupPZPPgBb2x3bnQN4/V1lPWGqFw65lhI8PSA90ugYxi6gqH4u?= =?us-ascii?Q?7TyDu1lbt5p+i3DXq2WXHRtcOpiujdcBx56+b5xiRBxay6xDAOzmZ9shJIjO?= =?us-ascii?Q?0g=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: d51bc465-7e1f-4b15-36f4-08dd0e3127f6 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 15:44:04.4701 (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: 5QQEDdab2/k/GEZUbQ0rbqSJvuNRSgq+FTh8IputOkrtyoKghxdozPoJPNRZT2rP/rMX+WV6ti3XWWQ3ND4l/F03KD4gQbtp78ijYRtSlIA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB7515 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 > --- Acked-by: Bruce Richardson