Thread View: linux.kernel.netdev
3 messages
3 total messages
Started by KhaiWenTan
Mon, 23 Nov 2026 08:36
Re: [PATCH net v1 0/3] af_packet/tcp: fix late hardware timestamp handling
Author: KhaiWenTan
Date: Mon, 23 Nov 2026 08:36
Date: Mon, 23 Nov 2026 08:36
48 lines
11953 bytes
11953 bytes
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,
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?
Best Regards,
KhaiWen
Re: [PATCH net v1 0/3] af_packet/tcp: fix late hardware timestamp handling
Author: 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
Re: [PATCH net v1 0/3] af_packet/tcp: fix late hardware timestamp handling
Author: KhaiWenTan
Date: Tue, 24 Nov 2026 02:26
Date: Tue, 24 Nov 2026 02:26
68 lines
12511 bytes
12511 bytes
On 11/23/2026 11:31 PM, Kohei Enju wrote:
> 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 for the response. We will be including the first patch
"[net,v1,1/3] net: introduce helper to resolve hardware timestamps from
skb".
>
> Thanks,
> Kohei
>
>>
>> Best Regards,
>> KhaiWen
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads