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.
Showing the changes to include/uapi/linux (1 of 7 files). Show all
Unified · Split
| @@ -3083,6 +3083,10 @@ struct bpf_sock_tuple { · 3082 unmodified lines | ||
| 3083 | 3083 | }; |
| 3084 | 3084 | }; |
| 3085 | 3085 | |
| 3086 | +struct bpf_xdp_sock { | |
| 3087 | + __u32 queue_id; | |
| 3088 | +}; | |
| 3089 | + | |
| 3086 | 3090 | #define XDP_PACKET_HEADROOM 256 |
| 3087 | 3091 | |
| 3088 | 3092 | /* User return codes for XDP prog type. |