summaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2019-06-13 15:00:01 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2019-06-15 01:21:19 +0200
commit99f3a064bc2e4bd5fe50218646c5be342f2ad18c (patch)
treeb5eb23bfcbf922d9773265810bb4119e57a31a8a /arch/sparc
parente55d54f43d3f11718d9e2800225097fda498e141 (diff)
downloadlinux-99f3a064bc2e4bd5fe50218646c5be342f2ad18c.tar.bz2
bpf: net: Add SO_DETACH_REUSEPORT_BPF
There is SO_ATTACH_REUSEPORT_[CE]BPF but there is no DETACH. This patch adds SO_DETACH_REUSEPORT_BPF sockopt. The same sockopt can be used to undo both SO_ATTACH_REUSEPORT_[CE]BPF. reseport_detach_prog() is added and it is mostly a mirror of the existing reuseport_attach_prog(). The differences are, it does not call reuseport_alloc() and returns -ENOENT when there is no old prog. Cc: Craig Gallek <kraig@google.com> Signed-off-by: Martin KaFai Lau <kafai@fb.com> Reviewed-by: Stanislav Fomichev <sdf@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/include/uapi/asm/socket.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/sparc/include/uapi/asm/socket.h b/arch/sparc/include/uapi/asm/socket.h
index 9265a9eece15..8029b681fc7c 100644
--- a/arch/sparc/include/uapi/asm/socket.h
+++ b/arch/sparc/include/uapi/asm/socket.h
@@ -115,6 +115,8 @@
#define SO_RCVTIMEO_NEW 0x0044
#define SO_SNDTIMEO_NEW 0x0045
+#define SO_DETACH_REUSEPORT_BPF 0x0047
+
#if !defined(__KERNEL__)