bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Björn Töpel" <bjorn.topel@gmail.com>
To: Li RongQing <lirongqing@baidu.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>
Cc: Netdev <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH] xdp: fix xsk_generic_xmit errno
Date: Thu, 11 Jun 2020 10:18:12 +0200	[thread overview]
Message-ID: <CAJ+HfNhq3yHOTH+v_UNTzarjCaftdw_v0WnebEphZ3niU8GEDQ@mail.gmail.com> (raw)
In-Reply-To: <1591852266-24017-1-git-send-email-lirongqing@baidu.com>

On Thu, 11 Jun 2020 at 07:11, Li RongQing <lirongqing@baidu.com> wrote:
>
> propagate sock_alloc_send_skb error code, not set it
> to EAGAIN unconditionally, when fail to allocate skb,
> which maybe causes that user space unnecessary loops
>
> Fixes: 35fcde7f8deb "(xsk: support for Tx)"
> Signed-off-by: Li RongQing <lirongqing@baidu.com>


Thanks!
Acked-by: Björn Töpel <bjorn.topel@intel.com>

Alexei/Daniel: This should go into "bpf".


Björn

> ---
>  net/xdp/xsk.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
> index b6c0f08bd80d..1ba3ea262c15 100644
> --- a/net/xdp/xsk.c
> +++ b/net/xdp/xsk.c
> @@ -353,7 +353,6 @@ static int xsk_generic_xmit(struct sock *sk)
>                 len = desc.len;
>                 skb = sock_alloc_send_skb(sk, len, 1, &err);
>                 if (unlikely(!skb)) {
> -                       err = -EAGAIN;
>                         goto out;
>                 }
>
> --
> 2.16.2
>

  reply	other threads:[~2020-06-11  8:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11  5:11 [PATCH] xdp: fix xsk_generic_xmit errno Li RongQing
2020-06-11  8:18 ` Björn Töpel [this message]
2020-06-11 14:24   ` Daniel Borkmann
2020-06-11 19:44 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJ+HfNhq3yHOTH+v_UNTzarjCaftdw_v0WnebEphZ3niU8GEDQ@mail.gmail.com \
    --to=bjorn.topel@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=lirongqing@baidu.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).