Commit c03079c9 authored by Magnus Karlsson's avatar Magnus Karlsson Committed by Alexei Starovoitov

samples/bpf: deal with EBUSY return code from sendmsg in xdpsock sample

Sendmsg in the SKB path of AF_XDP can now return EBUSY when a packet
was discarded and completed by the driver. Just ignore this message
in the sample application.

Fixes: b4b8faa1 ("samples/bpf: sample application and documentation for AF_XDP sockets")
Signed-off-by: default avatarMagnus Karlsson <magnus.karlsson@intel.com>
Reported-by: default avatarPavel Odintsov <pavel@fastnetmon.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent fe588685
......@@ -729,7 +729,7 @@ static void kick_tx(int fd)
int ret;
ret = sendto(fd, NULL, 0, MSG_DONTWAIT, NULL, 0);
if (ret >= 0 || errno == ENOBUFS || errno == EAGAIN)
if (ret >= 0 || errno == ENOBUFS || errno == EAGAIN || errno == EBUSY)
return;
lassert(0);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment