Re: [PATCH bpf-next v2 1/3] bpf: support input xdp_md context in BPF_PROG_TEST_RUN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 28, 2021 at 2:43 AM Maciej Fijalkowski
<maciej.fijalkowski@xxxxxxxxx> 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.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux