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 1791EC433F5 for ; Tue, 17 May 2022 03:15:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230354AbiEQDP3 (ORCPT ); Mon, 16 May 2022 23:15:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbiEQDP2 (ORCPT ); Mon, 16 May 2022 23:15:28 -0400 Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0E3431919 for ; Mon, 16 May 2022 20:15:27 -0700 (PDT) Received: by mail-io1-xd33.google.com with SMTP id s23so17971008iog.13 for ; Mon, 16 May 2022 20:15:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=2lBvle9qXVrk1nvu8MMit+SxN00NACLyvqyYyEcpyIE=; b=hcQog9f15QFPk1SaExuwO2ODZxZqGtzpsF6VZrl1/5BTmtKEB5eEQesk2W38luoBNN 8OYbt2J2xylCyUD1ziMXMhasjUwfl0ika9ivodgdG5lkTvkWpI7bRmof+iKgcaDKeSLX RJK8+pGVRlA16DPMzrK8emqf6OES9lbffpONw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2lBvle9qXVrk1nvu8MMit+SxN00NACLyvqyYyEcpyIE=; b=ww0DJQ3BDuQdkTSsQCQO8gaiWp5RJ2ffIQ/wIfl0bI5pW8EBnNwXZmsaCq6hLLuFYG 1Qyppz8DVS2LSVipE+8ztDUy07id2l76SZLQxfjCUzuGGv2d3QE0VSEAClCxW1OPFMbv W5WJ1B4pE6euvcMy/09hDz9D0t2mZiRNCjkpawYBWr+Vt/NH13I1kQ6+xbcDgv2KZW4G RvwN5/g76429eUiFiMZJSfrlsv1fbq24uKyZBAJ2WrYnUoRftM38ybBvJJ4NNBrpl9Z2 q89az4PAiOoFQYAN0EevQNCaKLEG8Eyjl5fIetkzOkN9ppYTWMVx+BpvLk/hpq9QYtMY pmCQ== X-Gm-Message-State: AOAM531XT0tmvOZNg0d8tv3SUxWx7q4tkQ4KbC5E8YN8gW4tyARBDs2m EFaondkmRul9CM94J5YeJb6idw== X-Google-Smtp-Source: ABdhPJzu/znFt+UqNFmHwk7Yz8cX8AjyAzjTs8diTrw7+DjUEhkuBoI1VSysGwBM9G/KlD2uFhLNYg== X-Received: by 2002:a05:6602:13c3:b0:65d:d052:9982 with SMTP id o3-20020a05660213c300b0065dd0529982mr9380803iov.83.1652757327122; Mon, 16 May 2022 20:15:27 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id o17-20020a02cc31000000b0032e2e5fc1absm1373597jap.20.2022.05.16.20.15.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 May 2022 20:15:26 -0700 (PDT) Subject: Re: [PATCH net-next] selftests: fib_nexthops: Make the test more robust To: Amit Cohen , "netdev@vger.kernel.org" Cc: "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "shuah@kernel.org" , mlxsw , "dsahern@kernel.org" , Shuah Khan References: <20220512131207.2617437-1-amcohen@nvidia.com> <26e610ee-2e78-2593-6fc9-904949a38d6e@linuxfoundation.org> From: Shuah Khan Message-ID: <6c7f2513-7587-ce6c-ed87-fbdb11c1d912@linuxfoundation.org> Date: Mon, 16 May 2022 21:15:26 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 5/15/22 8:26 AM, Amit Cohen wrote: > > >> -----Original Message----- >> From: Shuah Khan >> Sent: Thursday, May 12, 2022 7:40 PM >> To: Amit Cohen ; netdev@vger.kernel.org >> Cc: davem@davemloft.net; edumazet@google.com; kuba@kernel.org; pabeni@redhat.com; shuah@kernel.org; mlxsw >> ; dsahern@kernel.org; Shuah Khan >> Subject: Re: [PATCH net-next] selftests: fib_nexthops: Make the test more robust >> >> On 5/12/22 9:17 AM, Amit Cohen wrote: >>> >>> >>>> -----Original Message----- >>>> From: Shuah Khan >>>> Sent: Thursday, May 12, 2022 5:28 PM >>>> To: Amit Cohen ; netdev@vger.kernel.org >>>> Cc: davem@davemloft.net; edumazet@google.com; kuba@kernel.org; pabeni@redhat.com; shuah@kernel.org; mlxsw >>>> ; Shuah Khan >>>> Subject: Re: [PATCH net-next] selftests: fib_nexthops: Make the test more robust >>>> >>>> On 5/12/22 7:12 AM, Amit Cohen wrote: >>>>> Rarely some of the test cases fail. Make the test more robust by increasing >>>>> the timeout of ping commands to 5 seconds. >>>>> >>>> >>>> Can you explain why test cases fail? >>> >>> The failures are probably caused due to slow forwarding performance. >>> You can see similar commit - b6a4fd680042 ("selftests: forwarding: Make ping timeout configurable"). >>> >> >> My primary concern is that this patch simply changes the value >> and doesn't make it configurable. Sounds like the above commit >> does that. Why not use the same approach to keep it consistent. >> >>>> >>>>> Signed-off-by: Amit Cohen >>>>> --- >>>>> tools/testing/selftests/net/fib_nexthops.sh | 48 ++++++++++----------- >>>>> 1 file changed, 24 insertions(+), 24 deletions(-) >>>>> >>>>> diff --git a/tools/testing/selftests/net/fib_nexthops.sh b/tools/testing/selftests/net/fib_nexthops.sh >>>>> index b3bf5319bb0e..a99ee3fb2e13 100755 >>>>> --- a/tools/testing/selftests/net/fib_nexthops.sh >>>>> +++ b/tools/testing/selftests/net/fib_nexthops.sh >>>>> @@ -882,13 +882,13 @@ ipv6_fcnal_runtime() >>>>> log_test $? 0 "Route delete" >>>>> >>>>> run_cmd "$IP ro add 2001:db8:101::1/128 nhid 81" >>>>> - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" >>>>> + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" >>>>> log_test $? 0 "Ping with nexthop" >>>>> >>>> Looks like the change uses "-w deadline" - "-W timeout" might >>>> be a better choice if ping fails with no response? >>> >>> We usually use "-w" in ping commands in selftests, but I can change it if you prefer "-W". >>> >> >> I will defer to networking experts/maintainers on the choice of >> -w vs -W >> >> I would like to see the timeout configurable. > > If you feel strongly about that, I can send another patch to make it configurable. > Personally, I don't think that someone will use it, and from our experience, 5 seconds seems to be enough. > Please make this configurable. It will be consistent with other tests. thanks, -- Shuah