diff options
author | Magnus Karlsson <magnus.karlsson@intel.com> | 2018-06-29 09:48:19 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-07-03 03:37:12 +0200 |
commit | c03079c9d93d593d44524883b6b6127b21978e22 (patch) | |
tree | 53ef6c297dac4a0bbcf88a5a0ecbcd0759aee751 | |
parent | xsk: frame could be completed more than once in SKB path (diff) | |
download | linux-c03079c9d93d593d44524883b6b6127b21978e22.tar.xz linux-c03079c9d93d593d44524883b6b6127b21978e22.zip |
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: b4b8faa1ded7 ("samples/bpf: sample application and documentation for AF_XDP sockets")
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Reported-by: Pavel Odintsov <pavel@fastnetmon.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
-rw-r--r-- | samples/bpf/xdpsock_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index d69c8d78d3fd..5904b1543831 100644 --- a/samples/bpf/xdpsock_user.c +++ b/samples/bpf/xdpsock_user.c @@ -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); } |