All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kaixi Fan <fankaixi.li@bytedance.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>, bpf <bpf@vger.kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>
Subject: Re: [External] [PATCH bpf-next v5 2/3] selftests/bpf: Move vxlan tunnel testcases to test_progs
Date: Sun, 24 Apr 2022 11:32:07 +0800	[thread overview]
Message-ID: <CAEEdnKG-HeAhWrATMTOYKa7_OdKXs4NjrVrQpcxFXSicgNY1mw@mail.gmail.com> (raw)
In-Reply-To: <CAADnVQL2j-sLdDr+ZRHakKo8SVrKofCq3ffQJ8Fpqvr0gEXHPg@mail.gmail.com>

Alexei Starovoitov <alexei.starovoitov@gmail.com> 于2022年4月24日周日 10:57写道:
>
> On Fri, Apr 22, 2022 at 7:51 PM Kaixi Fan <fankaixi.li@bytedance.com> wrote:
> >
> > Alexei Starovoitov <alexei.starovoitov@gmail.com> 于2022年4月23日周六 08:37写道:
> > >
> > > On Fri, Apr 22, 2022 at 5:04 AM <fankaixi.li@bytedance.com> wrote:
> > > > +#define VXLAN_TUNL_DEV0 "vxlan00"
> > > > +#define VXLAN_TUNL_DEV1 "vxlan11"
> > > > +#define IP6VXLAN_TUNL_DEV0 "ip6vxlan00"
> > > > +#define IP6VXLAN_TUNL_DEV1 "ip6vxlan11"
> > > > +
> > > > +#define SRC_INGRESS_PROG_PIN_FILE "/sys/fs/bpf/tc/test_tunnel_ingress_src"
> > > > +#define SRC_EGRESS_PROG_PIN_FILE "/sys/fs/bpf/tc/test_tunnel_egress_src"
> > > > +#define DST_EGRESS_PROG_PIN_FILE "/sys/fs/bpf/tc/test_tunnel_egress_dst"
> > > > +
> > > > +#define PING_ARGS "-c 3 -w 10 -q"
> >
> > Thanks for the suggestion.
> >
> > >
> > > Thanks for moving the test to test_progs,
> > > but its runtime is excessive.
> > >
> > > time ./test_progs -t tunnel
> > > #195 tunnel:OK
> > > Summary: 1/2 PASSED, 0 SKIPPED, 0 FAILED
> > >
> > > real    0m26.530s
> > > user    0m0.075s
> > > sys    0m1.317s
> > >
> > > Please find a way to test the functionality in a second or so.
> >
> > Hi Alexei,
> > Do you mean the sys time should be in a second ?
>
> real time.
> sys time is already there.
> The big delta between real and sys time highlights
> inefficiency of the test. The test sleeps most of the time.

The tunnel test includes many types of tunnel testcases.  Add a new
tunnel testcase would increase test time.
So the real time could not be reduced into a second.
The test code calls many shell commands to setup test environments. It
may be the reason why there is a big
delta bettween real and sys time.

Reduce the ping packet interval would reduce the real and sys time
significantly.
real 0m7.088s
user 0m0.062s
sys 0m0.119s

Thanks.

  reply	other threads:[~2022-04-24  3:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22 12:02 [External] [PATCH bpf-next v5 0/3] Add source ip in bpf tunnel key fankaixi.li
2022-04-22 12:02 ` [External] [PATCH bpf-next v5 1/3] bpf: Add source ip in "struct bpf_tunnel_key" fankaixi.li
2022-04-22 12:02 ` [External] [PATCH bpf-next v5 2/3] selftests/bpf: Move vxlan tunnel testcases to test_progs fankaixi.li
2022-04-23  0:36   ` Alexei Starovoitov
2022-04-23  2:51     ` Kaixi Fan
2022-04-24  2:57       ` Alexei Starovoitov
2022-04-24  3:32         ` Kaixi Fan [this message]
2022-04-26 18:24           ` Alexei Starovoitov
2022-04-29 14:46             ` Kaixi Fan
2022-04-22 12:02 ` [External] [PATCH bpf-next v5 3/3] selftests/bpf: Replace bpf_trace_printk in tunnel kernel code fankaixi.li

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=CAEEdnKG-HeAhWrATMTOYKa7_OdKXs4NjrVrQpcxFXSicgNY1mw@mail.gmail.com \
    --to=fankaixi.li@bytedance.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=songliubraving@fb.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 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.