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
3083 };3083 };
3084};3084};
3085 3085
3086struct bpf_xdp_sock {
3087 __u32 queue_id;
3088};
3089
3086#define XDP_PACKET_HEADROOM 2563090#define XDP_PACKET_HEADROOM 256
3087 3091
3088/* User return codes for XDP prog type.3092/* 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