Björn Töpel | a36b38aa | 2019-01-24 19:59:39 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* Copyright(c) 2019 Intel Corporation. */ |
| 3 | |
| 4 | #ifndef XSK_H_ |
| 5 | #define XSK_H_ |
| 6 | |
Magnus Karlsson | 77cd0d7 | 2019-08-14 09:27:17 +0200 | [diff] [blame] | 7 | struct xdp_ring_offset_v1 { |
| 8 | __u64 producer; |
| 9 | __u64 consumer; |
| 10 | __u64 desc; |
| 11 | }; |
| 12 | |
| 13 | struct xdp_mmap_offsets_v1 { |
| 14 | struct xdp_ring_offset_v1 rx; |
| 15 | struct xdp_ring_offset_v1 tx; |
| 16 | struct xdp_ring_offset_v1 fr; |
| 17 | struct xdp_ring_offset_v1 cr; |
| 18 | }; |
| 19 | |
Björn Töpel | a36b38aa | 2019-01-24 19:59:39 +0100 | [diff] [blame] | 20 | static inline struct xdp_sock *xdp_sk(struct sock *sk) |
| 21 | { |
| 22 | return (struct xdp_sock *)sk; |
| 23 | } |
| 24 | |
| 25 | #endif /* XSK_H_ */ |