-
- Downloads
xsk: Support tx_metadata_len
For zerocopy mode, tx_desc->addr can point to an arbitrary offset and carry some TX metadata in the headroom. For copy mode, there is no way currently to populate skb metadata. Introduce new tx_metadata_len umem config option that indicates how many bytes to treat as metadata. Metadata bytes come prior to tx_desc address (same as in RX case). The size of the metadata has mostly the same constraints as XDP: - less than 256 bytes - 8-byte aligned (compared to 4-byte alignment on xdp, due to 8-byte timestamp in the completion) - non-zero This data is not interpreted in any way right now. Reviewed-by:Song Yoong Siang <yoong.siang.song@intel.com> Signed-off-by:
Stanislav Fomichev <sdf@google.com> Reviewed-by:
Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/r/20231127190319.1190813-2-sdf@google.com Signed-off-by:
Alexei Starovoitov <ast@kernel.org>
Showing
- include/net/xdp_sock.h 1 addition, 0 deletionsinclude/net/xdp_sock.h
- include/net/xsk_buff_pool.h 1 addition, 0 deletionsinclude/net/xsk_buff_pool.h
- include/uapi/linux/if_xdp.h 1 addition, 0 deletionsinclude/uapi/linux/if_xdp.h
- net/xdp/xdp_umem.c 4 additions, 0 deletionsnet/xdp/xdp_umem.c
- net/xdp/xsk.c 11 additions, 1 deletionnet/xdp/xsk.c
- net/xdp/xsk_buff_pool.c 1 addition, 0 deletionsnet/xdp/xsk_buff_pool.c
- net/xdp/xsk_queue.h 10 additions, 7 deletionsnet/xdp/xsk_queue.h
- tools/include/uapi/linux/if_xdp.h 1 addition, 0 deletionstools/include/uapi/linux/if_xdp.h
Please register or sign in to comment