From patchwork Sun Jul 3 07:36:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12904156 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 25C59CCA473 for ; Sun, 3 Jul 2022 07:37:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231640AbiGCHhC (ORCPT ); Sun, 3 Jul 2022 03:37:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231351AbiGCHhB (ORCPT ); Sun, 3 Jul 2022 03:37:01 -0400 Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20088.outbound.protection.outlook.com [40.107.2.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54A019FF4; Sun, 3 Jul 2022 00:37:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fMQt7hAlLrwGvNFLbwBV50QOpnCJrAY7kORoRCNLr6Jastdu4msv4bT1LeqiqvtQB6Cn/Q7sS0o6hrRFLIJOmmjQ5jHWXhoP/m2ZYFIPMlqcb7tIHf4P0+NAqyJTiVWwLyOth/eVZMwH/GZUVfno8FHXdwKRFpKc5o+tRLcvFQsJChnDs+qS+s23GW5K7NYA9Jrv+9YAKhBEktb3jyGXkOX4s7oPcQAn83oSpfQ9a30557FEmkN+Xom+Kf+GIpB1XMjHy0R5MgFcEZRr20kzud9Q5FPoXF+7W9N/DBPsdCo69otSuNNXCGwj0xpu3YM1r5bXT9cxACHengWiee0B2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pKLcDKPFIFlVrO8oFVa5Ngz1zZZ6bYh2DYPsh+kBMpw=; b=I24ytFN+hHQDEqOvUrA50MiVUjahjHK4X0T3V3y58JGWV7NcBSQFTbq8QCM2ILgOaoqdq8GF1ly+cyAr2ZwWU7pTmv0uQVxSFSpsxslYzSpRJ6bBCiBNHWO640tnTFgqIRku6MPhqWP3BOTa1XxuEGEblvLFbhJ/K93vek+aRDohOkqQd8C3xfv/AoWqiOdCeb6E8IV3AXvwwUzfVhlfunJb79I7ICKw1S358dGO4omAP+nFRTml3L/eX4xGq8sZ5uM/ph3Yj2NVUAcEDYPMwiddJ16RjpmKL35k5bj309nqSYcanGtImcODZqBDyduU5zr1L0HusTB+AP2joL6Lzg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pKLcDKPFIFlVrO8oFVa5Ngz1zZZ6bYh2DYPsh+kBMpw=; b=s0Bbtvv82WCOc+ZG4civegvU3ScFWPuMBRhLUH0JW472Vzp1DdSXmnEWzqNE+LJlRkXFjvMrhOtSOsBPM+jVb7sWwxZFJMeyrAPvfET4Ax+opFkID8xfrKJUPysJ5Y7PF6YfEWh9dIhSBCXx1NLZr047mAUwHwwM+tvrWz8hwRQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by AM6PR0402MB3877.eurprd04.prod.outlook.com (2603:10a6:209:1d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.19; Sun, 3 Jul 2022 07:36:55 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::71b7:8ed1:e4e0:3857]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::71b7:8ed1:e4e0:3857%4]) with mapi id 15.20.5395.019; Sun, 3 Jul 2022 07:36:55 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Petr Machata , Ido Schimmel , linux-kselftest@vger.kernel.org Subject: [PATCH net 1/3] selftests: forwarding: fix flood_unicast_test when h2 supports IFF_UNICAST_FLT Date: Sun, 3 Jul 2022 10:36:24 +0300 Message-Id: <20220703073626.937785-2-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220703073626.937785-1-vladimir.oltean@nxp.com> References: <20220703073626.937785-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: FR0P281CA0018.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:15::23) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f305750b-2aff-480b-00de-08da5cc6cd48 X-MS-TrafficTypeDiagnostic: AM6PR0402MB3877:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sMDP20kX8rrMFySAnRphpHuDHafCU3kv2kga7A+xmVz0bgeSw3e+MamCh3xGIvxeaFXDEJ+Y91GWC5Z9g9S4FAEFsIX3DqfTzzA8is7Fam05zVVS9DnqUIpK7Evt3ZJpO52OyNYx7JLGfc3Kh+Dl5f6RH5Lx+cQgUrvtPUwR6uEA1lSa3jT7r4Y0xoxeqepID/l06AE707WKCV6FPmtVxlmqO9QCQoQAtukB5EP+ZkK4zEsfX7Isjma9bRu+iiZpzq7o+4Kz+5NFtFvmdZ0fpHsRgGMFGyjD7tAfiesS39GfjOcNHJMPQNVbDvsLl3R1DTI0yO10B+iLt9LmVhJc0wUTzNDzzyjWPfPJOcwaPmTJ6rLLB2POBxoRZQogg7MYM01biUcOfsaBMTx3TBNOap0dNitGMmKNvaAm7zqECCv4s+syjzPzr7l2ouajm/H8Ommp8a5SoqHBovWIcF6piF7fyawShvis63tLZfB7cFznP09Iut/s9NNxjOwmVnBHen08/Cu59OCr2oahV02RUxhlxr0xuEfGgV1cMPqEBKN78bvm8jCL5YHfbTV/1pKsKNMdUjBPe3UKtnrwxE8MfYTRZXJMew9BB7rBBgHz0Q3a3mi+ozM7bAf9RFf+PcRc+9mUQmUlcd60AXagU5T2hj115qYOPSzep5qxwZ0lNd5tPi3H6mi1zIvQJZ3SGytqg2m8RcbM+6+A2MC3taidaSHaN6c9Q4RbGkRcEVutwouOpJH3qLYTt/wQ4jnMAyTnIWlmDp9lXfcwYcPNk1C4JK2vqPftM8FJ+rVlf8NqG62Wd/xcpC0/MngEyEV4Edlj X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(366004)(396003)(346002)(376002)(136003)(39860400002)(2616005)(1076003)(5660300002)(8936002)(6916009)(54906003)(4326008)(8676002)(86362001)(316002)(66476007)(66556008)(66946007)(6506007)(41300700001)(6666004)(6512007)(26005)(38100700002)(52116002)(38350700002)(6486002)(478600001)(83380400001)(2906002)(44832011)(36756003)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: D7NHI88Mh4jd3iS5Z6KTOFSNA8pQBbSkzyymaX/We1XyggbBYJicSHuG/t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1aMt1JWNm0FydPbXR2qjH64Wu1s2omTkSsi+IQxAcosNlBT6GIbrShNWzfNYVMlG6A4mLYYvbqebnd5OlFsQgU7Hv1wT52cDvTn7+/s75y/n/pTrbAA5qpMjmeENJtAz/4OQaMMqw299jiai/1KRRAVX4iE26pDNX/dR4f7UHoF8/kvhnbzZAiAwr2EzEmKrS7FteO8k79FH2PNBhmqQiygOsK0DC7Lp7Gh+K2F3Nik4XZ4N/uG08E6eAk/ueE1rYVbxqWpGXlekbWnTozssXHfV7ttTwxeMe6yGWsejxnh6kUilvequoPAYqSrROZuMMbKYMg/eY1T53uesefE8RbqpAR8je81rm09LK6F5gBSA3OEwDz+IAChB24bwN0/9NCzxwHRA23pCeR2vdYRHe2ol3sCxsbJuKv3qHmnfqZN+ZROHqtl8vkgh22knq8mTg69qLT/s+tNuPx8AmAwd6Q== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f305750b-2aff-480b-00de-08da5cc6cd48 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2022 07:36:54.5705 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: k9/LyhqLZICxJPwSESovpRNncymdg/CEMRhFCDdc1L3BjTlsd6mgqH2omtfytoLEK+UR+LvvVXPuvGJ+aBcYeA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3877 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org As mentioned in the blamed commit, flood_unicast_test() works by checking the match count on a tc filter placed on the receiving interface. But the second host interface (host2_if) has no interest in receiving a packet with MAC DA de:ad:be:ef:13:37, so its RX filter drops it even before the ingress tc filter gets to be executed. So we will incorrectly get the message "Packet was not flooded when should", when in fact, the packet was flooded as expected but dropped due to an unrelated reason, at some other layer on the receiving side. Force h2 to accept this packet by temporarily placing it in promiscuous mode. Alternatively we could either deliver to its MAC address or use tcpdump_start, but this has the fewest complications. This fixes the "flooding" test from bridge_vlan_aware.sh and bridge_vlan_unaware.sh, which calls flood_test from the lib. Fixes: 236dd50bf67a ("selftests: forwarding: Add a test for flooded traffic") Signed-off-by: Vladimir Oltean Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel --- 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 37ae49d47853..4e69497f021f 100755 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -1306,6 +1306,7 @@ flood_test_do() # Add an ACL on `host2_if` which will tell us whether the packet # was flooded to it or not. + ip link set $host2_if promisc on tc qdisc add dev $host2_if ingress tc filter add dev $host2_if ingress protocol ip pref 1 handle 101 \ flower dst_mac $mac action drop @@ -1323,6 +1324,7 @@ flood_test_do() tc filter del dev $host2_if ingress protocol ip pref 1 handle 101 flower tc qdisc del dev $host2_if ingress + ip link set $host2_if promisc off return $err } From patchwork Sun Jul 3 07:36:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12904157 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 C03A6C433EF for ; Sun, 3 Jul 2022 07:37:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230506AbiGCHhD (ORCPT ); Sun, 3 Jul 2022 03:37:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbiGCHhC (ORCPT ); Sun, 3 Jul 2022 03:37:02 -0400 Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20088.outbound.protection.outlook.com [40.107.2.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B5659FEF; Sun, 3 Jul 2022 00:37:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JyB3qJDzcAPGUT7MWoK8JmRagNApDCU1yDkUg4GJ9TgUmmeIdHycDYHPIaoajmlocq93VHBPzHqxNwEzhUeISxstDv0tQZYIeV0xW5SwKLwSsAYcmocOpNPXFT+Lv029jXaC38qB/A3r27K+pQZGpYshbUS4amc0E1VFK8JO2XEhouu+5wG6jC5F7LDDUPiTBaBBWs8+P889fC7wXI1KJcAQBn+Nit3F7oqA6IGMmgMPJH5aE+1kIh0H5zvUybj/vxbB+tZd4BqE2lW5gwAhL01qFO9h62wXGC/jgccqrGPOXW/ckWMNqKyZcF670Ec0odqB4ah1AmVM4zJJ/4I61g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eBMvgRoQCWxentnt9dkYMpKMux6duuVxRmYtZvQjmr0=; b=lCDPsb86xLnBga/78OaM2c7SsLj3M0LFGJiyC/k+24ika2gAxyANSGNP1T8n7U1CeZ35HYehb8FsMXYZijxHlDBfO4gNzlk8nyBO+O2rWYQSZe0wOpyGJjNaHDk5lhzVVFikKw2rKnEwtJMPzG4POJiOTj8sZdac/5MyHSYtDZMiFSvX78v7tAqiqnN5J+Lyyoko4OjWj8tHnItPYsG8L3xBq8mPiaFeA0Fj5032QzBr+JkZo971IGpbclLdDP876BKV0uoWX/BY+wXF5Fi01siP41uj1431ywxtImv0oe99dTNgTs2WGIFxJBSikXMeVlM3DlIsUfvIeKEmYrdnhA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eBMvgRoQCWxentnt9dkYMpKMux6duuVxRmYtZvQjmr0=; b=JXC6VLRwsRZBHyifmK1lUH+KwE8JTWFhFbs9v/50F0hQjJM1S+QI1LwsfMJDPJ2fB4EP4Z0MhBnPXszyOrfA+dCX80N9f1NiDFA7RYlzxXj8/3+sHAkk+lurml7Bzsf9J2K0IoC9Hn2pNu8LcEBX6Udai1rJUPuR/SPV8WWYViE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by AM6PR0402MB3877.eurprd04.prod.outlook.com (2603:10a6:209:1d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.19; Sun, 3 Jul 2022 07:36:55 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::71b7:8ed1:e4e0:3857]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::71b7:8ed1:e4e0:3857%4]) with mapi id 15.20.5395.019; Sun, 3 Jul 2022 07:36:55 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Petr Machata , Ido Schimmel , linux-kselftest@vger.kernel.org Subject: [PATCH net 2/3] selftests: forwarding: fix learning_test when h1 supports IFF_UNICAST_FLT Date: Sun, 3 Jul 2022 10:36:25 +0300 Message-Id: <20220703073626.937785-3-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220703073626.937785-1-vladimir.oltean@nxp.com> References: <20220703073626.937785-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: FR0P281CA0018.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:15::23) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3cafd394-9107-478b-8223-08da5cc6cdcd X-MS-TrafficTypeDiagnostic: AM6PR0402MB3877:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xG6bfOUomY1SiwD059rUwF3KeuwSRrYHCdct0B0f8gC31JuV7Oi3WnWM82dAlEykbhZQKcr2qbwfUWwkdMa6hif2XkTErxXSH7yqNn92lUpibCLRYBxKdHuq4k+Xfy8F1fXQLk9Gw1zE53DvWqbisI1IzWnz3YUnDzh8Jr1jykrxhR2sIGYz6CV0U+68mTkfTTVXw9xtiqk2WysMPwX4HrZQMGEFSuUR9zygTmqn0ampMhtvSbwzLjVIzIvE0CLCXwX0Tx02o3Rwe7wY2laGNDY2JuMyIzYvK6bsUzfxluHffZo4DJzD8h0cIxdiD2F6Go8/AZqEV1GBx1veYD8mDIY7BUgtqK0x9Uji/SEZLRzzB3EQfLOPJPrfR5nkLX+ahmSGvcz5X3WOpWN8Kg1z13NnUkDbeUf4iY0aRvPbGy276hS9EOT15bDoGGWcOFLkEm7UNFw3SJ7LfihzLHC3I4bspMOwxixB6THlMtw7c+9qyf8Uqjvi6BCmVKWgNHGBcMMLMeyZ6Wb3hvK1Ak7Hns/yE43FB1MmUaPDYM8MMM5XnZKlUm+98aKhn8lmGAV8a/tKKW6hcyo9LDAGc3DQ/bch4OUlN3urzYk6twmCX9elU5ngVOyfQBLh0PD5YwvcQ+2xupyyi9f+EXDk/aiT3Qaw0eQRIp6BRTe0wwdzSUVhzCYvkvgzNh6yi2bAybhq+js9qekpa6xyrSl90VWKu8j09FPCcrqcaidmGUpon20NlqmSN988cZlwmxH8tB13stef/h7rISVElO4i7iLmmetHK/4ThoJ/v/isonIKDhrrlGP9FM/4XqfSaGKKtQHh X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(366004)(396003)(346002)(376002)(136003)(39860400002)(2616005)(1076003)(5660300002)(8936002)(6916009)(54906003)(4326008)(8676002)(86362001)(316002)(66476007)(66556008)(66946007)(6506007)(41300700001)(6666004)(6512007)(26005)(38100700002)(52116002)(38350700002)(6486002)(478600001)(2906002)(44832011)(36756003)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jaCn227OJvFCf3B8jV+zPrVNJIo03nnZB7zU2ttntBNEDV1jbjo9D5o9vrtaL970oM7eXy5S5wl9JiCey3cjTj0QmGsOF3K1zntY5cRKxqW2D2g/atLnynaaW/I7oqHcy8pzW80zXRjcFPjT8ITOblMzwUmtqhKYeXA/oEfzkmfhUvIWBO//7nriZd7owrK3mLdhAa3nGxlZoGR4pkoy51RMdB6n5TdqR5caWQSzO4EaEjpg+dlFicAzVA4nJbHHiiKkiNVUKmYQ98Qc+dOld7TS9egmG44P5bKJie6L0WGXQgt65cMVtL50DHVVh/GWNVRmlSQ8odyS/IaQAgK7XyS1NwFx46RpQLUunOi5tNfk2tECRsyVBRp2QAn9HUtGE6ou8BM4VmbrMJBqZsM7joORdXX6JQH/4u7Y5YlL1vl5lmHNLzHwXFWx4fBIy5QOaPhw/L7bWli5F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R0ylXBYrMNbwwEpkki+f5ZNIj5qVt0wuBGArjjWs4PgJaTlhDh3ZR7mR3gnIOuqUfuYyac8+nCh2hCgE3Xwo3XapUQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3cafd394-9107-478b-8223-08da5cc6cdcd X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2022 07:36:55.3986 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ctd+Hiksjhjq1t4WTvivqf5BJgxk9u3oXXUgX6E2PxnJ76DngFM4UapUGk59UDDuaZvNRbVCXjQZ8KXnSWRCrg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3877 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org 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 --- 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 4e69497f021f..26ba8b5d264a 100755 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -1240,6 +1240,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 @@ -1289,6 +1290,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 From patchwork Sun Jul 3 07:36:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12904158 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 DFACECCA473 for ; Sun, 3 Jul 2022 07:37:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231726AbiGCHhL (ORCPT ); Sun, 3 Jul 2022 03:37:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231351AbiGCHhD (ORCPT ); Sun, 3 Jul 2022 03:37:03 -0400 Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20088.outbound.protection.outlook.com [40.107.2.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F3089FF4; Sun, 3 Jul 2022 00:37:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OjPMsrTZv3TNHdOsW47KzBG4xB4zUfUVRpsxZ+TJPb5YyKY+2Cq8a5QMl3s3//8A90k09aW9EAWLY38UDuikBuDj65FyWX7oVy4SeQRlE4vw03PqsPC8VsnZTzlEWW7Ijglit/1hnjRO40M+cl8yW5RpOJKaISHW9nVEdrSEVCm5vThqU1sEtZlzu5VMJNVfI9fiTwzpTHWwYqS5vKBOsgYQJRFYlzO3xmMb0SaE0f23ef5GFTzeZxYxqb/xG7mBtIp6nin4SGw/w4Qspio+kWBTPm0AkbMrtczKW7lpzjCspTw7NtmUGiB6rNnsClORMUNWKVjbPYMIEqNCmVpL0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CzZDA8KrFHMhyX26+iKwL9mPxZ7aibS3vTUuyU7rt8U=; b=TxDr2iwq+Ni+iG7QyZqCU8EpzQ8ZgF/lkcfBBICXmr8DH9gAnaKpHZ5fpl+B8aBXZV2mBoIMRgMzxYrclmUJ20EObtZ3W4jN9VGw8twejdujGr7QD7jlSUNoD+ZOqs3ud0URFDqHOVzMwC9rqmWoXMV7QQThtstUAxx9me1AM7fv6sdk2afs3OiWv3n9Yvqqj6ed8jXYv9CETRz0KrLhGTyf6AUqPRNAkX+k1KzbRJ4bW6vqMDNyQom98OpCLxnRoyrZd8/S4vYrqUvOFLzlh33eqMZ7YeYY0aUMu0zrapD5GYa6FBSSePS4d+V/JAM8xiRazK6EcBemX3HWKrQdRA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CzZDA8KrFHMhyX26+iKwL9mPxZ7aibS3vTUuyU7rt8U=; b=oLmDImlZ+Qyu1VsT4I3mtCHcDVuZgmK/HtDdVGkQQIInluM0c+X649PEH1qTK20oMfTlGWRN/DU46fLMdBh6E4edCWAsRJzWGCw4QWYu1no3BCk2Z7fogpN6FSzE1y92+YFPRCvwgaj/XHY/D33XdjZ+1wxoxQt94Slxe880P7U= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by AM6PR0402MB3877.eurprd04.prod.outlook.com (2603:10a6:209:1d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.19; Sun, 3 Jul 2022 07:36:56 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::71b7:8ed1:e4e0:3857]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::71b7:8ed1:e4e0:3857%4]) with mapi id 15.20.5395.019; Sun, 3 Jul 2022 07:36:56 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Petr Machata , Ido Schimmel , linux-kselftest@vger.kernel.org Subject: [PATCH net 3/3] selftests: forwarding: fix error message in learning_test Date: Sun, 3 Jul 2022 10:36:26 +0300 Message-Id: <20220703073626.937785-4-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220703073626.937785-1-vladimir.oltean@nxp.com> References: <20220703073626.937785-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: FR0P281CA0018.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:15::23) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e87ea527-fdfa-4bf3-7a33-08da5cc6ce49 X-MS-TrafficTypeDiagnostic: AM6PR0402MB3877:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KHc20ImQEzsfqO7uiSBJ0NU9H8v9FjDrimFR5fZkhabzT0ADxywl737l1GvXiIsSyiDgg3WBq1Y26SQzxr5IeUMoAZYritD9VUyWy+48qVYg2mOTLzDfGZVgbNclanHwrlq/xXTsRXAWV06mIA+yRh9zdoewxZqBdMxg2coVbKxD3jAEueOj1ftcPrAWfDWKJMEDXWMIENyPgnITk+rig4W1weR/ibd3/fZ2Zp+RmX4OfUNZNU44BY521VBhuniSDyVI3YOgdFUpOEhkw3v1iYjJNuXFZGLONxZoZ/xzxOpG1sO7+6Fw6uJIa6tsKosk39htO5jslBOmksm6++aPZKLlfGXp8UA6bdVbh/Nmiz0h+6WFEHUxXePxtTjdlC4VoCW63gHZHH2ZGmYcZYf7RWBo239DuzvW4KeIJw/j5sdr5IZoTBE76L0PtL0ywPTD05VY6gwCSfjT6ZpTF9LlQ3AxFVibLF37HAHW7h+1WrVyvFERbaWXZLJVhwW8OPv5To3qow9t2oJcdM9JS4AdeOmSOLdyXk090zTMyWHFA5/HHJ9H+DR4GT6izJwXMDxq5Pw7ny6tAOBtPQuLmPiVfyzzeofL/1li125B/SjrMiTzdZy2lfmKs/wLvCt9SMqq5qSBPBPFyzrPcRuT3ze8YwfluJ0lgb6x3RglEy1bJtA/LrYf68LCConFfkiI3TbE1lnetMJwhyZm2aSiuEJiNskgGxFi9VRIiDB44BwaxRrHBLwoTF3l0AKNjn49ZMg8hRSqStQOYkTOCXyWxE4mXQ+u9Ko40NCgvkeETnkKn2jKhUfJhi8cSRn8w/G743J8 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(366004)(396003)(346002)(376002)(136003)(39860400002)(2616005)(1076003)(5660300002)(8936002)(6916009)(54906003)(4326008)(8676002)(86362001)(316002)(66476007)(66556008)(66946007)(6506007)(41300700001)(6666004)(6512007)(26005)(38100700002)(52116002)(38350700002)(6486002)(478600001)(83380400001)(2906002)(15650500001)(44832011)(36756003)(186003);DIR:OUT;SFP:1101; X-MS-Ex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ZdcEsb5+qrZDmSHi9vTvLU1DarK0xi5AzFUUrr/SkoTf0iHwWWaOLdnxoDqI001U3cYNE+8l9LyII2XIuGCva64DAC4+GiUvhydSuxsaSRyBdg5aibE8wIGLa3xkUT04cNUvMAEWeZKVP3Rv7SDdX96gdyDMOjK2/ImZd9HJ7Rv5UtkmDb2Q3hFj/F0j8IIxcCvUKZgaU1+oGjdigDamddrAtOVOF4x0GRokex3rGEQcfPCjhdi770nZXYx48xQcSHsd2iwalE6tELMSWlokEaGUbEAafBq7nwz2bUqWGnNxVomgUcoDuHjJAf2xEGNEdoruXzZPeu1v+Mck7JkddWo9AwDaP6NsG3w4OCyhKdZt99kuXlqnZAP3GYbtKlTMCrxSK9Xln8ZBEyBmJJ+W6Lao2Nmmo4jSDbzdS91ilIg3hAKwoBNfHVet1eGT5t5wcOLWIH/G4RDcBVUhetC1ogLPUPqmW9+dOdUBagVAVbh8/AJ/G5tzvAeLnicM8KaN4PlUZJ6s7aqNSwtHuw7mSvixndAifBwhODcZpwlzXFW4iAesS0r4d7JrM07Ii5yvDluCPvXCBLC791jTIK+2lP4fRSMw1g== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e87ea527-fdfa-4bf3-7a33-08da5cc6ce49 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2022 07:36:56.2423 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IDoNhDuWlnOb0Slio5sXKNWP1QCYQ/xlwXpewSaelEFjpslnYPI+Ec5k/hfMDzfidVSlHj4llGOJ8FtztKDg0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3877 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org When packets are not received, they aren't received on $host1_if, so the message talking about the second host not receiving them is incorrect. Fix it. Fixes: d4deb01467ec ("selftests: forwarding: Add a test for FDB learning") Signed-off-by: Vladimir Oltean Reviewed-by: Ido Schimmel --- tools/testing/selftests/net/forwarding/lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 26ba8b5d264a..3ffb9d6c0950 100755 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -1251,7 +1251,7 @@ learning_test() tc -j -s filter show dev $host1_if ingress \ | jq -e ".[] | select(.options.handle == 101) \ | select(.options.actions[0].stats.packets == 1)" &> /dev/null - check_fail $? "Packet reached second host when should not" + check_fail $? "Packet reached first host when should not" $MZ $host1_if -c 1 -p 64 -a $mac -t ip -q sleep 1