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]) (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 BC25D1B0429 for ; Fri, 24 Jan 2025 11:45:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737719151; cv=none; b=PX3vPAaYqr90MGPjuSUaXNaunOzEFgNILRjRDvGxnee514Dp8VWAd6WlbxQd7FDAo6g/vsUPdhFd1k8bzDP6NjTDFeBQVs3lLsM5iT00ASnLvvKf0lyfkfLqQsmqJtJIMy2ITb6PsL2RhnYekflWKyVDfJ/i6mu/Pn/HmG9dSZM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737719151; c=relaxed/simple; bh=zW/EazKbI+/IIPptYdIXFZX/gpcmxVKJO/Qx43m8AGw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=fvKc/rpzxvJSa6m7QcGeLcpB+TAulLD3UFnWgyUe7xW1mWNXDRYEvioru0n/GX8KVIjtdAmKHKFYGrBBraA/yx6XQQphfCtnKcLUy+R0OFnMt8i6Gaqs4VPz8SEJ8PiV9TlaCWFkqHPM0qF9HeTy7NyCb7wym+75JLf2QTyzYKY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=CWBAJjAZ; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com 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-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-454-zTD6g48VP06Hbjqbc8oS0Q-1; Fri, 24 Jan 2025 06:45:46 -0500 X-MC-Unique: zTD6g48VP06Hbjqbc8oS0Q-1 X-Mimecast-MFC-AGG-ID: zTD6g48VP06Hbjqbc8oS0Q Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-aa66bc3b46dso185222266b.3 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=gSK56/+xwmeEGruGimjGxGw5Bu/RXhRzfwZZqd7e9+5w8cf1TGGps9FOWmEJUIVhn+ Qfjfkh55791egNHyY0p7s/T6A/yCuC5OtFAiybUDF50JUvn/TRxs/VXli8sX4AdaMAvh Koi55XJKsyhIZ7pMl49L9YSKKy4qadckpyh42aidn0CN7CmkfkibbZyaKSo6i4RtLz0k 8Gs19/L3Wy3Ua5po5YJca0SyWOWSbC6wY55WPaFdKoE6iEep98R/290UokMRR/jifutR 8LqGGGHjMKrm6RbAoHb+fI6iZX6qkIffsLM9N9Ehtj425LfuV9iLXub/CSbMrq2G5Xpx UXUQ== X-Forwarded-Encrypted: i=1; AJvYcCXd7h/IAezSYB2Y8Cvu+HiwJKuXSdnVP+rB9DpJUTMZf9PT2GuFDRODKkwY6sKBwF4Fz5itlJ53njafW0o=@vger.kernel.org X-Gm-Message-State: AOJu0YyPFRt8X3TrgrYf5TzdwojPHaCqQekm6NZIYCLgng0hOuJNL+IP IBUA92At1iRWZ3+RnaOPRlUDYsPQZA2VvO1CdkzlmZyeLcYNpnyPGF3+T1Neh/7hap94V7tM0j/ Jb2AJSyOAFb9zDjV5IBQLLLaSnVy3+q6MKtp+VMbYtGKlniJsHbgdHWLLC3mqkw== X-Gm-Gg: ASbGncvnYapA8ThlW5qN5HM27k49/HKPXdPZuxuBEPLsv1YQQV+BgOVGV9BBBddywLp Nx9otv/+NRSFBiWIFw+yRV2v5IREdV/RmZD6r0dXLcW1Vvz5+e8uDRgO/iN76FFeHBUdtElm2rQ KbwnpWa5/gzHnoOCVgnqPWsYf2xFEqPfDLYmpbaeqDIrKwge7ibK7F46PxNvCwvxMxOE9ESYhH2 E0L3Bh3u+l/ulQdfGVqzzPc4CyPpQjgILi6iY9cP9Matey/7A9k6RFxyKO2l3rQyuFieLEA6rYz RPoPkK/jbzk157CII2k= X-Received: by 2002:a05:6402:1e8e:b0:5dc:1059:6b2 with SMTP id 4fb4d7f45d1cf-5dc105a5ec1mr11805773a12.7.1737719144985; 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 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" Subject: Re: [xdp-hints] Re: [PATCH bpf-next v6 4/4] igc: Add launch time support to XDP ZC 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain 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