[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPhsuW6fALyEKQ2V+rzXcN8C-u_wM4EyTsz7NeSL6h0-GKPu5w@mail.gmail.com>
Date: Wed, 27 Jun 2018 11:21:28 -0700
From: Song Liu <liu.song.a23@...il.com>
To: Magnus Karlsson <magnus.karlsson@...el.com>
Cc: bjorn.topel@...el.com, ast@...com,
Daniel Borkmann <daniel@...earbox.net>,
Networking <netdev@...r.kernel.org>, qi.z.zhang@...el.com,
pavel@...tnetmon.com
Subject: Re: [PATCH bpf 3/4] samples/bpf: deal with EBUSY return code from
sendmsg in xdpsock sample
On Wed, Jun 27, 2018 at 7:02 AM, Magnus Karlsson
<magnus.karlsson@...el.com> wrote:
> 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@...el.com>
> Reported-by: Pavel Odintsov <pavel@...tnetmon.com>
Acked-by: Song Liu <songliubraving@...com>
> ---
> samples/bpf/xdpsock_user.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c
> index d69c8d78d3fd..aec3a61fac44 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 == EAGAIN || errno == EBUSY)
> return;
> lassert(0);
> }
> --
> 2.7.4
>
Powered by blists - more mailing lists