soreuseport: setsockopt SO_ATTACH_REUSEPORT_[CE]BPF
Expose socket options for setting a classic or extended BPF program for use when selecting sockets in an SO_REUSEPORT group. These options can be used on the first socket to belong to a group before bind or on any socket in the group after bind. This change includes refactoring of the existing sk_filter code to allow reuse of the existing BPF filter validation checks. Signed-off-by:Craig Gallek <kraig@google.com> Acked-by:
Alexei Starovoitov <ast@kernel.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- arch/alpha/include/uapi/asm/socket.h 3 additions, 0 deletionsarch/alpha/include/uapi/asm/socket.h
- arch/avr32/include/uapi/asm/socket.h 3 additions, 0 deletionsarch/avr32/include/uapi/asm/socket.h
- arch/frv/include/uapi/asm/socket.h 3 additions, 0 deletionsarch/frv/include/uapi/asm/socket.h
- arch/ia64/include/uapi/asm/socket.h 3 additions, 0 deletionsarch/ia64/include/uapi/asm/socket.h
- arch/m32r/include/uapi/asm/socket.h 3 additions, 0 deletionsarch/m32r/include/uapi/asm/socket.h
- arch/mips/include/uapi/asm/socket.h 3 additions, 0 deletionsarch/mips/include/uapi/asm/socket.h
- arch/mn10300/include/uapi/asm/socket.h 3 additions, 0 deletionsarch/mn10300/include/uapi/asm/socket.h
- arch/parisc/include/uapi/asm/socket.h 3 additions, 0 deletionsarch/parisc/include/uapi/asm/socket.h
- arch/powerpc/include/uapi/asm/socket.h 3 additions, 0 deletionsarch/powerpc/include/uapi/asm/socket.h
- arch/s390/include/uapi/asm/socket.h 3 additions, 0 deletionsarch/s390/include/uapi/asm/socket.h
- arch/sparc/include/uapi/asm/socket.h 3 additions, 0 deletionsarch/sparc/include/uapi/asm/socket.h
- arch/xtensa/include/uapi/asm/socket.h 3 additions, 0 deletionsarch/xtensa/include/uapi/asm/socket.h
- include/linux/filter.h 2 additions, 0 deletionsinclude/linux/filter.h
- include/net/sock_reuseport.h 9 additions, 1 deletioninclude/net/sock_reuseport.h
- include/net/udp.h 3 additions, 2 deletionsinclude/net/udp.h
- include/uapi/asm-generic/socket.h 3 additions, 0 deletionsinclude/uapi/asm-generic/socket.h
- net/core/filter.c 99 additions, 22 deletionsnet/core/filter.c
- net/core/sock.c 29 additions, 0 deletionsnet/core/sock.c
- net/core/sock_reuseport.c 83 additions, 5 deletionsnet/core/sock_reuseport.c
- net/ipv4/udp.c 8 additions, 6 deletionsnet/ipv4/udp.c
Loading
Please register or sign in to comment