History

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.

Martin KaFai Lau committed 7 years ago

Commit 99f3a061 parent e55d54f8 files · +40 −0Browse files

Showing the changes to include/uapi (1 of 8 files). Show all

Unified · Split

include/uapi/asm-generic/socket.h+2−0
@@ -117,6 +117,8 @@ · 116 unmodified lines
117117 #define SO_RCVTIMEO_NEW 66
118118 #define SO_SNDTIMEO_NEW 67
119119
120+#define SO_DETACH_REUSEPORT_BPF 68
121+
120122 #if !defined(__KERNEL__)
121123
122124 #if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__))

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t