Article View: linux.kernel.netdev
Article #21129Re: [PATCH net v1 0/3] af_packet/tcp: fix late hardware timestamp handling
From: Kohei Enju
Date: Mon, 23 Nov 2026 15:31
Date: Mon, 23 Nov 2026 15:31
62 lines
11389 bytes
11389 bytes
On 11/23 16:36, KhaiWenTan wrote:
> On 4/29/2026 5:16 PM, Kohei Enju wrote:
> > Since commit 97dc7cd92ac6 ("ptp: Support late timestamp determination"),
> > skb_shared_hwtstamps may carry netdev_data instead of a resolved
> > hwtstamp. AF_PACKET and TCP could still read that storage as a ktime_t
> > and report bogus hardware timestamps to userspace.
> >
> > This series factors the late timestamp resolution logic into a common
> > helper, then switches AF_PACKET and TCP to use it.
> >
> > Notes on SOF_TIMESTAMPING_BIND_PHC:
> > The generic socket receive timestamping path honors it, but the
> > AF_PACKET and TCP receive paths touched here haven't implemented that
> > behavior.
> > This series doesn't change that; those paths always resolve timestamps
> > with cycles == false and preserve their timestamp-domain semantics.
> >
> > Kohei Enju (3):
> > net: introduce helper to resolve hardware timestamps from skb
> > af_packet: use skb_get_hwtstamp() for hardware timestamps
> > tcp: use skb_get_hwtstamp() for hardware timestamps
> >
> > include/linux/skbuff.h | 11 +++++++++++
> > include/net/tcp.h | 2 +-
> > net/core/skbuff.c | 27 +++++++++++++++++++++++++++
> > net/ipv4/tcp_input.c | 3 ++-
> > net/ipv4/tcp_ipv4.c | 6 ++++--
> > net/ipv6/tcp_ipv6.c | 3 ++-
> > net/packet/af_packet.c | 2 +-
> > net/socket.c | 27 +++------------------------
> > 8 files changed, 51 insertions(+), 30 deletions(-)
> >
> Hi Kohei,
Hi KhaiWen,
Sorry for the late response.
>
> I am currently working with Vinicius on a fix for wrong hardware timestamp
> in tcpdump (https://lore.kernel.org/all/20261111053728.2611070-1-khai.wen.tan@linux.intel.com/)
>
> We have came across your series are also fixing the same issue. I would like
> to check about your current status on the v2 for this series, we are
> planning to implement your fixes (skb_get_hwtstamp() helper) into our patch,
> so we would like to ask if you currently have plan for the series v2. If you
> not having plans for this or donβt have time for this, may we include the
> first patch of this series into our patch, the patch authorship will still
> be kept to you?
I'm not currently working on a v2, so please feel free to incorporate my
changes into your patch. I'm fine with either keeping or dropping my
authorship.
Thanks for taking this forward!
Thanks,
Kohei
>
> Best Regards,
> KhaiWen
Technical Details
Message-ID:
<awRbgl7vlFO-c3Q6@x1>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369540-linux-kernel-netdev=dewy.ruReferences:
<20260429091632.26509-1-kohei@enjuk.jp> <a62bce53-a307-483f-86e9-00949b142e9f@linux.intel.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369540-linux-kernel-netdev=dewy.ru
From: kohei@enjuk.jp (Kohei Enju)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v1 0/3] af_packet/tcp: fix late hardware timestamp
handling
Date: Tue, 24 Nov 2026 00:31:29 +0900
Organization: Usenet Network
Message-ID: <awRbgl7vlFO-c3Q6@x1>
References: <20260429091632.26509-1-kohei@enjuk.jp>
<a62bce53-a307-483f-86e9-00949b142e9f@linux.intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="3915030"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:T+L+KRLcmKRlmi/tRCdSRJhiglg= sha256:mfmRW4nOBLMtM+QQ/OSs2/f1P3X/Gd1sSwejw/NvJWk=
sha1:XKjYwm2XozfsLBIYr0Sf3Qu+b7Y= sha256:yuP77XMsQW0ILzNuzOJB71ObacqtCSdmQaezi79DScQ=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 57888125DBC; Mon, 23 Nov 2026 18:32:07 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.151
X-Spam-Status: No, score=-3.151 tagged_above=-9999 required=6.31
tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=enjuk.jp
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id U0tBS3uSLR_2;
Mon, 23 Nov 2026 18:31:57 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-369540-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=enjuk.jp
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
by mail.dewy.ru (Postfix) with ESMTPS id 9A216125DB9; Mon, 23 Nov 2026 18:31:48 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sto.lore.kernel.org (Postfix) with ESMTP id 46CDA603DE5; Mon, 23 Nov 2026 15:31:47 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1795447904;
b=OgIx5v+uAGc+NxwlDuOBHGflhkGadCcPR7dMgbDHbJ/JYj9dBBA2QVY3ZouRY5Bv2Bwo
ZcsOMYx1Vjc8lXkp6h8L8LpqE9O2gAwcdIHD8cyUFbepCqE7WABijiD0XKOFvHjAgSBqj
H+7xtPGsVvgcuNwkDGQZN5pBfRSBrMF0Rm4ExIjc8iLXf92t13uvlJICWRgYIiP78yH99
DOnHDo0+v16e75D/zrKUtPcOZtmwVyA4Iyid56fxyxYiHbgGNCqFFVgJItZbubWQNojMg
oj/9GNizayGb9kgis5xS+9UoVzujhNguNK7AmDGs0CXCBE4pReZFR/IffSWIaLtSdjA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795447904;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:Date:
From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id:
List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
Precedence:MIME-Version:Content-Type:Content-Disposition:
Content-Transfer-Encoding:In-Reply-To;
bh=h5rsH2FTHuftKEMiDvVqz9ghi6s0zcdm9kkw+7bVksM=;
b=GQeq3cLHqulkCdeC+bUjw/nCKazd1LBUhrHuvg7KYhiy5U/9hJdQKz8YKkivVm9P7cCJ
ZJt+fs24nk4w+GryseGua7j8TSwW575Ds1Ri5ufIzyodsiERczIcrjMd5vgwGi7Gu6tLu
wul+vxjwt/lXE77icniVtd5DOLR8QPN+rUszxbJKBnKzR6RWfhVfMGhKx7H2bbzO7B4yL
6MUaWYJd5j8ucgtEh1J10fge071xnuy/opkGxqhBKdfiBNSZQQ/sNp5dlrWlfJuwu+GRi
+pWIQ0pD8ir7rpRCBoO8Tg6LDnZCayKb13Qv8nll9KHnNNgY92V5InHifGIJ5ObfSaw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=enjuk.jp header.i=@enjuk.jp header.a=rsa-sha256 header.s=rs20251215 header.b=VDmjpV+W;
dmarc=pass header.from=enjuk.jp;
spf=pass smtp.mailfrom=enjuk.jp;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 080C6606A681;
Mon, 23 Nov 2026 15:31:44 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=enjuk.jp header.i=@enjuk.jp header.a=rsa-sha256 header.s=rs20251215 header.b=VDmjpV+W
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=49.212.198.91
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1795447903;
b=syt5++uP7wbox4qGVxNVdCMnQhcM53YT1CVQs2QHQuxA5LRLKzURM0q/vPDRkxMfAMDv
Wdh8rZgQJ7EB9aJj3TwRBi1xhydtNshV7j/cuBC1pwYa2A0/AXCzXNQYIo16uCdsrFhxg
3S5gHB3mouEG7eRzwNRkdyoUNgf9BL4gbzwG3KulMC8ReXXxGv0V2yA+k2e8Pvupr+afm
MJHL7vxRv8CNSZP1ekpaBMnb3g7F0Z2mD7+8wlgzAdj0l/3NykCNqNa+iY88KaZwR5X0Q
tG4wqkKsygxZjYCsLe14trpqqTdreRECRs4WqFzgbOsvstTRdQgvQWX+IFjuJB2iEYQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795447903;
h=DMARC-Filter:Received:DKIM-Signature:Date:From:To:Cc:Subject:
Message-ID:References:MIME-Version:Content-Type:Content-Disposition:
Content-Transfer-Encoding:In-Reply-To;
bh=h5rsH2FTHuftKEMiDvVqz9ghi6s0zcdm9kkw+7bVksM=;
b=H0R5l3AxAanyK/vlTbQry9eA2R1ogKBhO1VytotSzrEkKUVFTfVAjmx7LzxQd0ZskDQx
9iK+wRJWM3iHxefTrT7UUikY9U1x8DWbQdfgGOLubcyLzfhF9khrnmgpSYrISRaCQWhOJ
dHqxkGnTf8pNLDzppRDcHjoTYosI1IaS9tSn3STqws5ba3qwGa4V82+PAR/gg+WV9EE9+
scGB4kPwOkHdj0szxcM1jlqAnBh3moEskgAlsyEZaHZvn9/E4i6qeCkrHloghEWskLFwV
0C2o0jp7gXUh1J2MDpTyM9u4/sKwnHVH7VRGSCyF83IuNJU3rqAmKUcehOlBOc2+fBg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=enjuk.jp;
spf=pass smtp.mailfrom=enjuk.jp;
dkim=pass header.d=enjuk.jp header.i=@enjuk.jp header.a=rsa-sha256 header.s=rs20251215 header.b=VDmjpV+W;
arc=none smtp.remote-ip=49.212.198.91
X-Received: from www2881.sakura.ne.jp (www2881.sakura.ne.jp [49.212.198.91])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F302606A331
for <netdev@vger.kernel.org>; Mon, 23 Nov 2026 15:31:42 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6F302606A331
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=enjuk.jp
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=enjuk.jp
X-Received: from x1 (KD182250156109.au-net.ne.jp [182.250.156.109])
(authenticated bits=0)
by www2881.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 6ANFVTTi018736
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
Tue, 24 Nov 2026 00:31:32 +0900 (JST)
(envelope-from kohei@enjuk.jp)
X-DKIM-Signature: a=rsa-sha256; bh=h5rsH2FTHuftKEMiDvVqz9ghi6s0zcdm9kkw+7bVksM=;
c=relaxed/relaxed; d=enjuk.jp;
h=From:Message-ID:To:Subject:Date;
s=rs20251215; t=1795447894; v=1;
b=VDmjpV+Wi2ROV4p1Ozl56zSJjNp6c83ppoVAc2oK2rP3WPftJGxOexw5gXotop47
t0dhLqP9zRaEoMHx82uoSSeoGURzJvAJWVENVxrekOHcCHsbFJ30znznD4L/tFJD
5IQ4rC+t7frsvHbNXriqLDwHLCBwssTJPVhG7DY/x1C7IbDkxPi1SSLJ6k/XlKCG
dsGYn5MKbn/Qv/797JemE3n43tbSsg8Gbrtb1B85OBQQb74yIrB6RpuVYr6b9UVU
LHpuNGCncaw4VFMEMbu0m2d6BAMqVcU0eMZkcpblxmnQKH2Hi8ubC1KWp2P6svCt
9iSLtNHrnRL1jvH4CM7CzA==
X-Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Kuniyuki Iwashima <kuniyu@google.com>,
Willem de Bruijn <willemb@google.com>,
David Ahern <dsahern@kernel.org>, Neal Cardwell <ncardwell@google.com>,
Gerhard Engleder <gerhard@engleder-embedded.com>,
Jonathan Lemon <jonathan.lemon@gmail.com>,
Richard Cochran <richardcochran@gmail.com>,
Gomes Vinicius <vinicius.gomes@intel.com>,
Song Yoong Siang <yoong.siang.song@intel.com>,
Looi Hong Aun <hong.aun.looi@intel.com>,
"Tan, Khai Wen" <khai.wen.tan@intel.com>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <a62bce53-a307-483f-86e9-00949b142e9f@linux.intel.com>