From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by mail.toke.dk (Postfix) with ESMTPS id 58243A5C7C8 for ; Tue, 26 Mar 2024 15:55:39 +0100 (CET) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=ee8Det60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711464940; x=1743000940; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=AFiGdtVpYvGkYQpcQdwjuZS8tPo6pz+PizLTBxbITEc=; b=ee8Det601jfjMk0yL4FpNjlfNiOZxGbOZU3ZSOHcjp4wn47GpZv100Qo lX3gzHWdI7dnHoyI5D2mT3XhCFBWwdQhl4Ax8jN5xn0pA8cl66cxuj/Uq ffSWplyl1Vv7C4Lf4fwZIe4ih8/wygUSAanBabkaYZTn6yTHTtfHZ16tE tMMwmdqwF15YRALoBWSKHCjEe1nAHaTAdef2xk5j5DBQiJYNDLMcVjtPy 9sSsy7QIA71EYgWPVOvkbiD4c/LUliR2z/giqJt573EPL4tlkAWaI3P+j 8kHyiSFHXJ9ZFKCWW68uf/iDR+rkE1nC3/yDFBjNQbQgKVS7L6Uy/vqhQ A==; X-CSE-ConnectionGUID: T3t41bAdTL2TeEf44vneAA== X-CSE-MsgGUID: 6bpWvMrkRVKMj0ewnOcxNg== X-IronPort-AV: E=McAfee;i="6600,9927,11025"; a="17064663" X-IronPort-AV: E=Sophos;i="6.07,156,1708416000"; d="scan'208";a="17064663" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2024 07:55:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,156,1708416000"; d="scan'208";a="20705240" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 26 Mar 2024 07:55:38 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) 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.35; Tue, 26 Mar 2024 07:55:37 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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.35 via Frontend Transport; Tue, 26 Mar 2024 07:55:37 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) 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.35; Tue, 26 Mar 2024 07:55:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BOKaAMvS/XuYUhAhzzX7SNF9y8xpSTuxdZBkA1sWBto4RPHdoXkcHZ1YGwZctloR55QzC2we6AZwZkCM1bFVLaUHxJNpGRSapZZoHG/ypw5a972CS6qpEYfHIVhiROaDflwVnVddEKFlxoUR77Rxe7w4ItCKIpLAFAR8A0piZMgj0cyzsk/T3v4rwLDRAID9fg4+NLzH7zSAdv0ZqInB+op5h4OhKUCevUJXwjZo/VNUlBn2kUHScI3SD+kigl6njCPohshukbbXBI9OwnIG8YlwB8iKefNqVUNhMMsi0NBfEYWnqH+RFvk37rNX1hOpqGZKhYihqEUkKCVHvTitXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=AFiGdtVpYvGkYQpcQdwjuZS8tPo6pz+PizLTBxbITEc=; b=fYaXBmYAyFI01mpxbHA9b66s5+o5nto5bfilGuQE2L8KzzDxsBZNgOpcb0CqomEyUBKCC/mPgqWaLOpkL77aHnWmvf4xHWhnid9Pk6jvOW4jIeNQn9mVZ6xsOeUsz2GWXkfmpM1alExp7V39ajhCjHiT6eTJCcvOw0+9/S9At9tS/MmJRNuqhZDd75fuk6Io5Q8e8xkz1MMIhcZSyVn9sku/x8SWRcXc/HoaPf1iDjPC3wceHjM8HlesZR8qJUWTFF8U9wTfilm6i9424NSJWI/D4MKOrJTQ8Ln/kJdtqQVMrn1dXyC9Pxyu5v+N5kXwVommekaBIWiAarPD/nOGuw== 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 Received: from PH0PR11MB5830.namprd11.prod.outlook.com (2603:10b6:510:129::20) by SA1PR11MB8475.namprd11.prod.outlook.com (2603:10b6:806:3a3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.33; Tue, 26 Mar 2024 14:55:33 +0000 Received: from PH0PR11MB5830.namprd11.prod.outlook.com ([fe80::9445:5793:b0b7:711a]) by PH0PR11MB5830.namprd11.prod.outlook.com ([fe80::9445:5793:b0b7:711a%7]) with mapi id 15.20.7409.031; Tue, 26 Mar 2024 14:55:33 +0000 From: "Song, Yoong Siang" To: Kurt Kanzenbach , "Bezdeka, Florian" , "Brandeburg, Jesse" , "Nguyen, Anthony L" , "David S . Miller" , "Eric Dumazet" , Jakub Kicinski , Paolo Abeni , Richard Cochran , "Alexei Starovoitov" , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Stanislav Fomichev , "Gomes, Vinicius" , "Fijalkowski, Maciej" Thread-Topic: [xdp-hints] Re: [PATCH iwl-next,v4 1/1] igc: Add Tx hardware timestamp request for AF_XDP zero-copy packet Thread-Index: AQHaf1vDcRX66gQlB0+gJtjiHFgRbLFJ/peAgAAUiKA= Date: Tue, 26 Mar 2024 14:55:33 +0000 Message-ID: References: <20240325020928.1987947-1-yoong.siang.song@intel.com> <87h6gtb0p0.fsf@kurt.kurt.home> In-Reply-To: <87h6gtb0p0.fsf@kurt.kurt.home> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR11MB5830:EE_|SA1PR11MB8475:EE_ 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; x-microsoft-antispam-message-info: mFVgk/6+3g4sIDRq/Eh0X5zPto+0ldenQi3e8iawaUyf/AVw0oOeDmlS0kXIuVVvBWMWM/W+b0QZfFF23IIHgK7MbslP6NU6oIXAAsUNDz74P6AH9q6LJCN/aannqfQn0WHTEB4Rc2qoBIUjSpNIlv1PbHIS5Su9EOdK1n/BCor9ZRkLiJ2CSiX0x6Rsbw26pnPB4qkzmDruH/6ZQZIVd3SDZLWEfWkD39PFDKMzCXDh9ME0aS6ENBwbROFh1H/4BMJ7rEJlp/SFOyo9O7Lfuooi58Dfw8qg/+2fJVnr25tjc9cDq+w6NWyUhh6hOz9FOgTI6dSK2OyWtiQDBcz6bvDyahClCrkpUGluBFO25XtV9kpiMK6DFYFC1fuxrrZ9f1iDeOVOYy9kR64MzfHoD/o16T69z9LT4COD7SU+f0Sp1T+N9DK6oQYrzTMidfXVwybBBChGnNonGhxw8P+nNSSfmGHmhJdPFhrRzdjdXQ49nLtAQDeeSLrWrc+GKXkbW4O7BOK0zjAxzazlX9DRUK60WjVGgZpcioYgtS4rQatuzcIk3yYsRlcTHO/CD0ylO34YiYoBScyEc1qEEg0AZzXqGF2HmmHn2gYWFUoZjBNw8M0+e+h6hjcrQDBxD4o/lXLVgwwvg1ZRPX9nlOfBlg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR11MB5830.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(366007)(1800799015)(7416005)(921011);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?og/6LcLMwYMQGxTSXlch13FqdWAhQD7qFlu5OgdW8pyfz32UV6EprUZ3a6IR?= =?us-ascii?Q?FM8uqCyCj9F4Kbmr6uYr40S6ViLJIwt8GSpkHwInUhP/WKFkbE1c/CRqTdc6?= =?us-ascii?Q?Fnlx+vIMb+dWS2CXd+k4zOh6DHGbopzutSf7qoJOv+bpcpT0ek55C007bV+n?= =?us-ascii?Q?blrPwD5QCAwafIhu9OR7cvMVfLTGJVGBk4CxKMdJc0FMZG2UwECGvkItXF5k?= =?us-ascii?Q?UvI6BbZbu5dhBQADUjjorYzEpFZEmipEodivSc9pe8x8OhZQYKreSL6pMB7D?= =?us-ascii?Q?6DEfh6Gzd74FgUUNuVXqHhKCeCHepn3eMQQGHHFUBw5cUGc9fv0xJdBJd2lU?= =?us-ascii?Q?iVkw4axHXXKBDplm+D9pRs/NevfohkqUPlWIFh4KcdJtGrBV0zrjfEXhWl0j?= =?us-ascii?Q?+zxH7C27t+92YbgJgBORFLiZ2rma8xXmeU5l++1gMvhJDJtQip4UVTAVUPGa?= =?us-ascii?Q?n/rNk5CV7em3/PfgySvfwfbOm0GU68DJN3L4q2nNrCse9D+soU0nJ4upc4oE?= =?us-ascii?Q?9GmNrVd2etLwcE7gBpzVbeJfhuoh4y4JToYtqoPR1ZNX7uKnKWp1Jezy/fX3?= =?us-ascii?Q?TgALBWfAeDGFrn+Ik23eordwjOHhUnUFBOcod1qgb5OqEfpEiBIHWqMoB9OO?= =?us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gw3j9PI7gZLR/furKi1glmqmAx?= =?us-ascii?Q?DlYeMU6kQjmCwBgMnAwB5kaoeACj38jkpcG6le5uta3WeO2jDZJTq99vybrn?= =?us-ascii?Q?+g=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5830.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a1c5213e-82e4-4a90-856e-08dc4da4c9d3 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Mar 2024 14:55:33.5628 (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: UkAxq41FP9fx4KtprjHbZYgUcSmqFkfZ1ZVRPlksHAcHzapw9GJ9P5xlZwJklv/OBSKVnEo9ioFrcR0iDwYI3WreRT8XSR3bcJjQqO2RfAQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB8475 X-OriginatorOrg: intel.com Message-ID-Hash: QNY3UHKD4MWJ2P43HNWUVSWBKJGDOXF4 X-Message-ID-Hash: QNY3UHKD4MWJ2P43HNWUVSWBKJGDOXF4 X-MailFrom: yoong.siang.song@intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: "intel-wired-lan@lists.osuosl.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "bpf@vger.kernel.org" , "xdp-hints@xdp-project.net" X-Mailman-Version: 3.3.9 Precedence: list Subject: [xdp-hints] Re: [PATCH iwl-next,v4 1/1] igc: Add Tx hardware timestamp request for AF_XDP zero-copy packet List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Tuesday, March 26, 2024 9:08 PM, Kurt Kanzenbach wr= ote: >Hi Florian, > >On Tue Mar 26 2024, Florian Bezdeka wrote: >> On Mon, 2024-03-25 at 10:09 +0800, Song Yoong Siang wrote: >>> This patch adds support to per-packet Tx hardware timestamp request to >>> AF_XDP zero-copy packet via XDP Tx metadata framework. Please note that >>> user needs to enable Tx HW timestamp capability via igc_ioctl() with >>> SIOCSHWTSTAMP cmd before sending xsk Tx hardware timestamp request. >>> >>> Same as implementation in RX timestamp XDP hints kfunc metadata, Timer = 0 >>> (adjustable clock) is used in xsk Tx hardware timestamp. i225/i226 have >>> four sets of timestamping registers. *skb and *xsk_tx_buffer pointers >>> are used to indicate whether the timestamping register is already occup= ied. >> >> Let me make sure that I fully understand that: In my own words: >> >> With that applied I'm able to get the point in time from the device >> when a specific frame made it to the wire. I have to enable that >> functionality using the mentioned ioctl() call first, and then check >> the meta area (located in the umem right before the frame payload) >> while consuming the completion queue/ring. Correct? Hi Florian, Yes, you are right. But before you pass the frame to driver, make sure you request Tx metadata hardware timestamp feature by setting XDP_TXMD_FLAGS_TIMESTAMP flag. You can refer to tools/testing/selftests/bpf/xdp_hw_metadata.c on how to do it.=20 >> >> If so, we now have a feedback channel for meta information for/from TX. >> Are there any plans - or would it be possible - to support Earliest >> TxTime First (NET_SCHED_ETF) QDisc based on that channel? In the past >> we had the problem that we we're missing a feedback channel to >> communicate back invalid lunch times. > >Just asking: How would that work? AFAIK XDP bypasses the Qdisc >layer. Currently invalid Launch Times are accounted in the ETF Qdisc >itself. Does that mean every driver has to take care of it? > >Thanks, >Kurt Florian & Kurt, Yes, me and Stanislav are trying to add Earliest TxTime First / Launch Time= to the framework. Please refer to [1] for the patchset. The metadata framework will just pass= the Launch time value to driver, and driver need to handle the rest. In the patchset, I am enabling it on stmmac driver only, but we need more d= rivers to check whether the design is feasible for different drivers, cause each d= river is having their own limitation on launch time. Therefore, after this tx hwts p= atch accepted, I will try to enable launch time on igc driver, and submit new version.=20 Kurt is right that current metadata framework is lacking a way to feedback = whether the launch time is invalid or not. Maybe we can try to enable launch time w= ithout feedback, then discuss about the status report design. [1] https://patchwork.kernel.org/project/netdevbpf/cover/20231203165129.174= 0512-1-yoong.siang.song@intel.com/ Thanks & Regards Siang