Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3393852lqp; Tue, 26 Mar 2024 08:04:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVuwhcidZdNesWDSQAEOVglUm8yxCFa9qU/ZU0QF2nqYL44u9AmsjMeqemynIybjyabwnFm3H2X27d5Uk2KolLBxAgPMRVwOfxPIKpv/w== X-Google-Smtp-Source: AGHT+IEfbBFmAF1UzIdTq4Tvzwx2w6d7MaMb4LaK5xwVLhrxeaNmOm8dJE89FUcyfbmGH3hCS3K0 X-Received: by 2002:a25:3619:0:b0:dcd:1043:23c with SMTP id d25-20020a253619000000b00dcd1043023cmr8530038yba.1.1711465495824; Tue, 26 Mar 2024 08:04:55 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id i17-20020a25bc11000000b00dbdc3404e8esi2213411ybh.737.2024.03.26.08.04.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 08:04:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-119236-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UvryIMkY; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-119236-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119236-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E010B1C65149 for ; Tue, 26 Mar 2024 14:55:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB27A13C680; Tue, 26 Mar 2024 14:55:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="UvryIMkY" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58BB01F168; Tue, 26 Mar 2024 14:55:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.11 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711464940; cv=fail; b=fiYqN1FWmAJZ/huEJ5jrXL44sVwAJxznOyI/RhFa7O39VqlxZKdnrQ2XlEfc9fGmsrGUL/BRIOYfW4JDmxn4IVvM5DXdJs0RXX8bM7G1y+MBVIHKI4tEFJU45Mwk4pt3v+amrlo35UU4dKvgx2g94u+xg/gZtcVoZG5/kb3b7Wo= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711464940; c=relaxed/simple; bh=AFiGdtVpYvGkYQpcQdwjuZS8tPo6pz+PizLTBxbITEc=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=QuQOZxr4Q2Jez7PeP0npaGBMoxHfiUmU0LNgNua+7OESMbSoSC6KkmlaBjMMfH1zSg4K/V6vPJQm34yAj4JkY+c/m+Phoy42z0/h+MU3OConnLd2LnQV2LCk4+1X0xUkt6/dYAQRMOlS9FhvNgnIFtOsWf9wLCOTAkQ5j9ZR+38= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=UvryIMkY; arc=fail smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711464938; x=1743000938; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=AFiGdtVpYvGkYQpcQdwjuZS8tPo6pz+PizLTBxbITEc=; b=UvryIMkYH5OqYnhU4AcEbVQTXUOjqE6WV2LGdpG+ySP4OQCBa/EX79fB hYYRaZePM5Ox5zoljydEfUFamWIXbtW4AAdafCC15bKIvnokoLnLv8aAK Suo0yegRmdAsJ8qo1pgPJEnpFWMHk0Cel5pPKwjF0ewgnDy8hBNBuNzDR XboPIaMP4OJ3nTe+GkrsPq7Pb2f9VO43qFENUCMQ4r+P+/ZArBlzIPHAx COvua5JXlCgzGN7WBvKCFYRGB8OnvqwN+4o2JvOOsZhiTf8Ceqsvj6rli UDVkSIwxMFRC3CoflgQpjKpR7i9dFfy+8BJ1e0+HH+uu7orqDtJMf1Vq2 A==; X-CSE-ConnectionGUID: haHF2h15Rxq6hDMr7SG1WQ== X-CSE-MsgGUID: VABtGsYuRiWugtikt/eWDw== X-IronPort-AV: E=McAfee;i="6600,9927,11025"; a="17064666" X-IronPort-AV: E=Sophos;i="6.07,156,1708416000"; d="scan'208";a="17064666" 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" 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" Subject: RE: [xdp-hints] Re: [PATCH iwl-next,v4 1/1] igc: Add Tx hardware timestamp request for AF_XDP zero-copy packet 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?9GmNrVd2etLwcE7gBpzVbeJfhuoh4y4JToYtqoPR1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sLroZ+A/iarwEKaZm2Ni+Zf43jr8LauFlVhFYP4jgkh4SYzC?= =?us-ascii?Q?gVXQ5F18kErGbhCoiyo1zjJxJLZo7aWUkIgw3j9PI7gZLR/furKi1glmqmAx?= =?us-ascii?Q?DlYeMU6kQjmCwBgMnAwB5kaoeACj38jkpcG6le5uta3WeO2jDZJTq99vybrn?= =?us-ascii?Q?+g=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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