Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> 于2022年4月24日周日 10:57写道: > > On Fri, Apr 22, 2022 at 7:51 PM Kaixi Fan <fankaixi.li@xxxxxxxxxxxxx> wrote: > > > > Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> 于2022年4月23日周六 08:37写道: > > > > > > On Fri, Apr 22, 2022 at 5:04 AM <fankaixi.li@xxxxxxxxxxxxx> 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.