From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9E63C433F5 for ; Sun, 24 Apr 2022 03:32:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237695AbiDXDfY (ORCPT ); Sat, 23 Apr 2022 23:35:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234605AbiDXDfR (ORCPT ); Sat, 23 Apr 2022 23:35:17 -0400 Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9CBB1A8C15 for ; Sat, 23 Apr 2022 20:32:18 -0700 (PDT) Received: by mail-io1-xd36.google.com with SMTP id r12so12563158iod.6 for ; Sat, 23 Apr 2022 20:32:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=K9ezTwdzKN4MAJ4zaXuUUNt01SvcWJhe1i+ZSfqzer8=; b=0pgzHcMv3SGctdJPx/ptBpOzSpjxG7CE0TVyEFXiEmClJ6N5i0tp0xEO38+C2fn8QE hmCc1kVajiqH6s64nHRiylf+Ugm2ZOugNA9uYZvuPSfeheHZBegPOWRn/TyMSdUa3L30 cItCO/yixIQlTjq6IovtQXSGQYZJWgZsiLpRNbHy1z8zb//w8uDZUscX/DTZKQPJ+qyx fHThTesV15Q5+tRkAp6zNZWQcL2BE+9i23PqrC2T/BL0UqIM0gjDNxj+ksKZnHklIaXy +W21VWfeJ8NVjEXj/Al4k2PCpVlIH95fJOJaT0pQXSnkWr5vJC6zjBr0a2adFx0ZFoDc TJ9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=K9ezTwdzKN4MAJ4zaXuUUNt01SvcWJhe1i+ZSfqzer8=; b=F5WesnzVO7Q1iTlLMb64A7WZvE9eGQieCT6ZCd1m4BKP/XHDZmePBsp6Y871cBoQf3 AX+j/RyVzi3vuOhWJkVTM9WlQUwXzaxNJyTzKp4Zbv3ip+e1ILRexnAwOsTpw093WaOG JQtZnLD9Sc/lv5s8CUz3s/I7RgYgxBQ9jIBhdyOT3D6MjUcSU//8XxLBIX8InQUEaRRj B5zo8XzZ0QH7VW1VO94l6f6/9LC3XH37oJpPW5s++m7hmxw/vd2s/7fsZdpeRAh4wNBN Es5QNWj7xf8f1CFr/VEWauoWTLKGtnaHBr8OMq7ulJR1fKKVfKThoqZSju0MC9ToEb3j feJQ== X-Gm-Message-State: AOAM533O7xmkDs/YrwnGrJO1rT/cx/8NtpML+Yw9KOogqLO9rj8BUuVn n7U9pEykMK0hOOVY/eHFk+d0wR2pgSeCUoATvqPqRg== X-Google-Smtp-Source: ABdhPJz9siO+A7CobVPUkUFYGErOn4KdyShhNineyeJuTztCClLC30608yEn6sIpbTR/b2XeisXaTseJQmw7SYEIgM4= X-Received: by 2002:a02:8604:0:b0:326:681e:eef1 with SMTP id e4-20020a028604000000b00326681eeef1mr4754118jai.275.1650771138370; Sat, 23 Apr 2022 20:32:18 -0700 (PDT) MIME-Version: 1.0 References: <20220422120259.10185-1-fankaixi.li@bytedance.com> <20220422120259.10185-3-fankaixi.li@bytedance.com> In-Reply-To: From: Kaixi Fan Date: Sun, 24 Apr 2022 11:32:07 +0800 Message-ID: Subject: Re: [External] [PATCH bpf-next v5 2/3] selftests/bpf: Move vxlan tunnel testcases to test_progs To: Alexei Starovoitov Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , bpf , Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Alexei Starovoitov =E4=BA=8E2022=E5=B9=B44= =E6=9C=8824=E6=97=A5=E5=91=A8=E6=97=A5 10:57=E5=86=99=E9=81=93=EF=BC=9A > > On Fri, Apr 22, 2022 at 7:51 PM Kaixi Fan wro= te: > > > > Alexei Starovoitov =E4=BA=8E2022=E5=B9= =B44=E6=9C=8823=E6=97=A5=E5=91=A8=E5=85=AD 08:37=E5=86=99=E9=81=93=EF=BC=9A > > > > > > On Fri, Apr 22, 2022 at 5:04 AM 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_ingr= ess_src" > > > > +#define SRC_EGRESS_PROG_PIN_FILE "/sys/fs/bpf/tc/test_tunnel_egres= s_src" > > > > +#define DST_EGRESS_PROG_PIN_FILE "/sys/fs/bpf/tc/test_tunnel_egres= s_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.