提交 c03079c9 编写于 作者: M Magnus Karlsson 提交者: 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: NMagnus Karlsson <magnus.karlsson@intel.com>
Reported-by: NPavel Odintsov <pavel@fastnetmon.com>
Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册