diff options
| author | Magnus Karlsson <magnus.karlsson@intel.com> | 2018-05-02 07:01:32 -0400 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2018-05-03 18:55:24 -0400 |
| commit | f61459030ec7fffdaa3c462cc0f728eef11b4d05 (patch) | |
| tree | af95ebd390dd699a4e21c8e33dbe7b5f5a77ceab /include/uapi/linux | |
| parent | fe2308328cd2f26ebc986f543796e7d13ae00bc4 (diff) | |
xsk: add Tx queue setup and mmap support
Another setsockopt (XDP_TX_QUEUE) is added to let the process allocate
a queue, where the user process can pass frames to be transmitted by
the kernel.
The mmapping of the queue is done using the XDP_PGOFF_TX_QUEUE offset.
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/if_xdp.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/if_xdp.h b/include/uapi/linux/if_xdp.h index 71581a139f26..e2ea878d025c 100644 --- a/include/uapi/linux/if_xdp.h +++ b/include/uapi/linux/if_xdp.h | |||
| @@ -34,6 +34,7 @@ struct sockaddr_xdp { | |||
| 34 | 34 | ||
| 35 | /* XDP socket options */ | 35 | /* XDP socket options */ |
| 36 | #define XDP_RX_RING 1 | 36 | #define XDP_RX_RING 1 |
| 37 | #define XDP_TX_RING 2 | ||
| 37 | #define XDP_UMEM_REG 3 | 38 | #define XDP_UMEM_REG 3 |
| 38 | #define XDP_UMEM_FILL_RING 4 | 39 | #define XDP_UMEM_FILL_RING 4 |
| 39 | #define XDP_UMEM_COMPLETION_RING 5 | 40 | #define XDP_UMEM_COMPLETION_RING 5 |
| @@ -47,6 +48,7 @@ struct xdp_umem_reg { | |||
| 47 | 48 | ||
| 48 | /* Pgoff for mmaping the rings */ | 49 | /* Pgoff for mmaping the rings */ |
| 49 | #define XDP_PGOFF_RX_RING 0 | 50 | #define XDP_PGOFF_RX_RING 0 |
| 51 | #define XDP_PGOFF_TX_RING 0x80000000 | ||
| 50 | #define XDP_UMEM_PGOFF_FILL_RING 0x100000000 | 52 | #define XDP_UMEM_PGOFF_FILL_RING 0x100000000 |
| 51 | #define XDP_UMEM_PGOFF_COMPLETION_RING 0x180000000 | 53 | #define XDP_UMEM_PGOFF_COMPLETION_RING 0x180000000 |
| 52 | 54 | ||
