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.
Showing the changes to include/uapi (1 of 8 files). Show all
Unified · Split
| @@ -117,6 +117,8 @@ · 116 unmodified lines | |||
| 117 | #define SO_RCVTIMEO_NEW 66 | 117 | #define SO_RCVTIMEO_NEW 66 |
| 118 | #define SO_SNDTIMEO_NEW 67 | 118 | #define SO_SNDTIMEO_NEW 67 |
| 119 | 119 | ||
| 120 | #define SO_DETACH_REUSEPORT_BPF 68 | ||
| 121 | |||
| 120 | #if !defined(__KERNEL__) | 122 | #if !defined(__KERNEL__) |
| 121 | 123 | ||
| 122 | #if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__)) | 124 | #if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__)) |