]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: sockmap indicate sock events to listeners
authorJohn Fastabend <john.fastabend@gmail.com>
Mon, 28 Aug 2017 14:12:01 +0000 (07:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Aug 2017 18:13:22 +0000 (11:13 -0700)
commite795b5afb647d9659b51eea053bdd1a983b0619a
tree5dda1f129368bc28ab93f4f98e7d22947203ba6f
parent1b95481aee3de9481cb0f404f1c4837cb7b13ea2
bpf: sockmap indicate sock events to listeners

After userspace pushes sockets into a sockmap it may not be receiving
data (assuming stream_{parser|verdict} programs are attached). But, it
may still want to manage the socks. A common pattern is to poll/select
for a POLLRDHUP event so we can close the sock.

This patch adds the logic to wake up these listeners.

Also add TCP_SYN_SENT to the list of events to handle. We don't want
to break the connection just because we happen to be in this state.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/bpf/sockmap.c