History

bpf: Support passing args to sock_ops bpf function

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.

Lawrence Brakmo committed 8 years ago

Commit de525be1 parent b73042b6 files · +42 −10Browse files

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

Unified · Split

include/uapi/linux/bpf.h+3−2
@@ -952,8 +952,9 @@ struct bpf_map_info { · 951 unmodified lines
952struct bpf_sock_ops {952struct 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 */

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