Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1038512rdb; Sun, 1 Oct 2023 17:31:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGFZ1djVcD64/SlYDH7DJ2z73TgdVwN/0EqS9ZmhjL5VJzIcvoPKq8PsBl1iqrdD3bZSTmq X-Received: by 2002:a17:90b:17cb:b0:273:cec7:23ee with SMTP id me11-20020a17090b17cb00b00273cec723eemr9836367pjb.37.1696206717956; Sun, 01 Oct 2023 17:31:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696206717; cv=none; d=google.com; s=arc-20160816; b=O/uq54zvaSJPGJb+VGvSNx8Ttbj67EajwcmZK7zU+y9ovjqnDmFDWQpIZIXKmyhwyk C/ILaOFARUtBwQXG+Cez9xCB+2q9crgejDNJktjBoRqFdHmuwhPxfxe61nxVEidQwS4Y vcFglQxNZS7FhWKgDJf884K8cawe/fO9+0yLQbsLkXsWe2qV3PaH8R9Gy0TiuHOk4FM1 GLjcgbpGVXq1MU9mfmaM+bNsRwUCE340gqqMmKfgGBWhwSiIp42IJB8iMzfDencR1cxh Yr+L/mKFIJnhid720eEbWduNnpTc0WksKe+DI+WCjC0C64R2JEJ21prJepkHW9KfpHy9 FJkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature; bh=mEMutYlrVNpsSg7pWqpRwU1aONJ27VWy6905pdrkIqI=; fh=4leAS1cTHSAW2R5Ku9ugggJPMduq/0d0/uWC76z41LU=; b=P5PUdBgr1LQnXQhhkYfInD7m2fCldoR8HiWGskqeOo/7CkW7prU1g3m8pxcZjP6rDT 4LBm4bdUv5xnn8v0qISZPXMEKdLwLb5g2ZBtY69wTonSSApDCHIMiQezIV67sxZ0UcFt KbjPgJIgibzEASG2OJSxsbAFuD4o2wQbLs4rxemU8p8ELyAhPHqXjsXrbj6NQcYWhlss 7GWzecykDQao+fErO3CHAmEN62E4abbzBBpFQ1y5IfQsYWl5omkiIzX6zxr2i4VvoLQV 8Gh8UKNccK9mvL7flIbsnXXNtG5PPwh11qd9JRrDEc4jzzy7lTCQt1Hub6CDOlhC18wy C+zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b="clRr215/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id jp10-20020a17090ae44a00b0026b09e2e3eesi4767841pjb.47.2023.10.01.17.31.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Oct 2023 17:31:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b="clRr215/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id BFC348084597; Sun, 1 Oct 2023 07:52:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235080AbjJAOue (ORCPT + 99 others); Sun, 1 Oct 2023 10:50:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230173AbjJAOud (ORCPT ); Sun, 1 Oct 2023 10:50:33 -0400 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 267D3A9; Sun, 1 Oct 2023 07:50:28 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 0F0B75C2C29; Sun, 1 Oct 2023 10:50:25 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 01 Oct 2023 10:50:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1696171825; x=1696258225; bh=mEMutYlrVNpsS g7pWqpRwU1aONJ27VWy6905pdrkIqI=; b=clRr215/arKhXy6mDtuOWYOvKNH/O plIeU3G7c7h4aFie7RVwb33h4LHvbvXn8zJTz7R/3xSWD3WDLq/ute/eGezCWVzh OYgi2D2hI+xO/W4R/g9Ehrv3uDTZGHYqKCHK5euZ7aUlZjbhaGJBu+ajulSSCfPT 6rHnYNeCj6Fqw46XpFYRxCPT2DY7Kuk5luqvn0oJ5z690YucYgeEPWot3FAYc+Kc x0IeNhdqKgTDY5zJEHmMiQ+F2DkGXsrG/1N3LJ4d8XtaerOMjaZoX0zRq1a2LDwN /y3a6pMLqHSv1uF6jRYtOmtOzxy0P0cwCJr2guHVHloRN5oQNH5JJ9/eA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvddugddulecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehttdortddttddvnecuhfhrohhmpefkughoucfu tghhihhmmhgvlhcuoehiughoshgthhesihguohhstghhrdhorhhgqeenucggtffrrghtth gvrhhnpeetgeejteeivedvheekgeeiheehvedvveefgffgudekgfffheehgeeivdejgeei udenucffohhmrghinhepshgvlhhfthgvshhtshdrnhgvthdpkhgvrhhnvghlqdhsvghlfh htvghsthhsrdhnvghtpdhkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpedt necurfgrrhgrmhepmhgrihhlfhhrohhmpehiughoshgthhesihguohhstghhrdhorhhg X-ME-Proxy: Feedback-ID: i494840e7:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 1 Oct 2023 10:50:24 -0400 (EDT) Date: Sun, 1 Oct 2023 17:50:20 +0300 From: Ido Schimmel To: Sriram Yagnaraman , oliver.sang@intel.com Cc: "oe-lkp@lists.linux.dev" , "lkp@intel.com" , "linux-kernel@vger.kernel.org" , "David S. Miller" , "netdev@vger.kernel.org" Subject: Re: [linus:master] [selftests] 8ae9efb859: kernel-selftests.net.fib_tests.sh.fail Message-ID: References: <202309191658.c00d8b8-oliver.sang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sun, 01 Oct 2023 07:52:30 -0700 (PDT) On Mon, Sep 25, 2023 at 06:18:34PM +0000, Sriram Yagnaraman wrote: > CC: Ido, who helped a lot with writing these tests. > > > -----Original Message----- > > From: kernel test robot > > Sent: Tuesday, 19 September 2023 10:32 > > To: Sriram Yagnaraman > > Cc: oe-lkp@lists.linux.dev; lkp@intel.com; linux-kernel@vger.kernel.org; David > > S. Miller ; netdev@vger.kernel.org; > > oliver.sang@intel.com > > Subject: [linus:master] [selftests] 8ae9efb859: kernel- > > selftests.net.fib_tests.sh.fail > > > > > > hi, Sriram Yagnaraman, > > > > we noticed two new added tests failed in our test environment. > > want to consult with you what's the dependency and requirement to run > > them? > > Thanks a lot! > > Sorry for the delayed response. I will look at this and get back. > I am not an expert with lkp-tests but will try to set it up on my local environment and reproduce the problem. > > > > > Hello, > > > > kernel test robot noticed "kernel-selftests.net.fib_tests.sh.fail" on: > > > > commit: 8ae9efb859c05a54ac92b3336c6ca0597c9c8cdb ("selftests: fib_tests: > > Add multipath list receive tests") > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master > > > > in testcase: kernel-selftests > > version: kernel-selftests-x86_64-60acb023-1_20230329 > > with following parameters: > > > > group: net > > > > > > > > compiler: gcc-12 > > test machine: 36 threads 1 sockets Intel(R) Core(TM) i9-10980XE CPU @ > > 3.00GHz (Cascade Lake) with 32G memory > > > > (please refer to attached dmesg/kmsg for entire log/backtrace) > > > > > > > > > > If you fix the issue in a separate patch/commit (i.e. not just a new version of the > > same patch/commit), kindly add following tags > > | Reported-by: kernel test robot > > | Closes: > > | https://lore.kernel.org/oe-lkp/202309191658.c00d8b8-oliver.sang@intel. > > | com > > > > > > > > # timeout set to 1500 > > # selftests: net: fib_tests.sh > > # > > # Single path route test > > # Start point > > # TEST: IPv4 fibmatch [ OK ] > > # TEST: IPv6 fibmatch [ OK ] > > # Nexthop device deleted > > # TEST: IPv4 fibmatch - no route [ OK ] > > # TEST: IPv6 fibmatch - no route [ OK ] > > > > ... > > > > # > > # Fib6 garbage collection test > > # TEST: ipv6 route garbage collection [ OK ] > > # > > # IPv4 multipath list receive tests > > # TEST: Multipath route hit ratio (.06) [FAIL] > > # > > # IPv6 multipath list receive tests > > # TEST: Multipath route hit ratio (.10) [FAIL] I found two possible problems. The first is that in the IPv4 case we might get more trace point hits than packets (ratio higher than 1) because of the additional FIB lookups for source validation. Fixed by disabling source validation: diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh index e7d2a530618a..66d0db7a2614 100755 --- a/tools/testing/selftests/net/fib_tests.sh +++ b/tools/testing/selftests/net/fib_tests.sh @@ -2437,6 +2437,9 @@ ipv4_mpath_list_test() run_cmd "ip -n ns2 route add 203.0.113.0/24 nexthop via 172.16.201.2 nexthop via 172.16.202.2" run_cmd "ip netns exec ns2 sysctl -qw net.ipv4.fib_multipath_hash_policy=1" + run_cmd "ip netns exec ns2 sysctl -qw net.ipv4.conf.veth2.rp_filter=0" + run_cmd "ip netns exec ns2 sysctl -qw net.ipv4.conf.all.rp_filter=0" + run_cmd "ip netns exec ns2 sysctl -qw net.ipv4.conf.default.rp_filter=0" set +e local dmac=$(ip -n ns2 -j link show dev veth2 | jq -r '.[]["address"]') The second problem (which I believe is the one you encountered) is that we might miss certain trace point hits if they happen from the ksoftirqd task instead of the mausezahn task. Fixed by: @@ -2449,7 +2452,7 @@ ipv4_mpath_list_test() # words, the FIB lookup tracepoint needs to be triggered for every # packet. local t0_rx_pkts=$(link_stats_get ns2 veth2 rx packets) - run_cmd "perf stat -e fib:fib_table_lookup --filter 'err == 0' -j -o $tmp_file -- $cmd" + run_cmd "perf stat -a -e fib:fib_table_lookup --filter 'err == 0' -j -o $tmp_file -- $cmd" local t1_rx_pkts=$(link_stats_get ns2 veth2 rx packets) local diff=$(echo $t1_rx_pkts - $t0_rx_pkts | bc -l) list_rcv_eval $tmp_file $diff @@ -2494,7 +2497,7 @@ ipv6_mpath_list_test() # words, the FIB lookup tracepoint needs to be triggered for every # packet. local t0_rx_pkts=$(link_stats_get ns2 veth2 rx packets) - run_cmd "perf stat -e fib6:fib6_table_lookup --filter 'err == 0' -j -o $tmp_file -- $cmd" + run_cmd "perf stat -a -e fib6:fib6_table_lookup --filter 'err == 0' -j -o $tmp_file -- $cmd" local t1_rx_pkts=$(link_stats_get ns2 veth2 rx packets) local diff=$(echo $t1_rx_pkts - $t0_rx_pkts | bc -l) list_rcv_eval $tmp_file $diff Ran both tests in a loop: # for i in $(seq 1 20); do ./fib_tests.sh -t ipv4_mpath_list; done # for i in $(seq 1 20); do ./fib_tests.sh -t ipv6_mpath_list; done And verified that the results are stable. Also verified that the tests reliably fail when reverting both fixes: 8423be8926aa ipv6: ignore dst hint for multipath routes 6ac66cb03ae3 ipv4: ignore dst hint for multipath routes Can you please test with the proposed modifications? Thanks