summaryrefslogtreecommitdiffstats
path: root/samples/bpf
diff options
context:
space:
mode:
authorMagnus Karlsson <magnus.karlsson@intel.com>2018-06-29 09:48:19 +0200
committerAlexei Starovoitov <ast@kernel.org>2018-07-02 18:37:12 -0700
commitc03079c9d93d593d44524883b6b6127b21978e22 (patch)
tree53ef6c297dac4a0bbcf88a5a0ecbcd0759aee751 /samples/bpf
parentfe5886852601fb2593cbc5a7549ef9fd2ef481ba (diff)
downloadlinux-c03079c9d93d593d44524883b6b6127b21978e22.tar.gz
linux-c03079c9d93d593d44524883b6b6127b21978e22.tar.bz2
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>
Diffstat (limited to 'samples/bpf')
-rw-r--r--samples/bpf/xdpsock_user.c2
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);
}