Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3180091imw; Mon, 11 Jul 2022 03:41:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tisdc+p4ooqxNcjQtfgPw/nl2VWzlq82TQljag7RsqDAZjL11oiC7t4frbMLh6xhPSO1yZ X-Received: by 2002:a17:902:a413:b0:156:15b:524a with SMTP id p19-20020a170902a41300b00156015b524amr18467530plq.106.1657536102707; Mon, 11 Jul 2022 03:41:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657536102; cv=none; d=google.com; s=arc-20160816; b=gZAMM5AAbQmFBuoIrT4jb5dDH7qJSaP1XyGqTqTyQ/nBonFwlogNJ4ycC7srDhSoCE Qdt1SKEU6kx1mO9Ul9t6BzxZc9XhLtK2KDFlhBCSXWk3ECI9WEwL16v9/Dftna1XMfBR 09slatCzzKzhWScsdLldw7KDO2a+0ZxqDpae5S8SSM/lMjj51hMsLFagnOXRO+RNhYOy SKzjkKX6M+y2jWY3qm1qHD/7cIOG7r46SXWP9M/U/nLQFR00yvH0a1CGrha7XwYTGljk BFxFlTaPf+PR5MCBBr6OCQBRsKwSRg6IXMUYcQZipIYKalqnzP5qE//AJMnbU82DEq1K jJog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MJco69bN89OzXqM/Od+F6NLx3vPomoDNxiQic15QU74=; b=LQNBfqHuNHgBOXV9YmQmjlpEl9esQRMpfQeuO3KFlITK8OLg5StDqhOJfX1JgxcUOT 6iYb3/cTFXEjeccefsiE7JGoILnnd01/FdfSwLiYBUKzXylOXYB0pW1MatNHXOyHGVAP hoEAPkgn6CUxj0hgWh06MK9YSxzwZQr694v1cEoUewt3EX8SKq+KskAHimwzxV2vLrvU M++0UU5T7FdUdBD/UUV4OfRp0K2xG/jJrDhABs3UKFIigq1y+GGU4CcMFpddHAYAwAeV Soyhn+tH3jN4V725gTZbJ0eSTm8JV2XapJGRlMd4SCJyHQzUwXKu4kbKkMMNQxJh7PuB E2UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wSb9rBYY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s8-20020a17090302c800b00153ce7c9244si7581413plk.97.2022.07.11.03.41.30; Mon, 11 Jul 2022 03:41:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wSb9rBYY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234389AbiGKKDi (ORCPT + 99 others); Mon, 11 Jul 2022 06:03:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234451AbiGKKCy (ORCPT ); Mon, 11 Jul 2022 06:02:54 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 301165C9C8; Mon, 11 Jul 2022 02:28:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BE39BB80E88; Mon, 11 Jul 2022 09:28:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10884C34115; Mon, 11 Jul 2022 09:28:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657531734; bh=Tusqk7Lmxx7rh/jamATplaHs7GoHvwB/yxhV6tXDDpA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wSb9rBYYZCja/7xNC38W/ZDsFFm/858YLJePFOL26atYUIwuKo+BOknD8n8UtN0Dd IMsJP0AJfdBWyOXuQLYAJgRIgLAhuuYovE4q6e18LGDXkBkBhFe96LVlDRI/yZcmEE FZr4ov1r4Qwy2yLNr2/S0HEKKAvNQn94yHKpPi9M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vladimir Oltean , Ido Schimmel , Paolo Abeni , Sasha Levin Subject: [PATCH 5.15 211/230] selftests: forwarding: fix learning_test when h1 supports IFF_UNICAST_FLT Date: Mon, 11 Jul 2022 11:07:47 +0200 Message-Id: <20220711090610.089221940@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220711090604.055883544@linuxfoundation.org> References: <20220711090604.055883544@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Vladimir Oltean [ Upstream commit 1a635d3e1c80626237fdae47a5545b6655d8d81c ] The first host interface has by default no interest in receiving packets MAC DA de:ad:be:ef:13:37, so it might drop them before they hit the tc filter and this might confuse the selftest. Enable promiscuous mode such that the filter properly counts received packets. Fixes: d4deb01467ec ("selftests: forwarding: Add a test for FDB learning") Signed-off-by: Vladimir Oltean Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- tools/testing/selftests/net/forwarding/lib.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 8a9c55fe841a..0db6ea8d7e05 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -1149,6 +1149,7 @@ learning_test() # FDB entry was installed. bridge link set dev $br_port1 flood off + ip link set $host1_if promisc on tc qdisc add dev $host1_if ingress tc filter add dev $host1_if ingress protocol ip pref 1 handle 101 \ flower dst_mac $mac action drop @@ -1198,6 +1199,7 @@ learning_test() tc filter del dev $host1_if ingress protocol ip pref 1 handle 101 flower tc qdisc del dev $host1_if ingress + ip link set $host1_if promisc off bridge link set dev $br_port1 flood on -- 2.35.1