summaryrefslogtreecommitdiff
path: root/include/net/xdp_sock.h
diff options
context:
space:
mode:
authorJonathan Lemon <jonathan.lemon@gmail.com>2019-06-06 13:59:40 -0700
committerAlexei Starovoitov <ast@kernel.org>2019-06-10 23:31:26 -0700
commitfada7fdc83c0bf8755956bff707c42b609223301 (patch)
tree905e559b4c1aa750e8a08b2c357e8a358d35e9fb /include/net/xdp_sock.h
parent4ecabd55c90469629460f035f4bf4c8ae3d2743b (diff)
downloadlwn-fada7fdc83c0bf8755956bff707c42b609223301.tar.gz
lwn-fada7fdc83c0bf8755956bff707c42b609223301.zip
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. Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com> Acked-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/net/xdp_sock.h')
-rw-r--r--include/net/xdp_sock.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/xdp_sock.h b/include/net/xdp_sock.h
index d074b6d60f8a..ae0f368a62bb 100644
--- a/include/net/xdp_sock.h
+++ b/include/net/xdp_sock.h
@@ -58,11 +58,11 @@ struct xdp_sock {
struct xdp_umem *umem;
struct list_head flush_node;
u16 queue_id;
- struct xsk_queue *tx ____cacheline_aligned_in_smp;
- struct list_head list;
bool zc;
/* Protects multiple processes in the control path */
struct mutex mutex;
+ struct xsk_queue *tx ____cacheline_aligned_in_smp;
+ struct list_head list;
/* Mutual exclusion of NAPI TX thread and sendmsg error paths
* in the SKB destructor callback.
*/