bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: David Ahern <dsahern@kernel.org>
Cc: "Network Development" <netdev@vger.kernel.org>,
	bpf <bpf@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Jesper Dangaard Brouer" <brouer@redhat.com>,
	"Toke Høiland-Jørgensen" <toke@redhat.com>,
	"Lorenzo Bianconi" <lorenzo@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"John Fastabend" <john.fastabend@gmail.com>,
	"Alexei Starovoitov" <ast@kernel.org>,
	"Martin KaFai Lau" <kafai@fb.com>,
	"Song Liu" <songliubraving@fb.com>, "Yonghong Song" <yhs@fb.com>,
	"Andrii Nakryiko" <andriin@fb.com>,
	"David Ahern" <dsahern@gmail.com>
Subject: Re: [PATCH v4 bpf-next 0/5] bpf: Add support for XDP programs in DEVMAP entries
Date: Mon, 1 Jun 2020 14:12:45 -0700	[thread overview]
Message-ID: <CAADnVQK1rzFfzcQX-EGW57=O2xnz2pjX5madnZGTiAsKnCmbHA@mail.gmail.com> (raw)
In-Reply-To: <20200529220716.75383-1-dsahern@kernel.org>

On Fri, May 29, 2020 at 3:07 PM David Ahern <dsahern@kernel.org> wrote:
>
> Implementation of Daniel's proposal for allowing DEVMAP entries to be
> a device index, program fd pair.
>
> Programs are run after XDP_REDIRECT and have access to both Rx device
> and Tx device.
>
> v4
> - moved struct bpf_devmap_val from uapi to devmap.c, named the union
>   and dropped the prefix from the elements - Jesper
> - fixed 2 bugs in selftests

Applied.

In patch 5 I had to fix:
/data/users/ast/net-next/tools/testing/selftests/bpf/prog_tests/xdp_devmap_attach.c:
In function ‘test_neg_xdp_devmap_helpers’:
/data/users/ast/net-next/tools/testing/selftests/bpf/test_progs.h:106:3:
warning: ‘duration’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
  106 |   fprintf(stdout, "%s:PASS:%s %d nsec\n",   \
      |   ^~~~~~~
/data/users/ast/net-next/tools/testing/selftests/bpf/prog_tests/xdp_devmap_attach.c:79:8:
note: ‘duration’ was declared here
   79 |  __u32 duration;

and that selftest is imo too primitive.
It's only loading progs and not executing them.
Could you please add prog_test_run to it?

  parent reply	other threads:[~2020-06-01 21:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29 22:07 [PATCH v4 bpf-next 0/5] bpf: Add support for XDP programs in DEVMAP entries David Ahern
2020-05-29 22:07 ` [PATCH v4 bpf-next 1/5] devmap: Formalize map value as a named struct David Ahern
2020-05-29 22:07 ` [PATCH v4 bpf-next 2/5] bpf: Add support to attach bpf program to a devmap entry David Ahern
2020-05-29 22:07 ` [PATCH v4 bpf-next 3/5] xdp: Add xdp_txq_info to xdp_buff David Ahern
2020-05-29 22:07 ` [PATCH v4 bpf-next 4/5] libbpf: Add SEC name for xdp programs attached to device map David Ahern
2020-05-29 22:07 ` [PATCH v4 bpf-next 5/5] selftest: Add tests for XDP programs in devmap entries David Ahern
2020-06-01 21:12 ` Alexei Starovoitov [this message]
2020-06-01 22:28   ` [PATCH v4 bpf-next 0/5] bpf: Add support for XDP programs in DEVMAP entries David Ahern
2020-06-01 22:31     ` Alexei Starovoitov
2020-06-01 22:52     ` Andrii Nakryiko
2020-06-02  3:00       ` David Ahern
2020-06-05 23:45     ` David Ahern

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='CAADnVQK1rzFfzcQX-EGW57=O2xnz2pjX5madnZGTiAsKnCmbHA@mail.gmail.com' \
    --to=alexei.starovoitov@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=dsahern@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kuba@kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=toke@redhat.com \
    --cc=yhs@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).