Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
}