All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zvi Effron <zeffron@riotgames.com>
To: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Cc: bpf <bpf@vger.kernel.org>, Alexei Starovoitov <ast@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	Cody Haas <chaas@riotgames.com>,
	Lisa Watanabe <lwatanabe@riotgames.com>
Subject: Re: [PATCH bpf-next v2 1/3] bpf: support input xdp_md context in BPF_PROG_TEST_RUN
Date: Fri, 28 May 2021 11:40:33 -0700	[thread overview]
Message-ID: <CAC1LvL3CXN+ytEFZfv4unq6vDki9nKU_ZN9mzhCVWc2RiNTWOQ@mail.gmail.com> (raw)
In-Reply-To: <20210528093043.GA46923@ranger.igk.intel.com>

On Fri, May 28, 2021 at 2:43 AM Maciej Fijalkowski
<maciej.fijalkowski@intel.com> wrote:
>
> On Thu, May 27, 2021 at 08:13:39PM +0000, Zvi Effron wrote:
> > Support passing a xdp_md via ctx_in/ctx_out in bpf_attr for
> > BPF_PROG_TEST_RUN.
> >
> > The intended use case is to pass some XDP meta data to the test runs of
> > XDP programs that are used as tail calls.
>
> How about providing an actual selftests that will showcase the above so
> reviewers could get in an easier way a grasp of what this set is about?
>

The very first test case in the added selftests (patch 3) does exactly
that. The return code is passed via XDP meta data to the tested
program (a program that normally would be invoked via tail call). This
is the exact use case we have that prompted this patch set.

  reply	other threads:[~2021-05-28 18:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-27 20:13 [PATCH bpf-next v2 0/3] bpf: support input xdp_md context in BPF_PROG_TEST_RUN Zvi Effron
2021-05-27 20:13 ` [PATCH bpf-next v2 1/3] " Zvi Effron
2021-05-28  9:30   ` Maciej Fijalkowski
2021-05-28 18:40     ` Zvi Effron [this message]
2021-05-27 20:13 ` [PATCH bpf-next v2 2/3] bpf: support specifying ingress via " Zvi Effron
2021-05-27 20:13 ` [PATCH bpf-next v2 3/3] selftests/bpf: Add test for " Zvi Effron
2021-05-28  1:28   ` Andrii Nakryiko
2021-05-28  2:10     ` Zvi Effron
2021-05-28  3:21       ` Andrii Nakryiko
2021-05-28 18:35     ` Zvi Effron

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=CAC1LvL3CXN+ytEFZfv4unq6vDki9nKU_ZN9mzhCVWc2RiNTWOQ@mail.gmail.com \
    --to=zeffron@riotgames.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=chaas@riotgames.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=hawk@kernel.org \
    --cc=lwatanabe@riotgames.com \
    --cc=maciej.fijalkowski@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.