On 11/28/18 6:22 PM, Pablo Neira Ayuso wrote:
> Hi,
>
> This patchset is another iteration to introduce an in-kernel intermediate
> representation (IR) to express ACL hardware offloads [1] [2] [3].
>
Hi,
Also wanted to add. In an earlier thread it was mentioned this could be
used for other
Add the necessary header definitions to tools for new
msg_pop_data_helper.
Signed-off-by: John Fastabend
---
tools/include/uapi/linux/bpf.h| 16 +++-
tools/testing/selftests/bpf/bpf_helpers.h | 2 ++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/tools
Similar to msg_pull_data and msg_push_data add a set of options to
have msg_pop_data() exercised.
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/test_sockmap.c | 127 +++-
tools/testing/selftests/bpf/test_sockmap_kern.h | 70 ++---
2 files
This adds a BPF SK_MSG program helper so that we can pop data from a
msg. We use this to pop metadata from a previous push data call.
Signed-off-by: John Fastabend
---
include/uapi/linux/bpf.h | 16 -
net/core/filter.c| 171 +++
net/ipv4
delta calculations for DROP with pop'd data (albeit a strange set
of operations for a program to be doing) had potential to be
incorrect possibly confusing user space applications, so fix it.
John Fastabend (3):
bpf: helper to pop data from messages
bpf: add msg_pop_data helper to t
On 11/25/18 5:05 PM, Daniel Borkmann wrote:
> On 11/23/2018 02:38 AM, John Fastabend wrote:
>> This adds a BPF SK_MSG program helper so that we can pop data from a
>> msg. We use this to pop metadata from a previous push data call.
>>
>> Signed-off-by: John Fastabend
&g
On 11/26/18 3:16 AM, Quentin Monnet wrote:
> 2018-11-26 02:05 UTC+0100 ~ Daniel Borkmann
>> On 11/23/2018 02:38 AM, John Fastabend wrote:
>>> This adds a BPF SK_MSG program helper so that we can pop data from a
>>> msg. We use this to pop metadata from a previous pus
ib
support.
Thanks!
John Fastabend (3):
bpf: helper to pop data from messages
bpf: add msg_pop_data helper to tools
bpf: test_sockmap, add options for msg_pop_data() helper usage
include/uapi/linux/bpf.h| 13 +-
net/core/filter.c
Add the necessary header definitions to tools for new
msg_pop_data_helper.
Signed-off-by: John Fastabend
---
tools/include/uapi/linux/bpf.h| 13 -
tools/testing/selftests/bpf/bpf_helpers.h | 2 ++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/tools
This adds a BPF SK_MSG program helper so that we can pop data from a
msg. We use this to pop metadata from a previous push data call.
Signed-off-by: John Fastabend
---
include/uapi/linux/bpf.h | 13 +++-
net/core/filter.c| 169 +++
net/ipv4
Similar to msg_pull_data and msg_push_data add a set of options to
have msg_pop_data() exercised.
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/test_sockmap.c | 127 +++-
tools/testing/selftests/bpf/test_sockmap_kern.h | 70 ++---
2 files
));
> + printf("failed to create map %d (%s): %d %s\n",
> +i, maps[i].name, errno, strerror(errno));
> return 1;
> }
> maps[i].fd = map_fd[i];
>
LGTM
Acked-by: John Fastabend
use a bitpattern of CPUs rather than a CPU id
> to allow multiple CPUs per vlan.
Great, so does this solve your use case then? At least on drivers
with XDP support?
>
> Signed-off-by: Shannon Nelson
> ---
Some really small and trivial nits below.
Acked-by: Jo
On 10/29/2018 12:31 PM, John Fastabend wrote:
> We return 0 in the case of a nonblocking socket that has no data
> available. However, this is incorrect and may confuse applications.
> After this patch we do the correct thing and return the error
> EAGAIN.
>
> Quoting return
nonblocking and the receive operation would
block, or a receive timeout had been set and the timeout expired
before data was received.
Signed-off-by: John Fastabend
---
net/ipv4/tcp_bpf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv4/tcp_bpf.c b/net/ipv4/tcp_bpf.c
index b7918d4
Add support for new bpf_msg_push_data in libbpf.
Signed-off-by: John Fastabend
---
tools/include/uapi/linux/bpf.h| 20 +++-
tools/testing/selftests/bpf/bpf_helpers.h | 2 ++
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/tools/include/uapi/linux
updates test_sockmap to run msg_push_data tests.
v2: rebase after queue map and in filter.c convert int -> u32
John Fastabend (3):
bpf: sk_msg program helper bpf_msg_push_data
bpf: libbpf support for msg_push_data
bpf: test_sockmap add options to use msg_push_data
include/linux/skms
.
However, a copy will be required if the ring is full and its possible
for the helper to fail with ENOMEM or EINVAL errors which need to be
handled by the BPF program.
This can be used similar to XDP metadata to pass data between sk_msg
layer and lower layers.
Signed-off-by: John Fastabend
---
include
. This is analagous to the options that are
used to pull data, --txmsg_start and --txmsg_end.
In addition to adding the options tests are added to the test
suit to run the tests similar to what was done for msg_pull_data.
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/test_sockmap.c | 58
On 10/19/2018 03:57 PM, Daniel Borkmann wrote:
> On 10/20/2018 12:51 AM, Daniel Borkmann wrote:
>> On 10/18/2018 10:58 PM, John Fastabend wrote:
>>> We check if the sk_user_data (the psock in skmsg) is in fact a sockmap
>>> type to late, after we read the refcnt which i
updates test_sockmap to run msg_push_data tests.
---
John Fastabend (3):
bpf: sk_msg program helper bpf_msg_push_data
bpf: libbpf support for msg_push_data
bpf: test_sockmap add options to use msg_push_data
include/linux/skmsg.h |5 +
include/uapi
.
However, a copy will be required if the ring is full and its possible
for the helper to fail with ENOMEM or EINVAL errors which need to be
handled by the BPF program.
This can be used similar to XDP metadata to pass data between sk_msg
layer and lower layers.
Signed-off-by: John Fastabend
---
include
Add support for new bpf_msg_push_data in libbpf.
Signed-off-by: John Fastabend
---
tools/include/uapi/linux/bpf.h| 20 +++-
tools/testing/selftests/bpf/bpf_helpers.h |2 ++
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/tools/include/uapi/linux
. This is analagous to the options that are
used to pull data, --txmsg_start and --txmsg_end.
In addition to adding the options tests are added to the test
suit to run the tests similar to what was done for msg_pull_data.
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/test_sockmap.c | 58
. And because I consistently
run this with the ifname before realizing its the ifindex not
string name I'll Ack it.
Acked-by: John Fastabend
John Fastabend (2):
bpf: skmsg, fix psock create on existing kcm/tls port
bpf: test_maps add a test to catch kcm + sockmap
include/linux/skmsg.h | 25 +---
net/core/sock_map.c | 11 +++---
tools/testing/selftests/bpf/Makefile | 2 +-
tools
]
sock_map_link.isra.6+0x41f/0xe30 net/core/sock_map.c:178
sock_hash_update_common+0x19b/0x11e0 net/core/sock_map.c:669
sock_hash_update_elem+0x306/0x470 net/core/sock_map.c:738
map_update_elem+0x819/0xdf0 kernel/bpf/syscall.c:818
Signed-off-by: John Fastabend
Reported-by: Eric Dumazet
Fixes
Adding a socket to both sockmap and kcm is not supported due to
collision on sk_user_data usage.
If selftests is run without KCM support we will issue a warning
and continue with the tests.
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/Makefile | 2 +-
tools/testing
On 10/18/2018 10:34 AM, Eric Dumazet wrote:
>
>
> On 10/17/2018 10:20 PM, John Fastabend wrote:
>> Before using the psock returned by sk_psock_get() when adding it to a
>> sockmap we need to ensure it is actually a sockmap based psock.
>> Previously we were only check
]
sock_map_link.isra.6+0x41f/0xe30 net/core/sock_map.c:178
sock_hash_update_common+0x19b/0x11e0 net/core/sock_map.c:669
sock_hash_update_elem+0x306/0x470 net/core/sock_map.c:738
map_update_elem+0x819/0xdf0 kernel/bpf/syscall.c:818
Signed-off-by: John Fastabend
Reported-by: Eric Dumazet
Fixes
also found an issue with KCM and kTLS
where each uses sk_data_ready hooks and associated stream parser
breaking expectations in kcm, ktls or both. But that fix will need
to go to net.
Thanks to Eric for reporting.
v2: Fix up file +/- my scripts lost track of them
John Fastabend (2):
bpf: skmsg
Adding a socket to both sockmap and kcm is not supported due to
collision on sk_user_data usage.
If selftests is run without KCM support we will issue a warning
and continue with the tests.
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/Makefile | 2 +-
tools/testing
also found an issue with KCM and kTLS
where each uses sk_data_ready hooks and associated stream parser
breaking expectations in kcm, ktls or both. But that fix will need
to go to net.
Thanks to Eric for reporting.
---
John Fastabend (2):
bpf: skmsg, fix psock create on existing kcm/tls port
Adding a socket to both sockmap and kcm is not supported due to
collision on sk_user_data usage.
If selftests is run without KCM support we will issue a warning
and continue with the tests.
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/Makefile |2 -
tools/testing
]
sock_map_link.isra.6+0x41f/0xe30 net/core/sock_map.c:178
sock_hash_update_common+0x19b/0x11e0 net/core/sock_map.c:669
sock_hash_update_elem+0x306/0x470 net/core/sock_map.c:738
map_update_elem+0x819/0xdf0 kernel/bpf/syscall.c:818
Signed-off-by: John Fastabend
Reported-by: Eric Dumazet
Fixes
This adds support for the MSG_PEEK flag when doing redirect to ingress
and receiving on the sk_msg psock queue. Previously the flag was
being ignored which could confuse applications if they expected the
flag to work as normal.
Signed-off-by: John Fastabend
---
include/net/tcp.h |2 +-
net
the helper always reports an empty ring. To fix this
add a test for the full ring case to avoid reporting a full ring
has 0 elements. This additional functionality will be used in the
next patches from recvmsg context where end = head with a full ring
is a valid case.
Signed-off-by: John Fastabend
Add tests that do a MSG_PEEK recv followed by a regular receive to
test flag support.
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/test_sockmap.c | 167 +++-
1 file changed, 115 insertions(+), 52 deletions(-)
diff --git a/tools/testing/selftests/bpf
MSG_PEEK call all tests continue to PASS.
---
John Fastabend (3):
bpf: skmsg, improve sk_msg_used_element to work in cork context
bpf: sockmap, support for msg_peek in sk_msg with redirect ingress
bpf: sockmap, add msg_peek tests to test_sockmap
include/linux/skmsg.h
' will be decremented
with sk_mem_uncharge().
Signed-off-by: John Fastabend
---
include/linux/skmsg.h |1 +
net/ipv4/tcp_bpf.c|1 +
2 files changed, 2 insertions(+)
diff --git a/include/linux/skmsg.h b/include/linux/skmsg.h
index 0b919f0..31df0d9 100644
--- a/include/linux/skmsg.h
+++ b
field now but I kept the original API around also in case
users of the API don't want to expose this. The flags field is an
int in case we need more control over how the API call handles
errors/features/etc in the future.
Signed-off-by: John Fastabend
---
tools/bpf/bpftool/Documentation
programs to maps and then detach them.
Signed-off-by: John Fastabend
Reviewed-by: Jakub Kicinski
---
tools/bpf/bpftool/Documentation/bpftool-prog.rst | 11 ++
tools/bpf/bpftool/Documentation/bpftool.rst |2
tools/bpf/bpftool/bash-completion/bpftool| 19
tools/bpf/bpftool
. This allows using bpftool with maps that have a extra
fields that the user knows can be ignored. This is needed to work
correctly with maps being loaded by other tools or directly via
syscalls.
v3: add bash completion and doc updates for --mapcompat
---
John Fastabend (2):
bpf: bpftool
field now but I kept the original API around also in case
users of the API don't want to expose this. The flags field is an
int in case we need more control over how the API call handles
errors/features/etc in the future.
Signed-off-by: John Fastabend
---
tools/bpf/bpftool/main.c |7
programs to maps and then detach them.
Signed-off-by: John Fastabend
---
tools/bpf/bpftool/Documentation/bpftool-prog.rst | 11 ++
tools/bpf/bpftool/Documentation/bpftool.rst |2
tools/bpf/bpftool/bash-completion/bpftool| 19
tools/bpf/bpftool/prog.c
. This allows using bpftool with maps that have a extra
fields that the user knows can be ignored. This is needed to work
correctly with maps being loaded by other tools or directly via
syscalls.
---
John Fastabend (2):
bpf: bpftool, add support for attaching programs to maps
bpf
here the record is being encrypted after BPF has run and came to
>> a verdict. In order to get there, first step is to transform open
>> coding of scatter-gather list handling into a common core framework
>> that subsystems use.
>>
>> Joint work with John.
>>
>
On 10/10/2018 10:11 AM, Jakub Kicinski wrote:
> On Wed, 10 Oct 2018 09:44:26 -0700, John Fastabend wrote:
>> Sock map/hash introduce support for attaching programs to maps. To
>> date I have been doing this with custom tooling but this is less than
>> ideal as we s
On 10/10/2018 10:14 AM, Eric Dumazet wrote:
>
>
> On 10/10/2018 09:18 AM, Shannon Nelson wrote:
>> On 10/9/2018 7:17 PM, Eric Dumazet wrote:
>>>
>>>
>>> On 10/09/2018 07:11 PM, Shannon Nelson wrote:
Hence the reason we sent this as an RFC a couple of weeks ago. We got no
programs to maps and then detach them.
Signed-off-by: John Fastabend
---
tools/bpf/bpftool/main.h |1 +
tools/bpf/bpftool/prog.c | 92 ++
2 files changed, 92 insertions(+), 1 deletion(-)
diff --git a/tools/bpf/bpftool/main.h b/tools/bpf/bpftool
about sockets always being ESTABLISHED state.
To resolve this rely on the unhash hook, which is called in the
disconnect case, to remove the sock from the sockmap.
Reported-by: Eric Dumazet
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John
are BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB and
BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB.
Similar to TLS ULP this ensures sk_user_data is correct.
Reported-by: Eric Dumazet
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John Fastabend
Acked-by: Yonghong Song
---
Ensure that sockets added to a sock{map|hash} that is not in the
ESTABLISHED state is rejected.
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John Fastabend
Acked-by: Yonghong Song
---
tools/testing/selftests/bpf/test_maps.c | 10 +++
Yonghong I carried your ACKs forward.
---
John Fastabend (3):
bpf: sockmap only allow ESTABLISHED sock state
bpf: sockmap, fix transition through disconnect without close
bpf: test_maps, only support ESTABLISHED socks
kernel/bpf/sockmap.c| 91
On 09/17/2018 02:09 PM, Y Song wrote:
> On Mon, Sep 17, 2018 at 10:32 AM John Fastabend
> wrote:
>>
>> It is possible (via shutdown()) for TCP socks to go trough TCP_CLOSE
>> state via tcp_disconnect() without actually calling tcp_close which
>> would then cal
On 09/17/2018 02:21 PM, Y Song wrote:
> On Mon, Sep 17, 2018 at 10:33 AM John Fastabend
> wrote:
>>
>> Ensure that sockets added to a sock{map|hash} that is not in the
>> ESTABLISHED state is rejected.
>>
>> Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock clo
are BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB and
BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB.
Similar to TLS ULP this ensures sk_user_data is correct.
Reported-by: Eric Dumazet
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John Fastabend
Acked-by: Yonghong Song
--
Ensure that sockets added to a sock{map|hash} that is not in the
ESTABLISHED state is rejected.
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/test_maps.c | 10 +++---
1 file changed, 7
about sockets always being ESTABLISHED state.
To resolve this rely on the unhash hook, which is called in the
disconnect case, to remove the sock from the sockmap.
Reported-by: Eric Dumazet
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John
for ESTABLISH state in hash update sockmap as well
v3: Do not release lock from unhash in error path, no lock was
used in the first place. And drop not so useful code comments
Thanks for reviewing Yonghong I carried your ACK forward
on patch 1/3.
Thanks,
John
---
John Fastabend (3):
bpf
On 09/17/2018 10:59 AM, John Fastabend wrote:
> It is possible (via shutdown()) for TCP socks to go trough TCP_CLOSE
> state via tcp_disconnect() without actually calling tcp_close which
> would then call our bpf_tcp_close() callback. Because of this a user
> could disconnect a soc
Ensure that sockets added to a sock{map|hash} that is not in the
ESTABLISHED state is rejected.
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/test_maps.c | 10 +++---
1 file changed, 7
are BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB and
BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB.
Similar to TLS ULP this ensures sk_user_data is correct.
Reported-by: Eric Dumazet
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John Fastabend
---
kernel/bpf/sockma
about sockets always being ESTABLISHED state.
To resolve this rely on the unhash hook, which is called in the
disconnect case, to remove the sock from the sockmap.
Reported-by: Eric Dumazet
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John
for ESTABLISH state in hash update sockmap as well.
Thanks,
John
---
John Fastabend (3):
bpf: sockmap only allow ESTABLISHED sock state
bpf: sockmap, fix transition through disconnect without close
bpf: test_maps, only support ESTABLISHED socks
kernel/bpf/sockmap.c
Ensure that sockets added to a sock{map|hash} that is not in the
ESTABLISHED state is rejected.
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/test_maps.c | 10 +++---
1 file changed, 7
about sockets always being ESTABLISHED state.
To resolve this rely on the unhash hook, which is called in the
disconnect case, to remove the sock from the sockmap.
Reported-by: Eric Dumazet
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John
---
John Fastabend (3):
bpf: sockmap only allow ESTABLISHED sock state
bpf: sockmap, fix transition through disconnect without close
bpf: test_maps, only support ESTABLISHED socks
kernel/bpf/sockmap.c| 92 ---
tools/testing
are BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB and
BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB.
Similar to TLS ULP this ensures sk_user_data is correct.
Reported-by: Eric Dumazet
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John Fastabend
---
kernel/bpf/sockma
oth the setup (in tls_do_decryption)
and when we clear it from the crypto callback handler
tls_decrypt_done(). After this selftests pass again and fixes KASAN
errors/warnings.
Fixes: 94524d8fc965 ("net/tls: Add support for async decryption of tls records")
Signed-off-by: John Fastabend
---
incl
On 08/29/2018 02:56 AM, Vakul Garg wrote:
> When tls records are decrypted using asynchronous acclerators such as
> NXP CAAM engine, the crypto apis return -EINPROGRESS. Presently, on
> getting -EINPROGRESS, the tls record processing stops till the time the
> crypto accelerator finishes off and
On 09/12/2018 09:21 AM, Tushar Dave wrote:
>
>
> On 09/11/2018 12:38 PM, Tushar Dave wrote:
>> Helper bpg_msg_pull_data() can allocate multiple pages while
>> linearizing multiple scatterlist elements into one shared page.
>> However, if the shared page has size > PAGE_SIZE, using
>>
_flags and add
multi-map support")
Signed-off-by: John Fastabend
---
kernel/bpf/sockmap.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sockmap.c
index ce63e58..488ef96 100644
--- a/kernel/bpf/sockmap.c
+++ b/kernel/bpf/so
On 08/30/2018 03:33 PM, John Fastabend wrote:
> Currently we check sk_user_data is non NULL to determine if the sk
> exists in a map. However, this is not sufficient to ensure the psock
> is not in use by another (non-ULP TCP) user, such as kcm. To avoid
> this when adding a sock t
will issue a
warning and continue with the tests.
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/Makefile|2 -
tools/testing/selftests/bpf/test_maps.c | 64 ++-
2 files changed, 63 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/bpf
to look
at.
---
John Fastabend (1):
bpf: test_maps add a test to catch kcm + sockmap
tools/testing/selftests/bpf/Makefile|2 -
tools/testing/selftests/bpf/test_maps.c | 64 ++-
2 files changed, 63 insertions(+), 3 deletions(-)
--
Signature
-by: John Fastabend
---
0 files changed
diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sockmap.c
index ce63e58..1c05794 100644
--- a/kernel/bpf/sockmap.c
+++ b/kernel/bpf/sockmap.c
@@ -1808,6 +1808,11 @@ static int sock_map_delete_elem(struct bpf_map *map,
void *key)
return 0;
}
+static bool
only be closing the read side and/or write
side depending on if the test is receiving or sending.
But, really none of this is needed just remove the shutdown calls.
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/test_sockmap.c |3 ---
1 file changed, 3 deletions(-)
diff --git
Two small test sockmap updates for bpf-next. These help me run some
additional tests with test_sockmap.
---
John Fastabend (2):
bpf: sockmap test remove shutdown() calls
bpf: use --cgroup in test_suite if supplied
tools/testing/selftests/bpf/test_sockmap.c | 56
If the user supplies a --cgroup value in the arguments when running
the test_suite go ahaead and run the self tests there. I use this
to test with multiple cgroup users.
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/test_sockmap.c | 53
1 file
On 08/17/2018 04:08 PM, Tushar Dave wrote:
> Like sockmap (sk_msg), socksg also deals with struct scatterlist
> therefore socksg programs can use existing bpf helper bpf_msg_pull_data
> to access packet data contained in struct scatterlist. While doing some
> prelimnary testing, there are couple
in fact be the entire send size if no bytes were sent.
To do this use bool to indicate if free_start_sg() should do mem
accounting or not.
Signed-off-by: John Fastabend
---
kernel/bpf/sockmap.c | 45 ++---
1 file changed, 22 insertions(+), 23 deletions
ann
> ---
Oops. Thanks for catching this, all of our use cases and tests
to this point either always did redirect or normal receive and
I missed the mixed case. I'll write a tests for bpf-next to also
ensure we catch anything else.
Thanks.
Acked-by: John Fastabend
via RCU, so access to their
> link->hash / link->key is fine since we're under RCU read side there.
>
> Fixes: e9db4ef6bf4c ("bpf: sockhash fix omitted bucket lock in sock_close")
> Signed-off-by: Daniel Borkmann
> ---
Looks good to me, nice catch by the way.
Acked-by: John Fastabend
fix may be rather large and look like a hang to the user.
To reproduce the best test is to reduce the sndbuf size and send
1B data chunks to stress the memory handling.
To fix this pass the event from the upper layer to the lower layer.
Signed-off-by: John Fastabend
---
kernel/bpf/sockmap.c
. Without this I see
occosional stalls of sndtimeo length while we wait for the
timeout value even though space is available.
Two fixes below. Thanks.
---
John Fastabend (2):
tls: possible hang when do_tcp_sendpages hits sndbuf is full case
bpf: sockmap: write_space events need
individually being sent to the crypto
layer.
Signed-off-by: John Fastabend
---
net/tls/tls_main.c |9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c
index 93c0c22..180b664 100644
--- a/net/tls/tls_main.c
+++ b/net/tls/tls_main.c
d drop ndo_xdp_flush.
>
> Signed-off-by: Toshiaki Makita
> ---
> drivers/net/veth.c | 51 +++
> 1 file changed, 51 insertions(+)
>
Acked-by: John Fastabend
ear xdp_frame feilds in skb->head.
> - Implement adjust_tail.
>
> Signed-off-by: Toshiaki Makita
> ---
> drivers/net/veth.c | 87
> ++----
> 1 file changed, 82 insertions(+), 5 deletions(-)
>
Acked-by: John Fastabend
On 07/26/2018 07:40 AM, Toshiaki Makita wrote:
> From: Toshiaki Makita
>
> This is the basic implementation of veth driver XDP.
>
> Incoming packets are sent from the peer veth device in the form of skb,
> so this is generally doing the same thing as generic XDP.
>
> This itself is not so
On 07/24/2018 08:45 AM, Yonghong Song wrote:
> In one of our production machines, tools/testing/selftests/bpf
> test_sockmap failed randomly like below:
>
> ...
> [TEST 78]: (512, 1, 1, sendmsg, pass,apply 1,): rx thread exited with
> err 1. FAILED
> ...
>
> ...
> [TEST 80]: (2, 1024, 256,
es: 6aaae2b6c433 ("bpf: rename bpf_compute_data_end into
bpf_compute_data_pointers")
Signed-off-by: John Fastabend
---
include/net/tcp.h|4 ++
kernel/bpf/sockmap.c |4 +-
net/core/filter.c| 98 ++
3 files changed, 97 i
hook to remove socks")
Signed-off-by: John Fastabend
---
kernel/bpf/sockmap.c |5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sockmap.c
index 9c67e96..dfc8a8a 100644
--- a/kernel/bpf/sockmap.c
+++ b/kernel/bpf/sockmap.c
@@ -57
nge. So redo the conversion and this time
also convert the helpers.
v2: fix '0 files changed' issue in patches
---
John Fastabend (4):
bpf: fix sk_skb programs without skb->dev assigned
bpf: sockhash, disallow bpf_tcp_close and update in parallel
bpf: sockmap, consume_skb in
).
To resolve this take sock_lock in close and update paths.
Reported-by: syzbot+b680e42077a0d7c9a...@syzkaller.appspotmail.com
Fixes: e9db4ef6bf4c ("bpf: sockhash fix omitted bucket lock in sock_close")
Signed-off-by: John Fastabend
---
kernel/bpf/sockmap.c | 15 +++
kernel/bpf
ingress support")
Signed-off-by: John Fastabend
---
net/core/filter.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/core/filter.c b/net/core/filter.c
index 0ca6907..3095f1b 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -2779,7 +2779,8 @@ static int bpf_s
On 07/05/2018 08:36 AM, John Fastabend wrote:
> First three patches resolve issues found while testing sockhash and
> reviewing code. Syzbot also found them about the same time as I was
> working on fixes. The main issue is in the sockhash path we reduced
> the scope of sk_c
hook to remove socks")
Signed-off-by: John Fastabend
---
0 files changed
diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sockmap.c
index 9c67e96..dfc8a8a 100644
--- a/kernel/bpf/sockmap.c
+++ b/kernel/bpf/sockmap.c
@@ -571,7 +571,8 @@ static int free_sg(struct sock *sk, int start, struct
s
es: 6aaae2b6c433 ("bpf: rename bpf_compute_data_end into
bpf_compute_data_pointers")
Signed-off-by: John Fastabend
---
0 files changed
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 800582b..af3ec72 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -828,6 +828,10 @@ s
nge. So redo the conversion and this time
also convert the helpers.
---
John Fastabend (4):
bpf: fix sk_skb programs without skb->dev assigned
bpf: sockhash, disallow bpf_tcp_close and update in parallel
bpf: sockmap, consume_skb in close path
bpf: sockmap, c
1 - 100 of 1403 matches
Mail list logo