bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: David Ahern <dsahern@gmail.com>
Cc: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>,
	"David Ahern" <dsahern@kernel.org>,
	"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>
Subject: Re: [PATCH v4 bpf-next 0/5] bpf: Add support for XDP programs in DEVMAP entries
Date: Mon, 1 Jun 2020 15:52:05 -0700	[thread overview]
Message-ID: <CAEf4BzaYU7-JhjnStL_JWVtL1-8wuB1ZcJkxoN01_bbKvdyaqA@mail.gmail.com> (raw)
In-Reply-To: <ed66bdc6-4114-2ecf-1812-176d0250730b@gmail.com>

On Mon, Jun 1, 2020 at 3:28 PM David Ahern <dsahern@gmail.com> wrote:
>
> On 6/1/20 3:12 PM, Alexei Starovoitov wrote:
> > 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;
>
> What compiler version? it compiles cleanly with ubuntu 20.04 and gcc
> 9.3. The other prog_tests are inconsistent with initializing it.

Do you have specific examples of inconsistencies? Seems like duration is:
1. either static variable, and thus zero-initialized;
2. is initialized explicitly at declaration;
3. is filled out with bpf_prog_test_run().

>
> >
> > and that selftest is imo too primitive.
>
> I focused the selftests on API changes introduced by this set - new
> attach type, valid accesses to egress_ifindex and not allowing devmap
> programs with xdp generic.
>
> > It's only loading progs and not executing them.
> > Could you please add prog_test_run to it?
> >
>
> I will look into it.

  parent reply	other threads:[~2020-06-01 22:52 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 ` [PATCH v4 bpf-next 0/5] bpf: Add support for XDP programs in DEVMAP entries Alexei Starovoitov
2020-06-01 22:28   ` David Ahern
2020-06-01 22:31     ` Alexei Starovoitov
2020-06-01 22:52     ` Andrii Nakryiko [this message]
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=CAEf4BzaYU7-JhjnStL_JWVtL1-8wuB1ZcJkxoN01_bbKvdyaqA@mail.gmail.com \
    --to=andrii.nakryiko@gmail.com \
    --cc=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).