summaryrefslogtreecommitdiff
path: root/include/uapi/linux/if_packet.h
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2015-08-14 22:31:35 -0400
committerDavid S. Miller <davem@davemloft.net>2015-08-17 14:22:48 -0700
commitf2e520956a1ab636698f8160194c9b8ac0989aab (patch)
treef3ff84457be59fab5303f64b5e5ba93204c3f90b /include/uapi/linux/if_packet.h
parent47dceb8ecdc1c3ad1818dfea3d659a05b74c3fc2 (diff)
downloadlwn-f2e520956a1ab636698f8160194c9b8ac0989aab.tar.gz
lwn-f2e520956a1ab636698f8160194c9b8ac0989aab.zip
packet: add extended BPF fanout mode
Add fanout mode PACKET_FANOUT_EBPF that accepts an en extended BPF program to select a socket. Update the internal eBPF program by passing to socket option SOL_PACKET/PACKET_FANOUT_DATA a file descriptor returned by bpf(). Signed-off-by: Willem de Bruijn <willemb@google.com> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/if_packet.h')
-rw-r--r--include/uapi/linux/if_packet.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/if_packet.h b/include/uapi/linux/if_packet.h
index a4bb16fa822e..9e7edfd8141e 100644
--- a/include/uapi/linux/if_packet.h
+++ b/include/uapi/linux/if_packet.h
@@ -64,6 +64,7 @@ struct sockaddr_ll {
#define PACKET_FANOUT_RND 4
#define PACKET_FANOUT_QM 5
#define PACKET_FANOUT_CBPF 6
+#define PACKET_FANOUT_EBPF 7
#define PACKET_FANOUT_FLAG_ROLLOVER 0x1000
#define PACKET_FANOUT_FLAG_DEFRAG 0x8000