[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200121195408.3756734-1-kafai@fb.com>
Date: Tue, 21 Jan 2020 11:54:08 -0800
From: Martin KaFai Lau <kafai@...com>
To: <bpf@...r.kernel.org>
CC: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
David Miller <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, <kernel-team@...com>,
<netdev@...r.kernel.org>
Subject: [PATCH bpf-next 0/3] bpf: tcp: Add bpf_cubic example
This set adds bpf_cubic.c example. It was separated from the
earlier BPF STRUCT_OPS series. Some highlights since the
last post:
1. It is based on EricD recent fixes to the kernel tcp_cubic. [1]
2. The bpf jiffies reading helper is inlined by the verifier.
Different from the earlier version, it only reads jiffies alone
and does not do usecs/jiffies conversion.
3. The bpf .kconfig map is used to read CONFIG_HZ which
is then used in the usecs_to_jiffies() conversion.
[1]: https://patchwork.ozlabs.org/cover/1215066/
Martin KaFai Lau (3):
bpf: Add BPF_FUNC_jiffies64
bpf: Sync uapi bpf.h to tools/
bpf: tcp: Add bpf_cubic example
include/linux/bpf.h | 2 +
include/uapi/linux/bpf.h | 9 +-
kernel/bpf/core.c | 1 +
kernel/bpf/helpers.c | 27 +
kernel/bpf/verifier.c | 18 +
net/core/filter.c | 2 +
tools/include/uapi/linux/bpf.h | 9 +-
tools/testing/selftests/bpf/bpf_tcp_helpers.h | 16 +
.../selftests/bpf/prog_tests/bpf_tcp_ca.c | 25 +
tools/testing/selftests/bpf/progs/bpf_cubic.c | 573 ++++++++++++++++++
10 files changed, 680 insertions(+), 2 deletions(-)
create mode 100644 tools/testing/selftests/bpf/progs/bpf_cubic.c
--
2.17.1
Powered by blists - more mailing lists