bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v3 0/2] add hwtstamp to __sk_buff
@ 2021-09-09 22:04 Vadim Fedorenko
  2021-09-09 22:04 ` [PATCH bpf-next v3 1/2] bpf: add hardware timestamp field " Vadim Fedorenko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vadim Fedorenko @ 2021-09-09 22:04 UTC (permalink / raw)
  To: Martin KaFai Lau, Andrii Nakryiko, Daniel Borkmann
  Cc: Vadim Fedorenko, Alexei Starovoitov, Song Liu, Yonghong Song,
	John Fastabend, Jakub Kicinski, netdev, bpf

This patch set adds hardware timestamps to __sk_buff. The first patch
implements feature, the second one adds a selftest.

v2 -> v3:
* rebase on bpf-next

v1 -> v2:

* Fixed bpf_skb_is_valid_access() to provide correct access to field
* Added explicit test to deny access to padding area
* Added verifier selftest to check for denied access to padding area

Acked-by: Martin KaFai Lau <kafai@fb.com>

Vadim Fedorenko (2):
  bpf: add hardware timestamp field to __sk_buff
  selftests/bpf: test new __sk_buff field hwtstamp

 include/uapi/linux/bpf.h                      |  2 +
 lib/test_bpf.c                                |  1 +
 net/bpf/test_run.c                            |  8 +++
 net/core/filter.c                             | 21 +++++++
 tools/include/uapi/linux/bpf.h                |  2 +
 .../selftests/bpf/prog_tests/skb_ctx.c        |  1 +
 .../selftests/bpf/progs/test_skb_ctx.c        |  2 +
 .../testing/selftests/bpf/verifier/ctx_skb.c  | 60 +++++++++++++++++++
 8 files changed, 97 insertions(+)

-- 
2.18.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-10 21:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-09 22:04 [PATCH bpf-next v3 0/2] add hwtstamp to __sk_buff Vadim Fedorenko
2021-09-09 22:04 ` [PATCH bpf-next v3 1/2] bpf: add hardware timestamp field " Vadim Fedorenko
2021-09-09 22:04 ` [PATCH bpf-next v3 2/2] selftests/bpf: test new __sk_buff field hwtstamp Vadim Fedorenko
2021-09-10 21:30 ` [PATCH bpf-next v3 0/2] add hwtstamp to __sk_buff patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).