bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Li RongQing <lirongqing@baidu.com>,
	netdev@vger.kernel.org, songliubraving@fb.com,
	bpf@vger.kernel.org
Subject: Re: [PATCH][bpf-next][v2] bpf: return -EBADRQC for invalid map type in __bpf_tx_xdp_map
Date: Tue, 14 Jan 2020 20:37:04 +0100	[thread overview]
Message-ID: <7aa19e08-09b3-61b0-0622-130de0c0e51e@iogearbox.net> (raw)
In-Reply-To: <1578618277-18085-1-git-send-email-lirongqing@baidu.com>

On 1/10/20 2:04 AM, Li RongQing wrote:
> a negative value should be returned if map->map_type
> is invalid although that seems unlikely now, then the
> caller will continue to handle buffer, otherwise the
> buffer will be leaked
> 
> Daniel Borkmann suggested:
> -EBADRQC should be returned to keep consistent with
> xdp_do_generic_redirect_map() for the tracepoint output
> and not to be confused with -EOPNOTSUPP from other
> locations like dev_map_enqueue() when ndo_xdp_xmit
> is missing or such.
> 
> Suggested-by: Daniel Borkmann <daniel@iogearbox.net>
> Signed-off-by: Li RongQing <lirongqing@baidu.com>

Applied, thanks (fixed up commit message a bit).

      reply	other threads:[~2020-01-14 19:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10  1:04 [PATCH][bpf-next][v2] bpf: return -EBADRQC for invalid map type in __bpf_tx_xdp_map Li RongQing
2020-01-14 19:37 ` Daniel Borkmann [this message]

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=7aa19e08-09b3-61b0-0622-130de0c0e51e@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=bpf@vger.kernel.org \
    --cc=lirongqing@baidu.com \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    /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).