diff options
author | John Fastabend <john.fastabend@gmail.com> | 2018-10-16 11:07:59 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-10-17 02:30:31 +0200 |
commit | 8734a162c13b1a893e7dff8de0df81fed04c51a6 (patch) | |
tree | c2315a4509373faded8a283081efce95a7b6ad7e /net/tls/tls_sw.c | |
parent | 3f4c3127d332000530349db4843deece27fe5e0c (diff) | |
download | linux-8734a162c13b1a893e7dff8de0df81fed04c51a6.tar.bz2 |
bpf: skmsg, improve sk_msg_used_element to work in cork context
Currently sk_msg_used_element is only called in zerocopy context where
cork is not possible and if this case happens we fallback to copy
mode. However the helper is more useful if it works in all contexts.
This patch resolved the case where if end == head indicating a full
or empty ring 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 <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'net/tls/tls_sw.c')
0 files changed, 0 insertions, 0 deletions