Skip to content
Snippets Groups Projects
Commit c6d8c020 authored by Wang Liang's avatar Wang Liang Committed by Alexei Starovoitov
Browse files

xsk: Fix __xsk_generic_xmit() error code when cq is full


When the cq reservation is failed, the error code is not set which is
initialized to zero in __xsk_generic_xmit(). That means the packet is not
send successfully but sendto() return ok.

Considering the impact on uapi, return -EAGAIN is a good idea. The cq is
full usually because it is not released in time, try to send msg again is
appropriate.

The bug was at the very early implementation of xsk, so the Fixes tag
targets the commit that introduced the changes in
xsk_cq_reserve_addr_locked where this fix depends on.

Fixes: e6c4047f ("xsk: Use xsk_buff_pool directly for cq functions")
Suggested-by: default avatarMagnus Karlsson <magnus.karlsson@gmail.com>
Signed-off-by: default avatarWang Liang <wangliang74@huawei.com>
Signed-off-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
Acked-by: default avatarStanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20250227081052.4096337-1-wangliang74@huawei.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent aa918db7
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment