From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mail.toke.dk (Postfix) with ESMTPS id 2263CADFD02 for ; Fri, 24 Jan 2025 12:45:49 +0100 (CET) Authentication-Results: mail.toke.dk; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=CWBAJjAZ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1737719147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=odeNkl2pdZWzjMRmLzJX8QVcRedjnH492ZzohS0yuak=; b=CWBAJjAZyQwlmRFwm7JzOJC10iIvoLzLKD7cY7FBZNfkT3F8OE36kyYJvQHfDd9G/NbW4/ BolTIDEcRRUnN36rV6Q/PuG+3mOCfaX7/QPqft4gjiaRyGoaPQfXEfwv5LaIY51Ggo5F6q 1ahGwCoeazodd2cpMvgJkdHvDgzf32s= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-454-Pjnwx9IdOROKmwAaIlX6UA-1; Fri, 24 Jan 2025 06:45:46 -0500 X-MC-Unique: Pjnwx9IdOROKmwAaIlX6UA-1 X-Mimecast-MFC-AGG-ID: Pjnwx9IdOROKmwAaIlX6UA Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-aa67f03ca86so169203766b.2 for ; Fri, 24 Jan 2025 03:45:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737719145; x=1738323945; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=odeNkl2pdZWzjMRmLzJX8QVcRedjnH492ZzohS0yuak=; b=OwLB90E9iiTRTz205yfIG5b30R+yY1WHwU05lCet1cEp81oz8DAY3SRTm9q/13bGbs p7sa61oBKUA2dh2HgYsHiA0ZrGU0KUzh28Uqem/BJeucDpRPRNX3Fj7ATM27mN1DSYrB ukSvX6xXM9ELCGLXaiTc09/noObQoeskR9D+UFcA4fm3+LPKJZbQfC0ERE1agF5i3dku 1EVU0gkoGXjWdRS5JzIp7yKuxmI0zoDzswQu/ri6BCNG4iSqZkPBFRDuHYQ6qp2D0tN1 pCplpTIfQEJVBh7QGkIEXWKxRigujhweS5RQE4cM+IIy16xIwqUVA6vbK/Li+wp/hsJs kZZw== X-Forwarded-Encrypted: i=1; AJvYcCXWtVBhIdh+sYj8cW+s8pZx5CNJ48z9nfVw9AP+oV+mKQdNx6AnZbuXJJV1DRON7Pw5lQ+JzypmiA0=@xdp-project.net X-Gm-Message-State: AOJu0YyqE7rAeQpRB3RZXBFfcV6IQo2juAJMzzS6Pej4CRxGBlCW3BEI jJG3bqkGV5jK8MyeOcxNtrvvNPkwPRqUzacdbvxju+CP8F5WxB50Ov8Q/tuVt7IEh8UfbGnDWQh N8VFTq15uUFyhHAlG8YW/RzMj3YDuSHW0P1uf3hiqpjcKoPUexspo9YZk/Q== X-Gm-Gg: ASbGncsavg6Ixkuns/RMhS4rFwvJ1jbU7EldnVN+ssl54LODL2C3wf1yuT4sGqMMsg8 WZhzPOfT89ZsA17mjCSCFJdGzJtiCK2udXfjJHvQ/tY5b/R4JRS9gHsP3HgySplMAN+04y37K5M wFQmDk/BBABNw74SrSi1Cip0ikC0oUuOau6x9x+vkEKCwlHOj1AGpZ1bVrjKiC/ArQmEAK8RXN0 xz97C7xeW9dFao27rjU3ZzyS0j+xjvQknT9ejrZEgbyOGtavKKE4u6EExpkofnhdnYvtMbJL5H3 o3iLLkDBLgk0ZlalRR4= X-Received: by 2002:a05:6402:1e8e:b0:5dc:1059:6b2 with SMTP id 4fb4d7f45d1cf-5dc105a5ec1mr11805767a12.7.1737719144974; Fri, 24 Jan 2025 03:45:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IGeWFYBPETVo309BerlvPgux0XnsYsjMKjnLErW6dJ05V2oA4Fpf2Q3nZFN4K3N5AK1bx4cSA== X-Received: by 2002:a05:6402:1e8e:b0:5dc:1059:6b2 with SMTP id 4fb4d7f45d1cf-5dc105a5ec1mr11805656a12.7.1737719144333; Fri, 24 Jan 2025 03:45:44 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([45.145.92.2]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab6760ab1d7sm117046766b.109.2025.01.24.03.45.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jan 2025 03:45:43 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 9DF17180AA6E; Fri, 24 Jan 2025 12:45:42 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Stanislav Fomichev , Florian Bezdeka In-Reply-To: References: <20250116155350.555374-1-yoong.siang.song@intel.com> <20250116155350.555374-5-yoong.siang.song@intel.com> X-Clacks-Overhead: GNU Terry Pratchett Date: Fri, 24 Jan 2025 12:45:42 +0100 Message-ID: <87bjvwqvtl.fsf@toke.dk> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: d48vpmQ7pxbktBHCW6p8sDfNZHoObLMvFSjT-K8PoVc_1737719145 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-MailFrom: toke@redhat.com X-Mailman-Rule-Hits: implicit-dest X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header Message-ID-Hash: L74H2IWK3TBD5U2FX3OMOH36BLD7DQED X-Message-ID-Hash: L74H2IWK3TBD5U2FX3OMOH36BLD7DQED X-Mailman-Approved-At: Fri, 24 Jan 2025 14:05:38 +0100 CC: "Song, Yoong Siang" , "Bouska, Zdenek" , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Willem de Bruijn , Donald Hunter , Jonathan Corbet , Bjorn Topel , "Karlsson, Magnus" , "Fijalkowski, Maciej" , Jonathan Lemon , Andrew Lunn , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , "Damato, Joe" , Stanislav Fomichev , Xuan Zhuo , Mina Almasry , Daniel Jurgens , Andrii Nakryiko , Eduard Zingerman , Mykola Lysenko , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , Hao Luo , Jiri Olsa , Shuah Khan , Alexandre Torgue , Jose Abreu , Maxime Coquelin , "Nguyen, Anthony L" , "Kitszel, Przemyslaw" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-doc@vger.kernel.org" , "bpf@vger.kernel.org" , "linux-kselftest@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" , "intel-wired-lan@lists.osuosl.org" , "xdp-hints@xdp-project.net" X-Mailman-Version: 3.3.10 Precedence: list Subject: [xdp-hints] Re: [PATCH bpf-next v6 4/4] igc: Add launch time support to XDP ZC List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Stanislav Fomichev writes: > On 01/23, Florian Bezdeka wrote: >> Hi all, >> >> On Thu, 2025-01-23 at 16:41 +0000, Song, Yoong Siang wrote: >> > On Thursday, January 23, 2025 11:40 PM, Bouska, Zdenek wrote: >> > > >> > > Hi Siang, >> > > >> > > I tested this patch series on 6.13 with Intel I226-LM (rev 04). >> > > >> > > I also applied patch "selftests/bpf: Actuate tx_metadata_len in xdp_hw_metadata" [1] >> > > and "selftests/bpf: Enable Tx hwtstamp in xdp_hw_metadata" [2] so that TX timestamps >> > > work. >> > > >> > > HW RX-timestamp was small (0.5956 instead of 1737373125.5956): >> > > >> > > HW RX-time: 595572448 (sec:0.5956) delta to User RX-time sec:1737373124.9873 (1737373124987318.750 usec) >> > > XDP RX-time: 1737373125582798388 (sec:1737373125.5828) delta to User RX-time sec:0.0001 (92.733 usec) >> > > >> > > Igc's raw HW RX-timestamp in front of frame data was overwritten by BPF program on >> > > line 90 in tools/testing/selftests/bpf: meta->hint_valid = 0; >> > > >> > > "HW timestamp has been copied into local variable" comment is outdated on >> > > line 2813 in drivers/net/ethernet/intel/igc/igc_main.c after >> > > commit 069b142f5819 igc: Add support for PTP .getcyclesx64() [3]. >> > > >> > > Workaround is to add unused data to xdp_meta struct: >> > > >> > > --- a/tools/testing/selftests/bpf/xdp_metadata.h >> > > +++ b/tools/testing/selftests/bpf/xdp_metadata.h >> > > @@ -49,4 +49,5 @@ struct xdp_meta { >> > > __s32 rx_vlan_tag_err; >> > > }; >> > > enum xdp_meta_field hint_valid; >> > > + __u8 avoid_IGC_TS_HDR_LEN[16]; >> > > }; >> > > >> > >> > Hi Zdenek Bouska, >> > >> > Thanks for your help on testing this patch set. >> > You are right, there is some issue with the Rx hw timestamp, >> > I will submit the bug fix patch when the solution is finalized, >> > but the fix will not be part of this launch time patch set. >> > Until then, you can continue to use your WA. >> >> I think there is no simple fix for that. That needs some discussion >> around the "expectations" to the headroom / meta data area in front of >> the actual packet data. > > By 'simple' you mean without some new UAPI to signal the size of that > 'reserved area' by the driver? I don't see any other easy way out as well :-/ Yeah, I don't think we can impose UAPI restrictions on the metadata area at this point. I guess the best we can do is to educate users that they should call the timestamp kfunc before they modify the metadata? -Toke