History

bpf: Allow bpf_map_lookup_elem() on an xskmap

Currently, the AF_XDP code uses a separate map in order to determine if an xsk is bound to a queue. Instead of doing this, have bpf_map_lookup_elem() return a xdp_sock. Rearrange some xdp_sock members to eliminate structure holes. Remove selftest - will be added back in later patch.

Jonathan Lemon committed 7 years ago

Commit fada7fd1 parent 4ecabd57 files · +85 −19Browse files

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

Unified · Split

include/uapi/linux/bpf.h+4−0
@@ -3083,6 +3083,10 @@ struct bpf_sock_tuple { · 3082 unmodified lines
30833083 };
30843084 };
30853085
3086+struct bpf_xdp_sock {
3087+ __u32 queue_id;
3088+};
3089+
30863090 #define XDP_PACKET_HEADROOM 256
30873091
30883092 /* User return codes for XDP prog type.

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