mbox series

[v2,bpf-next,0/3] bpf: Add hwtstamp field for the sockops prog

Message ID 20221107230420.4192307-1-martin.lau@linux.dev (mailing list archive)
Headers show
Series bpf: Add hwtstamp field for the sockops prog | expand

Message

Martin KaFai Lau Nov. 7, 2022, 11:04 p.m. UTC
From: Martin KaFai Lau <martin.lau@kernel.org>

The bpf-tc prog has already been able to access the
skb_hwtstamps(skb)->hwtstamp.  This set extends the same hwtstamp
access to the sockops prog.

v2:
- Fixed the btf_dump selftest which depends on the
  last member of 'struct bpf_sock_ops'.

Martin KaFai Lau (3):
  bpf: Add hwtstamp field for the sockops prog
  selftests/bpf: Fix incorrect ASSERT in the tcp_hdr_options test
  selftests/bpf: Test skops->skb_hwtstamp

 include/uapi/linux/bpf.h                      |  1 +
 net/core/filter.c                             | 39 +++++++++++++++----
 tools/include/uapi/linux/bpf.h                |  1 +
 .../selftests/bpf/prog_tests/btf_dump.c       |  4 +-
 .../bpf/prog_tests/tcp_hdr_options.c          |  6 ++-
 .../bpf/progs/test_misc_tcp_hdr_options.c     |  4 ++
 6 files changed, 43 insertions(+), 12 deletions(-)

Comments

Yonghong Song Nov. 8, 2022, 1:03 a.m. UTC | #1
On 11/7/22 3:04 PM, Martin KaFai Lau wrote:
> From: Martin KaFai Lau <martin.lau@kernel.org>
> 
> The bpf-tc prog has already been able to access the
> skb_hwtstamps(skb)->hwtstamp.  This set extends the same hwtstamp
> access to the sockops prog.
> 
> v2:
> - Fixed the btf_dump selftest which depends on the
>    last member of 'struct bpf_sock_ops'.
> 
> Martin KaFai Lau (3):
>    bpf: Add hwtstamp field for the sockops prog
>    selftests/bpf: Fix incorrect ASSERT in the tcp_hdr_options test
>    selftests/bpf: Test skops->skb_hwtstamp
> 
>   include/uapi/linux/bpf.h                      |  1 +
>   net/core/filter.c                             | 39 +++++++++++++++----
>   tools/include/uapi/linux/bpf.h                |  1 +
>   .../selftests/bpf/prog_tests/btf_dump.c       |  4 +-
>   .../bpf/prog_tests/tcp_hdr_options.c          |  6 ++-
>   .../bpf/progs/test_misc_tcp_hdr_options.c     |  4 ++
>   6 files changed, 43 insertions(+), 12 deletions(-)

LGTM for the whole series:
Acked-by: Yonghong Song <yhs@fb.com>
patchwork-bot+netdevbpf@kernel.org Nov. 11, 2022, 9:20 p.m. UTC | #2
Hello:

This series was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:

On Mon,  7 Nov 2022 15:04:17 -0800 you wrote:
> From: Martin KaFai Lau <martin.lau@kernel.org>
> 
> The bpf-tc prog has already been able to access the
> skb_hwtstamps(skb)->hwtstamp.  This set extends the same hwtstamp
> access to the sockops prog.
> 
> v2:
> - Fixed the btf_dump selftest which depends on the
>   last member of 'struct bpf_sock_ops'.
> 
> [...]

Here is the summary with links:
  - [v2,bpf-next,1/3] bpf: Add hwtstamp field for the sockops prog
    https://git.kernel.org/bpf/bpf-next/c/9bb053490f1a
  - [v2,bpf-next,2/3] selftests/bpf: Fix incorrect ASSERT in the tcp_hdr_options test
    https://git.kernel.org/bpf/bpf-next/c/52929912d7bd
  - [v2,bpf-next,3/3] selftests/bpf: Test skops->skb_hwtstamp
    https://git.kernel.org/bpf/bpf-next/c/8cac7a59b252

You are awesome, thank you!