> Summary: 26 PASSED, 0 FAILED
>
> Signed-off-by: Andrey Ignatov
> Acked-by: Alexei Starovoitov
Acked-by: Martin KaFai Lau
On Wed, May 23, 2018 at 12:41:14PM +0200, Daniel Borkmann wrote:
> [ +Martin ]
>
> On 05/21/2018 08:59 AM, Sirio Balmelli wrote:
> > On arm32, 'cd tools/testing/selftests/bpf && make' fails with:
> >
> > libbpf.c:80:10: error: format ‘%ld’ expects argument of type ‘long int’,
> > but argument 4
Pv4 for UDPv4;
> * `msg_src_ip6` to set source IPv6 for UDPv6.
>
> Signed-off-by: Andrey Ignatov
> Acked-by: Alexei Starovoitov
Acked-by: Martin KaFai Lau
On Tue, May 22, 2018 at 09:30:46AM -0700, Yonghong Song wrote:
> Currently, suppose a userspace application has loaded a bpf program
> and attached it to a tracepoint/kprobe/uprobe, and a bpf
> introspection tool, e.g., bpftool, wants to show which bpf program
> is attached to which tracepoint/kpro
s is used to initiate a kprobe perf event.
>
> Signed-off-by: Yonghong Song
Acked-by: Martin KaFai Lau
Sparse warning:
kernel/bpf/btf.c:1985:34: warning: Variable length array is used.
This patch moves the nr_secs from btf_check_sec_info() to a macro.
Fixes: f80442a4cd18 ("bpf: btf: Change how section is supported in btf_header")
Signed-off-by: Martin KaFai Lau
---
kernel/bpf/
Sparse warning:
kernel/bpf/btf.c:1985:34: warning: Variable length array is used.
This patch directly uses ARRAY_SIZE().
Fixes: f80442a4cd18 ("bpf: btf: Change how section is supported in btf_header")
Signed-off-by: Martin KaFai Lau
---
kernel/bpf/btf.c | 11 +--
1 file
Aug 18, 2017 at 3:27 PM, David Miller
> > >> wrote:
> > >> > From: Martin KaFai Lau
> > >> > Date: Fri, 18 Aug 2017 13:51:36 -0700
> > >> >
> > >> >> It seems like that middle box specifically drops TCP_RST if it
> > >
This patch moves the udp[46]_portaddr_hash()
to net/ip[v6].h. The function name is renamed to
ipv[46]_portaddr_hash().
It will be used by a later patch which adds a second listener
hashtable hashed by the address and port.
Signed-off-by: Martin KaFai Lau
---
include/net/ip.h | 9
Enable the second listener hashtable in TCP.
The scale is the same as UDP which is one slot per 2MB.
Signed-off-by: Martin KaFai Lau
---
net/ipv4/tcp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index bf97317e6c97..180311636023 100644
--- a/net/ipv4
This patch adds a count to the 'struct inet_listen_hashbucket'.
It counts how many sk is hashed to a bucket. It will be
used to decide if the (to-be-added) portaddr listener's hashtable
should be used during inet[6]_lookup_listener().
Signed-off-by: Martin KaFai Lau
-
This patch set adds a 2nd listener hashtable. It is to resolve
the performance issue when a process is listening at many IP
addresses with the same port (e.g. [IP1]:443, [IP2]:443... [IPN]:443)
Martin KaFai Lau (4):
inet: Add a count to struct inet_listen_hashbucket
udp: Move udp[46
off as UDP such that it will only consult the
new portaddr hashtable if the current port-only hashtable has >10
sk in the link-list.
Signed-off-by: Martin KaFai Lau
---
include/net/inet_connection_sock.h | 1 +
include/net/inet_hashtables.h | 15
net/ipv4/inet_hashtabl
This patch adds a count to the 'struct inet_listen_hashbucket'.
It counts how many sk is hashed to a bucket. It will be
used to decide if the (to-be-added) portaddr listener's hashtable
should be used during inet[6]_lookup_listener().
Signed-off-by: Martin KaFai Lau
-
This patch set adds a 2nd listener hashtable. It is to resolve
the performance issue when a process is listening at many IP
addresses with the same port (e.g. [IP1]:443, [IP2]:443... [IPN]:443)
Martin KaFai Lau (4):
inet: Add a count to struct inet_listen_hashbucket
udp: Move udp[46
Enable the second listener hashtable in TCP.
The scale is the same as UDP which is one slot per 2MB.
Signed-off-by: Martin KaFai Lau
---
net/ipv4/tcp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index bf97317e6c97..180311636023 100644
--- a/net/ipv4
off as UDP such that it will only consult the
new portaddr hashtable if the current port-only hashtable has >10
sk in the link-list.
Signed-off-by: Martin KaFai Lau
---
include/net/inet_connection_sock.h | 2 +
include/net/inet_hashtables.h | 15
net/ipv4/inet_hashtabl
This patch moves the udp[46]_portaddr_hash()
to net/ip[v6].h. The function name is renamed to
ipv[46]_portaddr_hash().
It will be used by a later patch which adds a second listener
hashtable hashed by the address and port.
Signed-off-by: Martin KaFai Lau
---
include/net/ip.h | 9
On Fri, Dec 01, 2017 at 09:26:46AM -0800, Eric Dumazet wrote:
> On Thu, 2017-11-30 at 15:23 -0800, Martin KaFai Lau wrote:
> > The current listener hashtable is hashed by port only.
> > When a process is listening at many IP addresses with the same port
> > (e.g.
> > [
t_cachep up and then add the new
(int lhash2_mask, *lhash2) after the existing bhash_size.
Signed-off-by: Martin KaFai Lau
---
include/net/inet_connection_sock.h | 2 +
include/net/inet_hashtables.h | 28 +--
net/ipv4/inet_hashtables.c | 168 +++
Enable the second listener hashtable in TCP.
The scale is the same as UDP which is one slot per 2MB.
Signed-off-by: Martin KaFai Lau
Reviewed-by: Eric Dumazet
---
net/ipv4/tcp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index bf97317e6c97
This patch adds a count to the 'struct inet_listen_hashbucket'.
It counts how many sk is hashed to a bucket. It will be
used to decide if the (to-be-added) portaddr listener's hashtable
should be used during inet[6]_lookup_listener().
Signed-off-by: Martin KaFai Lau
Reviewed-b
cacheline
to inet_hashinfo (Suggested by Eric Dumazet, Thanks!)
- I take this chance to plug an existing 4 bytes hole while
adding 'unsigned int lhash2_mask'.
- Add some comments about lhash2 in inet_hashtables.h
Martin KaFai Lau (4):
inet: Add a count to struct inet_listen_hashbu
This patch moves the udp[46]_portaddr_hash()
to net/ip[v6].h. The function name is renamed to
ipv[46]_portaddr_hash().
It will be used by a later patch which adds a second listener
hashtable hashed by the address and port.
Signed-off-by: Martin KaFai Lau
Reviewed-by: Eric Dumazet
---
include
On Tue, Jun 23, 2020 at 12:34:58PM +0200, Jakub Sitnicki wrote:
[ ... ]
> @@ -93,8 +108,16 @@ static int bpf_netns_link_update_prog(struct bpf_link
> *link,
> goto out_unlock;
> }
>
> + run_array = rcu_dereference_protected(net->bpf.run_array[type],
> +
On Tue, Jun 23, 2020 at 10:59:37PM +0200, Jakub Sitnicki wrote:
> On Tue, Jun 23, 2020 at 09:33 PM CEST, Martin KaFai Lau wrote:
> > On Tue, Jun 23, 2020 at 12:34:58PM +0200, Jakub Sitnicki wrote:
> >
> > [ ... ]
> >
> >> @@ -93,8 +108,16 @@ static int bpf_ne
CONFIG_NET
> (Martin)
> - reuse the btf_ids, computed for new helper argument, for return
> values (Martin)
> - using BTF_TYPE_EMIT to express intent of btf type generation (Andrii)
> - abstract out common net macros into bpf_tracing_net.h (Andrii)
Acked-by: Martin KaFai Lau
On Wed, Jun 24, 2020 at 02:09:23PM -0700, John Fastabend wrote:
> Redirect on non-TLS sockmap side has RCU lock held from sockmap code
> path but when called from TLS this is no longer true. The RCU section
> is needed because we use rcu dereference to fetch the psock of the
> socket we are redirec
; pointer. This will let us do it all from one place, bpf/net_namespace.c, in
> the subsequent patch.
>
> No functional change intended.
Acked-by: Martin KaFai Lau
t bpf_link *links[MAX_NETNS_BPF_ATTACH_TYPE];
With the new run_array, I think the "*progs[]" is not needed.
It seems the original "*progs[]" is only used to tell
if it is in the prog_attach mode or the newer link mode.
There is other ways to do that.
It is something to thin
i-prog attachment will be available only for bpf_link, and
> we don't need to build a list of programs attached directly and indirectly
> via links.
Acked-by: Martin KaFai Lau
mmary that fell out of sync when tests
> extended to cover links.
Acked-by: Martin KaFai Lau
end the rcu_read_lock/unnlock block to
> include the call to sk_psock_tls_verdict_apply(). This will fix both
> TLS redirect case and non-TLS redirect+error case. Also remove
> psock from the sk_psock_tls_verdict_apply() function signature its
> not used there.
Acked-by: Martin KaFai Lau
s seen above and
> a performance issue. For example, in the Cilium case we always
> set the strparser up to return sbks 1:1 without any merging and
> have avoided above issues.
Thanks for the details explanation. I have to admit that I cannot
fully comprehend the concurrency situation in skmsg and psock.
The change makes sense to me after reading the description though.
Acked-by: Martin KaFai Lau
On Thu, Jun 25, 2020 at 04:13:38PM -0700, John Fastabend wrote:
> Add a test to check strparser merging skbs is working.
Acked-by: Martin KaFai Lau
info to the bpf program to make decision.
Patch 4 is the main patch and has more details on the API and design.
The set ends with an example which sends the max delay ack in
the BPF TCP header option and the receiving side can
then adjust its RTO accordingly.
Martin KaFai Lau (10):
tcp: Use a
tter patch can
then also gets the offset to the TCP bpf header option by
"network header len + bpf_hdr_opt_off".
Signed-off-by: Martin KaFai Lau
---
include/linux/tcp.h| 11 ++-
include/net/request_sock.h | 7 ++-
net/core/filter.c | 4 ++--
net/ipv4/tc
A latter patch needs to add a few pointers and a few u8 to
sock_ops_kern. Hence, this patch saves some spaces by moving
some of the existing members from u32 to u8 so that the latter
patch can still fit everything in a cacheline.
Signed-off-by: Martin KaFai Lau
---
include/linux/filter.h | 4
This patch adds a fastopen_connect() helper which will
be used in a latter test.
Signed-off-by: Martin KaFai Lau
---
tools/testing/selftests/bpf/network_helpers.c | 37 +++
tools/testing/selftests/bpf/network_helpers.h | 2 +
2 files changed, 39 insertions(+)
diff --git a
it
after every test. Since the restore "setns()" is not expensive, it does it
on all tests without tracking if a test has created a new netns or not.
Signed-off-by: Martin KaFai Lau
---
tools/testing/selftests/bpf/test_progs.c | 21 +
tools/testing/selftests/bpf/te
then use
this max delay ack and set a potentially lower rto by using
bpf_setsockopt(TCP_BPF_RTO_MIN). A latter patch will use it
like this in a test as an example.
Signed-off-by: Martin KaFai Lau
---
include/net/inet_connection_sock.h | 2 ++
include/net/tcp.h | 2 +-
include
is set, the
bpf prog will be called in the "BPF_SOCK_OPS_PARSE_HDR_OPT_CB" op.
The received skb will be available through sock_ops->skb_data
and the bpf header option offset will also be specified
in sock_ops->skb_bpf_hdr_opt_off.
[1]: draft-wang-tcpm-low-latency-opt-00
http
lookup.c.
Make changes to do it more consistently in save_errno_close()
and log_err().
Signed-off-by: Martin KaFai Lau
---
tools/testing/selftests/bpf/network_helpers.c | 157 +++---
tools/testing/selftests/bpf/network_helpers.h | 9 +-
.../bpf/prog_tests/cgroup_skb_sk_lookup.
This patch tests a bpf prog that parses/writes a max_delack_ms bpf header
option and also bpf_setsockopt its TCP_BPF_DELACK_MAX/TCP_BPF_RTO_MIN
accordingly.
Signed-off-by: Martin KaFai Lau
---
.../bpf/prog_tests/tcp_hdr_options.c | 6 ++--
.../bpf/progs/test_tcp_hdr_options.c
n a latter test.
Signed-off-by: Martin KaFai Lau
---
.../bpf/prog_tests/tcp_hdr_options.c | 520 ++
.../bpf/progs/test_tcp_hdr_options.c | 674 ++
.../selftests/bpf/test_tcp_hdr_options.h | 34 +
3 files changed, 1228 insertions(+)
create mo
stores the offset to the
bpf experimental option and will be made available to BPF prog
in a latter patch. This offset is also stored in the saved_syn.
Signed-off-by: Martin KaFai Lau
---
include/net/request_sock.h | 1 +
include/net/tcp.h | 3 +++
net/ipv4/tcp_input.c | 6 ++
net
t support
> necessary features, while falling back to reduced/less performant
> functionality, if kernel is outdated.
Acked-by: Martin KaFai Lau
On Fri, Jun 26, 2020 at 03:45:04PM -0700, Andrii Nakryiko wrote:
> On Fri, Jun 26, 2020 at 10:56 AM Martin KaFai Lau wrote:
> >
> > It is common for networking tests creating its netns and making its own
> > setting under this new netns (e.g. changing tcp sysctl). If t
On Sat, Jun 27, 2020 at 10:17:26AM -0700, Eric Dumazet wrote:
> On Fri, Jun 26, 2020 at 10:55 AM Martin KaFai Lau wrote:
> >
> > This patch adds logic to parse experimental kind 254 with 16 bit magic
> > 0xeB9F. The latter patch will allow bpf prog to write and pars
On Sun, Jun 28, 2020 at 11:24:27AM -0700, Alexei Starovoitov wrote:
> On Fri, Jun 26, 2020 at 10:55:26AM -0700, Martin KaFai Lau wrote:
> >
> > Parsing BPF Header Option
> > ─
> >
> > As mentioned earlier, the received SYN/SYNACK/ACK duri
On Sat, Jun 27, 2020 at 10:17:26AM -0700, Eric Dumazet wrote:
[ ... ]
> It seems strange that we want to add code in TCP stack only to cover a
> limited use case (kind 254 and 0xEB9F magic)
>
> For something like the work Petar Penkov did (to be able to generate
> SYNCOOKIES from XDP), we do not
On Sat, Jun 27, 2020 at 01:31:42PM -0700, Andrii Nakryiko wrote:
> On Fri, Jun 26, 2020 at 5:23 PM Martin KaFai Lau wrote:
> >
> > On Fri, Jun 26, 2020 at 03:45:04PM -0700, Andrii Nakryiko wrote:
> > > On Fri, Jun 26, 2020 at 10:56 AM Martin KaFai Lau wrote:
> >
On Mon, Jun 29, 2020 at 11:13:07AM -0700, Andrii Nakryiko wrote:
> On Mon, Jun 29, 2020 at 11:00 AM Martin KaFai Lau wrote:
> >
> > On Sat, Jun 27, 2020 at 01:31:42PM -0700, Andrii Nakryiko wrote:
> > > On Fri, Jun 26, 2020 at 5:23 PM Martin KaFai Lau wrote:
> > &g
On Wed, May 06, 2020 at 03:53:35PM +0200, Jakub Sitnicki wrote:
> On Wed, May 06, 2020 at 03:16 PM CEST, Lorenz Bauer wrote:
> > On Wed, 6 May 2020 at 13:55, Jakub Sitnicki wrote:
>
> [...]
>
> >> @@ -4012,4 +4051,18 @@ struct bpf_pidns_info {
> >> __u32 pid;
> >> __u32 tgid;
> >
On Wed, May 06, 2020 at 02:54:58PM +0200, Jakub Sitnicki wrote:
> Add a new program type BPF_PROG_TYPE_SK_LOOKUP and a dedicated attach type
> called BPF_SK_LOOKUP. The new program kind is to be invoked by the
> transport layer when looking up a socket for a received packet.
>
> When called, SK_LO
On Thu, May 07, 2020 at 12:12:13PM -0700, Stanislav Fomichev wrote:
> 1. Move pkt_v4 and pkt_v6 into network_helpers and adjust the users.
> 2. Copy-paste spin_lock_thread into two tests that use it.
>
> Cc: Martin KaFai Lau
> Signed-off-by: Stanislav Fomichev
Acked-by: Martin KaFai Lau
tified by fd
>
> These will be used in the next commit.
>
> Also, extend these helpers to support AF_INET6 and accept the family
> as an argument.
>
> v4:
> * export extra helper to start server without a thread (Martin KaFai Lau)
> * tcp_rtt is no longer starting backg
On Fri, May 08, 2020 at 12:45:14PM +0200, Jakub Sitnicki wrote:
> On Fri, May 08, 2020 at 09:06 AM CEST, Martin KaFai Lau wrote:
> > On Wed, May 06, 2020 at 02:54:58PM +0200, Jakub Sitnicki wrote:
> >> Add a new program type BPF_PROG_TYPE_SK_LOOKUP and a dedicated attac
On Mon, May 11, 2020 at 11:08:15AM +0200, Jakub Sitnicki wrote:
> On Fri, May 08, 2020 at 08:39 PM CEST, Martin KaFai Lau wrote:
> > On Fri, May 08, 2020 at 12:45:14PM +0200, Jakub Sitnicki wrote:
> >> On Fri, May 08, 2020 at 09:06 AM CEST, Martin KaFai Lau wrote:
> >> &
On Mon, May 11, 2020 at 08:52:01PM +0200, Jakub Sitnicki wrote:
[ ... ]
> Performance considerations
> ==
>
> Patch set adds new code on receive hot path. This comes with a cost,
> especially in a scenario of a SYN flood or small UDP packet flood.
>
> Measuring the perfo
On Mon, May 11, 2020 at 09:26:02PM +0200, Jakub Sitnicki wrote:
> On Mon, May 11, 2020 at 08:59 PM CEST, Martin KaFai Lau wrote:
> > On Mon, May 11, 2020 at 11:08:15AM +0200, Jakub Sitnicki wrote:
> >> On Fri, May 08, 2020 at 08:39 PM CEST, Martin KaFai Lau wrote:
> >> &
On Tue, May 12, 2020 at 01:57:45PM +0200, Jakub Sitnicki wrote:
> On Mon, May 11, 2020 at 09:45 PM CEST, Martin KaFai Lau wrote:
> > On Mon, May 11, 2020 at 08:52:01PM +0200, Jakub Sitnicki wrote:
> >
> > [ ... ]
> >
> >> Performance considerations
> >&g
On Mon, May 11, 2020 at 08:52:03PM +0200, Jakub Sitnicki wrote:
[ ... ]
> +BPF_CALL_3(bpf_sk_lookup_assign, struct bpf_sk_lookup_kern *, ctx,
> +struct sock *, sk, u64, flags)
The SK_LOOKUP bpf_prog may have already selected the proper reuseport sk.
It is possible by looking up sk from so
On Wed, May 13, 2020 at 04:34:13PM +0200, Jakub Sitnicki wrote:
> On Wed, May 13, 2020 at 07:41 AM CEST, Martin KaFai Lau wrote:
> > On Mon, May 11, 2020 at 08:52:03PM +0200, Jakub Sitnicki wrote:
> >
> > [ ... ]
> >
> >> +BPF_CALL_3(bpf_sk_lookup_assi
ger value and do not need ns_capable()),
do_tcp_setsockopt() and sock_setsockopt() can be directly called with
some refactoring.
The change looks good. For this patch,
Acked-by: Martin KaFai Lau
On Tue, May 26, 2020 at 10:54:26AM -0700, Andrii Nakryiko wrote:
> On Fri, May 22, 2020 at 6:01 PM Martin KaFai Lau wrote:
> >
> > On Sat, May 23, 2020 at 12:22:48AM +0200, Daniel Borkmann wrote:
> > > On 5/22/20 4:23 AM, Martin KaFai Lau wrote:
> > > [...]
> &
match_sk1_wildcard" and "bool match_sk2_wildcard".
This change only affects the sk_reuseport_match() which is only
used by inet_csk (e.g. TCP).
The other use cases are calling inet_rcv_saddr_equal() and
this patch makes it pass the same "match_wildcard" arg twice to
the "ip
l be less error prone to decide its capability at the same place
as the new map type is added in bpf_types.h. That will help to avoid
mistake like missing modification in other source files like
the map_in_map.c here.
Cc: Andrey Ignatov
Signed-off-by: Martin KaFai Lau
---
include/linux/b
This series allows the outer map to be updated with inner map in different
size as long as it is safe (meaning the max_entries is not used in the
verification time during prog load).
Please see individual patch for details.
Martin KaFai Lau (3):
bpf: Clean up inner map type check
bpf: Relax
xskmap are used statically
in verification time to generate the inline code, so they
are excluded in this patch.
Cc: Andrey Ignatov
Signed-off-by: Martin KaFai Lau
---
include/linux/bpf.h | 12
include/linux/bpf_types.h | 6 --
kernel/bpf/map_in_map.c | 3 ++-
3 files
This patch tests the inner map size can be different
for reuseport_sockarray but has to be the same for
arraymap.
Cc: Andrey Ignatov
Signed-off-by: Martin KaFai Lau
---
.../selftests/bpf/prog_tests/btf_map_in_map.c | 12 +++
.../selftests/bpf/progs/test_btf_map_in_map.c | 31
On Thu, May 21, 2020 at 03:39:10PM -0700, Andrii Nakryiko wrote:
> On Thu, May 21, 2020 at 12:18 PM Martin KaFai Lau wrote:
> >
> > This series allows the outer map to be updated with inner map in different
> > size as long as it is safe (meaning the max_entri
On Thu, May 21, 2020 at 04:16:18PM -0700, Alexei Starovoitov wrote:
> On Thu, May 21, 2020 at 04:10:36PM -0700, Andrii Nakryiko wrote:
> > > > 4. Then for size check change, again, it's really much simpler and
> > > > cleaner just to have a special case in check in bpf_map_meta_equal for
> > > > ca
one when a map's properties is decided at the same
place as the new map type is added in bpf_types.h. That will help to
avoid mistake like missing modification in other source files like
the map_in_map.c here or other source files in the future.
Cc: Andrey Ignatov
Signed-off-by: Martin KaFai Lau
with a smaller inner map first and then replaces
it with a larger inner map later when it is needed.
The max_entries of arraymap and xskmap are used statically
in verification time to generate the inline code, so they
are excluded in this patch.
Cc: Andrey Ignatov
Signed-off-by: Martin KaFai Lau
time during prog load).
Please see individual patch for details.
v2:
- New BPF_MAP_TYPE_FL to minimize code churns (Alexei)
- s/capabilities/properties/ (Andrii)
- Describe WHY in commit log (Andrii)
Martin KaFai Lau (3):
bpf: Consolidate inner-map-compatible properties into bpf_types.h
bpf
This patch tests the inner map size can be different
for reuseport_sockarray but has to be the same for
arraymap.
Cc: Andrey Ignatov
Signed-off-by: Martin KaFai Lau
---
.../selftests/bpf/prog_tests/btf_map_in_map.c | 12 +++
.../selftests/bpf/progs/test_btf_map_in_map.c | 31
On Sat, May 23, 2020 at 12:22:48AM +0200, Daniel Borkmann wrote:
> On 5/22/20 4:23 AM, Martin KaFai Lau wrote:
> [...]
> > };
> > +/* Cannot be used as an inner map */
> > +#define BPF_MAP_NO_INNER_MAP (1 << 0)
> > +
> > struct bpf_map {
> >
On Tue, Apr 28, 2020 at 11:57:19AM -0700, Stanislav Fomichev wrote:
> Currently, bpf_getsocktop and bpf_setsockopt helpers operate on the
> 'struct bpf_sock_ops' context in BPF_PROG_TYPE_CGROUP_SOCKOPT program.
> Let's generalize them and make the first argument be 'struct bpf_sock'.
> That way, in
On Wed, Apr 29, 2020 at 11:16:35AM -0700, Andrii Nakryiko wrote:
> On Wed, Apr 29, 2020 at 12:07 AM Yonghong Song wrote:
> >
> >
> >
> > On 4/28/20 11:56 PM, Andrii Nakryiko wrote:
> > > On Mon, Apr 27, 2020 at 1:19 PM Yonghong Song wrote:
> > >>
> > >> A new bpf command BPF_ITER_CREATE is added.
On Wed, Apr 29, 2020 at 12:20:05PM -0700, Yonghong Song wrote:
>
>
> On 4/29/20 11:46 AM, Martin KaFai Lau wrote:
> > On Wed, Apr 29, 2020 at 11:16:35AM -0700, Andrii Nakryiko wrote:
> > > On Wed, Apr 29, 2020 at 12:07 AM Yonghong Song wrote:
> > > >
> &
> v3:
> * Expose custom helpers for bpf_sock_addr context instead of doing
> generic bpf_sock argument (as suggested by Daniel). Even with
> try_socket_lock that doesn't sleep we have a problem where context sk
> is already locked and socket lock is non-nestable.
Acked-by: Martin KaFai Lau
On Thu, Apr 30, 2020 at 12:46:08PM -0700, Andrii Nakryiko wrote:
> If bpf_link_prime() succeeds to allocate new anon file, but then fails to
> allocate ID for it, link priming is considered to be failed and user is
> supposed ot be able to directly kfree() bpf_link, because it was never exposed
> t
On Thu, Apr 30, 2020 at 11:32:59PM -0700, Andrii Nakryiko wrote:
> On Thu, Apr 30, 2020 at 11:25 PM Martin KaFai Lau wrote:
> >
> > On Thu, Apr 30, 2020 at 12:46:08PM -0700, Andrii Nakryiko wrote:
> > > If bpf_link_prime() succeeds to allocate new anon file, but then fa
file. Adding ID to
> link_idr is ok, because link at that point still doesn't have its ID set, so
> no user-space process can create a new FD for it.
Acked-by: Martin KaFai Lau
On Fri, May 01, 2020 at 03:43:20PM -0700, Stanislav Fomichev wrote:
> Andrey pointed out that we can use reno instead of dctcp for CC
> tests and drop CONFIG_TCP_CONG_DCTCP=y requirement.
Acked-by: Martin KaFai Lau
27;bpf_stats_handler'
> [-Werror,-Wunused-function]
> static int bpf_stats_handler(struct ctl_table *table, int write,
>
> Fix the check to match the reference.
>
> Fixes: d46edd671a14 ("bpf: Sharing bpf runtime stats with BPF_ENABLE_STATS")
> Signed-off-by: Arnd Bergmann
Acked-by: Martin KaFai Lau
On Mon, May 04, 2020 at 10:34:29AM -0700, Stanislav Fomichev wrote:
> The intent is to add an additional bind parameter in the next commit.
> Instead of adding another argument, let's convert all existing
> flag arguments into an extendable bit field.
>
> No functional changes.
>
> Cc: Andrey Ign
this.
>
> Fixes: 7246d8ed4dcce ("bpf: helper to pop data from messages")
> Signed-off-by: John Fastabend
Acked-by: Martin KaFai Lau
_elem+0xdd/0x120
> [ 173.700060] kasan_report+0x32/0x50
> [ 173.700070] sk_msg_free_elem+0xdd/0x120
> [ 173.700080] __sk_msg_free+0x87/0x150
> [ 173.700094] tcp_bpf_send_verdict+0x179/0x4f0
> [ 173.700109] tcp_bpf_sendpage+0x3ce/0x5d0
>
> Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface")
> Signed-off-by: John Fastabend
Acked-by: Martin KaFai Lau
On Tue, May 05, 2020 at 01:27:29PM -0700, Stanislav Fomichev wrote:
> We want to have a tighter control on what ports we bind to in
> the BPF_CGROUP_INET{4,6}_CONNECT hooks even if it means
> connect() becomes slightly more expensive. The expensive part
> comes from the fact that we now need to cal
On Tue, May 05, 2020 at 01:27:26PM -0700, Stanislav Fomichev wrote:
> Move the following routines that let us start a background listener
> thread and connect to a server by fd to the test_prog:
> * start_server_thread - start background INADDR_ANY thread
> * stop_server_thread - stop the thread
>
On Wed, May 06, 2020 at 09:28:02AM -0700, s...@google.com wrote:
> On 05/06, Martin KaFai Lau wrote:
> > On Tue, May 05, 2020 at 01:27:26PM -0700, Stanislav Fomichev wrote:
> > > Move the following routines that let us start a background listener
> > > thread and conne
On Wed, May 06, 2020 at 09:22:45AM -0700, s...@google.com wrote:
> On 05/05, Martin KaFai Lau wrote:
> > On Tue, May 05, 2020 at 01:27:29PM -0700, Stanislav Fomichev wrote:
> > > We want to have a tighter control on what ports we bind to in
> > > the BPF_CGROUP_INET{4,
On Wed, May 06, 2020 at 10:03:52PM +0800, Jason Yan wrote:
> The '==' expression itself is bool, no need to convert it to bool again.
> This fixes the following coccicheck warning:
Make sense.
It may belong to bpf-next instead.
Acked-by: Martin KaFai Lau
p the thread
> * connect_to_fd - connect to the server identified by fd
>
> These will be used in the next commit.
>
> Also, extend these helpers to support AF_INET6 and accept the family
> as an argument.
>
> v3:
> * export extra helper to start server without a thr
On Wed, May 06, 2020 at 03:32:08PM -0700, Stanislav Fomichev wrote:
> 1. Move pkt_v4 and pkt_v6 into network_helpers and adjust the users.
> 2. Copy-paste spin_lock_thread into two tests that use it.
Instead of copying it into two tests,
can spin_lock_thread be moved to network-helpers.c?
ges.
>
> Cc: Andrey Ignatov
> Cc: Martin KaFai Lau
> Signed-off-by: Stanislav Fomichev
Acked-by: Martin KaFai Lau
nd flag
> to indicate that the call site is BPF program.
>
> v3:
> * More bpf_bind documentation refinements (Martin KaFai Lau)
> * Add UDP tests as well (Martin KaFai Lau)
> * Don't start the thread, just do socket+bind+listen (Martin KaFai Lau)
>
> v2:
> * Update d
ing the ipc.sockc.mark to
fl4.flowi4_mark.
Fixes: c6af0c227a22 ("ip: support SO_MARK cmsg")
Cc: Willem de Bruijn
Signed-off-by: Martin KaFai Lau
---
net/ipv4/ip_output.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 090d3097ee15..03
701 - 800 of 1277 matches
Mail list logo