Adds support for passing up to 4 arguments to sock_ops bpf functions. It reusues the reply union, so the bpf_sock_ops structures are not increased in size.
Showing the changes to include/uapi/linux (1 of 6 files). Show all
Unified · Split
| @@ -952,8 +952,9 @@ struct bpf_map_info { · 951 unmodified lines | |||
| 952 | struct bpf_sock_ops { | 952 | struct bpf_sock_ops { |
| 953 | __u32 op; | 953 | __u32 op; |
| 954 | union { | 954 | union { |
| 955 | __u32 reply; | 955 | __u32 args[4]; /* Optionally passed to bpf program */ |
| 956 | __u32 replylong[4]; | 956 | __u32 reply; /* Returned by bpf program */ |
| 957 | __u32 replylong[4]; /* Optionally returned by bpf prog */ | ||
| 957 | }; | 958 | }; |
| 958 | __u32 family; | 959 | __u32 family; |
| 959 | __u32 remote_ip4; /* Stored in network byte order */ | 960 | __u32 remote_ip4; /* Stored in network byte order */ |