diff options
author | John Fastabend <john.fastabend@gmail.com> | 2018-03-28 22:49:15 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-03-30 01:09:43 +0300 |
commit | 8934ce2fd08171e8605f7fada91ee7619fe17ab8 (patch) | |
tree | 9a75574aadb3cfad15d09bffa0fe9eb6cbd9a03d /include/linux/filter.h | |
parent | 22527437e0a0c96ee3153e9d0382942b0fd4f9dd (diff) | |
download | linux-8934ce2fd08171e8605f7fada91ee7619fe17ab8.tar.xz |
bpf: sockmap redirect ingress support
Add support for the BPF_F_INGRESS flag in sk_msg redirect helper.
To do this add a scatterlist ring for receiving socks to check
before calling into regular recvmsg call path. Additionally, because
the poll wakeup logic only checked the skb recv queue we need to
add a hook in TCP stack (similar to write side) so that we have
a way to wake up polling socks when a scatterlist is redirected
to that sock.
After this all that is needed is for the redirect helper to
push the scatterlist into the psock receive queue.
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include/linux/filter.h')
-rw-r--r-- | include/linux/filter.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h index c2f167db8bd5..961cc5d53956 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -521,6 +521,7 @@ struct sk_msg_buff { __u32 key; __u32 flags; struct bpf_map *map; + struct list_head list; }; /* Compute the linear packet data range [data, data_end) which |