|
|
Log in / Subscribe / Register

bpf-timestamp: support rx side

From:  Jason Xing <kerneljasonxing-AT-gmail.com>
To:  davem-AT-davemloft.net, edumazet-AT-google.com, kuba-AT-kernel.org, pabeni-AT-redhat.com, horms-AT-kernel.org, willemb-AT-google.com, kuniyu-AT-google.com, ast-AT-kernel.org, daniel-AT-iogearbox.net, andrii-AT-kernel.org, martin.lau-AT-linux.dev, eddyz87-AT-gmail.com, memxor-AT-gmail.com, song-AT-kernel.org, yonghong.song-AT-linux.dev, jolsa-AT-kernel.org, john.fastabend-AT-gmail.com, sdf-AT-fomichev.me
Subject:  [PATCH net-next v2 0/6] bpf-timestamp: support rx side
Date:  Thu, 21 May 2026 21:52:38 +0800
Message-ID:  <20260521135244.40869-1-kerneljasonxing@gmail.com>
Cc:  netdev-AT-vger.kernel.org, bpf-AT-vger.kernel.org, Jason Xing <kernelxing-AT-tencent.com>
Archive-link:  Article

From: Jason Xing <kernelxing@tencent.com>

Previously the series[1] has already supported tx side for BPF
timestamping, now it's time to support rx side.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/ne...

---
v2
Link: https://lore.kernel.org/all/20260518082344.96647-1-kernel...
1. support tcp rx zc case (Stan)
2. add if-statements for ASSERT_TRUE (sashiko)


Jason Xing (6):
  bpf: Add bpf_ktime_get_real_ns() kfunc
  net: export sock_disable_timestamp() declaration
  bpf: support bpf_setsockopt for bpf timestamping rx feature
  bpf: add BPF_SOCK_OPS_TSTAMP_RCV_CB callback
  bpf: enable bpf timestamping rx in TCP layer
  selftests/bpf: Add RX latency tests for bpf timestamping

 include/net/sock.h                            | 12 +++-
 include/uapi/linux/bpf.h                      | 10 ++-
 kernel/bpf/helpers.c                          |  6 ++
 net/core/filter.c                             |  8 +++
 net/core/sock.c                               | 20 +++++-
 net/ipv4/tcp.c                                | 10 +++
 tools/include/uapi/linux/bpf.h                |  5 ++
 .../bpf/prog_tests/net_timestamping.c         | 71 ++++++++++++++++++-
 .../selftests/bpf/progs/net_timestamping.c    | 35 +++++++++
 9 files changed, 172 insertions(+), 5 deletions(-)

-- 
2.43.7




Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds