Received: by 2002:ab2:23c8:0:b0:1f2:fdbc:cb93 with SMTP id a8csp231542lqe; Wed, 27 Mar 2024 04:21:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXeXs0+vZsTK5ube4PbtYOxS/Q51iOK+3Qr0pASVVLCQo52LPKWugD4nymTW6rAWaq3jwaMl/YChaIKgVWRyE5ifMInPv91dJFMT6ADyg== X-Google-Smtp-Source: AGHT+IEWtSH1weQEdJC7RVZx+uBl+205H6GwbIVchAySG7msDduu2XrZe4/mnSY1Vt8l3iYZzybS X-Received: by 2002:a17:906:52d2:b0:a4a:35bc:2588 with SMTP id w18-20020a17090652d200b00a4a35bc2588mr758702ejn.43.1711538484685; Wed, 27 Mar 2024 04:21:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711538484; cv=pass; d=google.com; s=arc-20160816; b=IRLkkBUID1SDGPltgsQCtlk6RPd/90s2JzZCOGfsZeEAv8hn4++BbGKqTz6zscTOo4 hpTEP3/l3UgWzeUkoNH8862f9nWCGnSDQDg4O3BDHhB00IAISSC/LbUZVyf7MWxMBxqK UHRxk72UZHmvvLa2VtJtvTl+cCk3oqOq+Pni49ZTtmigpcJmQUU5qZHcKKIBGQ+ejLwc CXSZZ6cRz2SOh1H+LMgT21OLwvT/4mndXDfiX7vYHnacrzAh8+iQ818Aaj8pAVSGBoeJ qTbl1GThlq5X8wvcxb0xTuG6vVtsg31GomEVOTou2dj3XKS4Y0itslG3dNlMrKQxDjnP s+wg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:content-transfer-encoding:autocrypt:references :in-reply-to:date:cc:to:from:subject:message-id:dkim-signature; bh=FGUoqKxAQrqnoBrdwR+KD2Oip1GwaKOaioEDRMyB75o=; fh=4OUCBQRJ7ygxueiDGSFCxPQBZwFTjO08qMcm2ocu5gU=; b=uqcI8F9loXi+vMSZOBgfUJ4iuBrsSEGgrPDVIu8ZESzb4rgCd625/WqUhpdxFcPjfD Moiw6/AZ210IkWXa2wT3ltL92uJ30zWDSMkGia3caEHLe7+mTWG3hSlnBxVU2yb10S8M 9AbwUNeU2Z35H9yh2BVDeIH75/KkTpuzU6bRXHZHESQoD0R2u18oB/yf+rfk8ElstYAa e8Qx2G/kVi9RGCi/Z0RR/qr9JkVFztkIenBtRTbwsqXIVT50dpefiIBjnP/XYBpZIAHA hqheFgha+F/w25ZmSDnz2bU4+/3lbEwekQDzeyvJyzcw+MM3rpnKCjltQdpGcf4ateaT WaLg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=CGUw99V0; arc=pass (i=1 spf=pass spfdomain=rts-flowmailer.siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of linux-kernel+bounces-120742-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120742-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id kl2-20020a170907994200b00a49b5e830d6si2934425ejc.442.2024.03.27.04.21.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 04:21:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120742-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=CGUw99V0; arc=pass (i=1 spf=pass spfdomain=rts-flowmailer.siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of linux-kernel+bounces-120742-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120742-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3F4C21F2D630 for ; Wed, 27 Mar 2024 11:21:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 83F965A4C9; Wed, 27 Mar 2024 11:21:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=siemens.com header.i=florian.bezdeka@siemens.com header.b="CGUw99V0" Received: from mta-65-225.siemens.flowmailer.net (mta-65-225.siemens.flowmailer.net [185.136.65.225]) (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 B493359B63 for ; Wed, 27 Mar 2024 11:21:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.136.65.225 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711538473; cv=none; b=h8YZSmZPY2xAWXUK9chnyWKx7J/cK/105/9ph7p/n4owb3RcZP+GBaHtKDGhkb7BdZ3bZiKzTXZE8va4+tdmMfSPiAHzKXFM3/j6VY+yz6PzIaZiSC3A6s61oiuSHpnqV50Uo53hK3jc+ZqaqRu9F2VkBic8yCv370pYvDBHHJg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711538473; c=relaxed/simple; bh=FGUoqKxAQrqnoBrdwR+KD2Oip1GwaKOaioEDRMyB75o=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=M9N1jOY7ClLErR+4afvWQrJwB2DNgtuxRmz/mEUcD4QjA/hJq9erzCcwdc4KZr3NmPY9YUBSu4p2iP1muuxkwcpY//qT3UiM+ACTMgqyUTrDns/CGuOJCKTHCp5sZoXNCCGMxGfyUYD27Ztk1ea/rHwH+2bhZuxb26PWyk3+AJ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=siemens.com; spf=pass smtp.mailfrom=rts-flowmailer.siemens.com; dkim=pass (1024-bit key) header.d=siemens.com header.i=florian.bezdeka@siemens.com header.b=CGUw99V0; arc=none smtp.client-ip=185.136.65.225 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=siemens.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rts-flowmailer.siemens.com Received: by mta-65-225.siemens.flowmailer.net with ESMTPSA id 20240327112102c3f78d6866e00f3efa for ; Wed, 27 Mar 2024 12:21:02 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=florian.bezdeka@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=FGUoqKxAQrqnoBrdwR+KD2Oip1GwaKOaioEDRMyB75o=; b=CGUw99V0HjizVNE3UApeXPD9+uHHhXmsyZEYTUgE0MzTD4w1Ozpmo4TFQYF8JQH0iggT0x QFWgSKmbprLsTPXnbQNXgj8wqlD6W8TbXgIU71ZoghtuBRT1gnSqTZW9Dee668Vuhvc6h0ls wzj5DDPanluAH3AB7DEsFcAseISXY=; Message-ID: Subject: Re: [xdp-hints] Re: [PATCH iwl-next,v4 1/1] igc: Add Tx hardware timestamp request for AF_XDP zero-copy packet From: Florian Bezdeka To: "Song, Yoong Siang" , Kurt Kanzenbach , "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" Date: Wed, 27 Mar 2024 12:21:01 +0100 In-Reply-To: References: <20240325020928.1987947-1-yoong.siang.song@intel.com> <87h6gtb0p0.fsf@kurt.kurt.home> Autocrypt: =?US-ASCII?Q?addr=3Dflorian.bezdeka@siemen?= =?US-ASCII?Q?s.com;_prefer-encrypt=3Dmutual?= =?US-ASCII?Q?;_keydata=3DmQENBFwsf8QBCAC2f4AQWu92LZC4bKyUYRxWIpWqGz790s?= =?US-ASCII?Q?pcYkXO7M8kfea4iC8qMxv2hT4HT0LTncRP6WiovVN2PeoOBfN5BSa5z?= =?US-ASCII?Q?LIrZGVXh7KmbdKhwhVU+ynoTq9G5uaO2Kos7Vv7nNCuatIq8tSNILuoB?= =?US-ASCII?Q?DFTAZnJW3y1V7YOwhDCPl5gbLSYqUY3OE0yksbtCcVI5istT4ED6mjQ?= =?US-ASCII?Q?9W+3uH1LrgFeEF0oxTjrEPxO5ZYATz0f/TYC8WiM0sMrV+n0eMDntlzA?= =?US-ASCII?Q?63D6lcRi5mNp2jPsJkq3tbWqyCrAe1sKPVJB44ekFwCk0kDIuhR13Q3R?= =?US-ASCII?Q?HE4Or/9sznhMUQjYueWXvTZfzH/VsQJHABEBAAG0LUZsb3JpYW4gQmV6?= =?US-ASCII?Q?ZGVrYSA8Zmxvcmlhbi5iZXpkZWthQHNpZW1lbnMuY29tPokBVAQTAQg?= =?US-ASCII?Q?APhYhBAzL4P3jiTHdthsq4cj0O1fnOEBVBQJcLH/FAhsDBQkB4TOABQs?= =?US-ASCII?Q?JCAcCBhUKCQgLAgQWAgMBAh4BAheA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JEEoHyE9rG1dPpJYH+gPnqpu7h?= =?US-ASCII?Q?4fsWOxco38e74MsazoUdfndTYP5tgaYTVE51ZhOZBl+4jYaywsmmFm9g?= =?US-ASCII?Q?6N4Tw3GiMEDB4YU1X7gQZ60fDKpYL5SnCu5qZirJ4RCV4LDA0789ir+6?= =?US-ASCII?Q?8/zfwXBTV5QoMH0+MkXB4BL+Km3f7X/GdN5oRoItAyKDBcEfGJo6afT?= =?US-ASCII?Q?PtcUdI9n7ExCSfJwb0SBvvkvUsdNppFDGOOHSioINbEHBs2VUvE43toM?= =?US-ASCII?Q?4mPLfhFIAtDcn5Byt80/kotU8v3Iyf86NYCa+0h77xTsKHcCUqe8Rvow?= =?US-ASCII?Q?bCIbig9GGbbd54TasfqQQOiAkn/WeGl33+UIVX1Q8zo7eyMJHzLJQ3I=3D?= Content-Type: text/plain; charset="UTF-8" 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-Flowmailer-Platform: Siemens Feedback-ID: 519:519-68982:519-21489:flowmailer On Tue, 2024-03-26 at 14:55 +0000, Song, Yoong Siang wrote: > On Tuesday, March 26, 2024 9:08 PM, Kurt Kanzenbach = wrote: > > Hi Florian, > >=20 > > 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() wit= h > > > > SIOCSHWTSTAMP cmd before sending xsk Tx hardware timestamp request. > > > >=20 > > > > Same as implementation in RX timestamp XDP hints kfunc metadata, Ti= mer 0 > > > > (adjustable clock) is used in xsk Tx hardware timestamp. i225/i226 = have > > > > four sets of timestamping registers. *skb and *xsk_tx_buffer pointe= rs > > > > are used to indicate whether the timestamping register is already o= ccupied. > > >=20 > > > Let me make sure that I fully understand that: In my own words: > > >=20 > > > 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? >=20 > Hi Florian, >=20 > 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 Got it. Thanks! >=20 > > >=20 > > > If so, we now have a feedback channel for meta information for/from T= X. > > > 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. > >=20 > > 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? > >=20 > > Thanks, > > Kurt >=20 > Florian & Kurt, >=20 > Yes, me and Stanislav are trying to add Earliest TxTime First / Launch Ti= me to the framework. > Please refer to [1] for the patchset. The metadata framework will just pa= ss 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= drivers > to check whether the design is feasible for different drivers, cause each= driver is > having their own limitation on launch time. Therefore, after this tx hwts= patch accepted, > I will try to enable launch time on igc driver, and submit new version.= =20 Nice to hear! Keep me in the loop and let me know if I could support somehow. >=20 > Kurt is right that current metadata framework is lacking a way to feedbac= k whether > the launch time is invalid or not. Maybe we can try to enable launch time= without feedback, > then discuss about the status report design. In case the launch time is invalid - couldn't we simply skip the frame and "forward" it back to the application (completion queue/ring) after adjusting some meta-information (like the TX timestamps in this patch) telling the application what happened? Thanks a lot! Florian >=20 > [1] https://patchwork.kernel.org/project/netdevbpf/cover/20231203165129.1= 740512-1-yoong.siang.song@intel.com/ >=20 > Thanks & Regards > Siang