xdp: Fix xsk_generic_xmit errno
authorLi RongQing <lirongqing@baidu.com>
Thu, 11 Jun 2020 05:11:06 +0000 (13:11 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 11 Jun 2020 21:44:33 +0000 (23:44 +0200)
commitaa2cad0600ed2ca6a0ab39948d4db1666b6c962b
tree2916f14c96f58814b34ae50940de56d6fdbd8692
parentd4060ac969563113101c79433f2ae005feca1c29
xdp: Fix xsk_generic_xmit errno

Propagate sock_alloc_send_skb error code, not set it to
EAGAIN unconditionally, when fail to allocate skb, which
might cause that user space unnecessary loops.

Fixes: 35fcde7f8deb ("xsk: support for Tx")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Björn Töpel <bjorn.topel@intel.com>
Link: https://lore.kernel.org/bpf/1591852266-24017-1-git-send-email-lirongqing@baidu.com
net/xdp/xsk.c