From patchwork Thu Jun 28 13:16:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 10493935 X-Patchwork-Delegate: idosch@idosch.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3827B603EE for ; Thu, 28 Jun 2018 13:17:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22F3C2A020 for ; Thu, 28 Jun 2018 13:17:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 167FF2A037; Thu, 28 Jun 2018 13:17:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 523C72A020 for ; Thu, 28 Jun 2018 13:17:08 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 41GgKr6gZ7zF1Pr for ; Thu, 28 Jun 2018 23:17:04 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="HONf7PAT"; dkim-atps=neutral X-Original-To: linux-mlxsw@lists.ozlabs.org Delivered-To: linux-mlxsw@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=mellanox.com (client-ip=40.107.5.48; helo=eur03-ve1-obe.outbound.protection.outlook.com; envelope-from=petrm@mellanox.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="HONf7PAT"; dkim-atps=neutral Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50048.outbound.protection.outlook.com [40.107.5.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41GgKb2KhdzF1Pr for ; Thu, 28 Jun 2018 23:16:50 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6QzpZGQo+2VdGr9JZggpvMtoXQnPnO7H8xgD4M+nsnw=; b=HONf7PATXybegWs10TJh0H9KPRcrO3NFN0BPw+sLgNV/sYNhcPXZv/DSxG+prcpfH3KfASuXiVsVZo/p28+W5OSi4clcGSF35Q77BLyx4IFRVe2mOe+k8GJ2HVDz7eGNsH3a1SIR9jfPynnZmDX4PCTcGFI5Y/uwNamEqZ3nzL4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; Received: from t540p (78.45.160.211) by VI1PR05MB4190.eurprd05.prod.outlook.com (2603:10a6:803:4e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.23; Thu, 28 Jun 2018 13:16:43 +0000 From: Petr Machata To: Subject: [PATCH net-next mlxsw] selftests: forwarding: mirror_lib: Tighten up VLAN capture Message-Id: Date: Thu, 28 Jun 2018 15:16:33 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 X-Originating-IP: [78.45.160.211] X-ClientProxiedBy: VI1P18901CA0007.EURP189.PROD.OUTLOOK.COM (2603:10a6:801::17) To VI1PR05MB4190.eurprd05.prod.outlook.com (2603:10a6:803:4e::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6cc9aae6-d3f3-457a-8839-08d5dcf96456 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600026)(711020)(48565401081)(2017052603328)(7153060)(7193020); SRVR:VI1PR05MB4190; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB4190; 3:bSzp0YdVJigsmqTPBEusdkq1tvKjLsM+/iUowJz9t1TTY7RJpOE5o+JvyN30EP0ALYQq8P4LCKX3blLqOV/oSzMmGUb0RzjyRJC8rwJuso3pV1yKjF5HMJ5fYkfCEoYcXEY1oysRK5EuGQKtotqYgSB+Kjh+M0mhaLKEC28pGvOx/+3Odl/HHE2fVvaIC54hmjVpdp0KUUQIA00mFnXFLes9lsUKXL2jWlDFyY0VKO3Pwl+GaTbCYdW2rJGVwQr+; 25:dUMS1SzxPslgAu5EJ+O7wT6lo/yubCRa9CE85hWsZOiGycXnzHUGjludiHBbN/jI3cigRRJiMRBB9WZg4oC7SXtn6k6qp0CFZFoN98le/V6SMf1eU9o1Tx9r8y7n90KrM0UPe39BV1h9htGYmIJW4ZA48twsywU2MZrRQ6A9kkRixfgEs9GfFKKqnY0+gGCQopqfnwvkwVPScCMuHeEz/CWUjN+v++IaQfx8YInWzxFl7nM+WxGm9Fk5txUIFeeFkUFz+74ajK3tGdjtruVx9wJfGDHabU8d35h0FH617vsGfm4s52rzNhT1TIsU+GdrgrZN4tV85YVupb3VLZr/8g==; 31:697NZtuBqrs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pNV1A== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:VI1PR05MB4190; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB4190; X-Forefront-PRVS: 0717E25089 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(346002)(376002)(39860400002)(396003)(136003)(199004)(189003)(52314003)(6862004)(53936002)(478600001)(47776003)(486006)(6496006)(66066001)(386003)(26005)(186003)(51416003)(16526019)(52116002)(2906002)(14444005)(6666003)(5660300001)(6486002)(6636002)(2351001)(68736007)(118296001)(36756003)(105586002)(106356001)(81156014)(81166006)(50466002)(48376002)(8936002)(7736002)(86362001)(305945005)(25786009)(8676002)(97736004)(2616005)(476003)(316002)(37006003)(58126008)(956004)(6116002)(3846002)(16586007); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB4190; H:t540p; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR05MB4190; 23:jsDtp1r4jM7Y9mk+l3t8fNn7XjVPSuhN9v7lSHFth?= =?us-ascii?Q?265QZlDF3p+A/4fUlgSnpEFxVomQdJyy8YTjJ66+rXsbTzafW6Y6Wl9IigAI?= =?us-ascii?Q?wSMk9M/hcju/pRlOvbl7gN5SeuYPEuN7BAeDRK4Ml8ifbOmtpLgLqlHjkIrJ?= =?us-ascii?Q?AUhaAtwPR9KznDzhRAZL/5D7f+Hdy9O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y8wKEN/1vGSqawt9cY3gbmEuNfkgzsUe13nCy6qdcpb1+HJNlykJco9HtIMxDsOfE5/Q6W3XYGkqBHVM8ccnLLboNuRNbEqt7u6UO/syysOfQ/5JrLT6JdHhI66GYSKb2tMTsAj1nf/hNOs2pmAxjlqCuq76FkX4MZZhMuc=; 24:AL/jruf+Pmroj5KipCUIMLqElwRjYFaEW2lq/oueI1RZ2B2G5jMdxZcVipBMqxxC8AEENDm1lYbk5TgMWm/oNJZSntIkHl1S0j76F6xW8cM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB4190; 7:0cbeLZb4885+pKKHpMPhbZP/qdLPu06bh88lpx/f0pk7h8SIE8jkJEOuRg6p1foOLtg/HNBRKls3g0ncEXuPUfsg2AWoAHCFcEjFuEFbv3Gz31hrLH3fQ/Fx6z6Q8vzLcmPxMEJ78gZuRVdrbBw+h+I9PfqlZYA9c/73AGIhnuKRwPz3H8EXvLpp513qP0S7SI/JBGGFxj6hxSkUir7xTW7D7k65HP+T4PQF1z0d+dV+pvnfr9+3DJ6R1G0ZX4uR X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2018 13:16:43.0372 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6cc9aae6-d3f3-457a-8839-08d5dcf96456 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB4190 X-BeenThere: linux-mlxsw@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: mlxsw driver development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-mlxsw-bounces+patchwork-linux-mlxsw=patchwork.kernel.org@lists.ozlabs.org X-Virus-Scanned: ClamAV using ClamSMTP The function do_test_span_vlan_dir_ips() is used for testing whether mirrored packets are VLAN-encapsulated. But since it only considers VLAN encapsulation, it may end up matching unmirrored ARP traffic as well. One consequence is a rare failure of mirror_gre_vlan_bridge_1q's test_gretap_untagged_egress. Decreasing ping cadence in mirror_test() makes the problem easily reproducible. Therefore tighten up the match criterion to only count those 802.1q packets where the next header is IP. Signed-off-by: Petr Machata --- Notes: This should fix the other regression problem. Ido, please enroll to combined_queue for a regression run. tools/testing/selftests/net/forwarding/mirror_lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/forwarding/mirror_lib.sh b/tools/testing/selftests/net/forwarding/mirror_lib.sh index d36dc26c6c51..07991e1025c7 100644 --- a/tools/testing/selftests/net/forwarding/mirror_lib.sh +++ b/tools/testing/selftests/net/forwarding/mirror_lib.sh @@ -105,7 +105,7 @@ do_test_span_vlan_dir_ips() # Install the capture as skip_hw to avoid double-counting of packets. # The traffic is meant for local box anyway, so will be trapped to # kernel. - vlan_capture_install $dev "skip_hw vlan_id $vid" + vlan_capture_install $dev "skip_hw vlan_id $vid vlan_ethtype ip" mirror_test v$h1 $ip1 $ip2 $dev 100 $expect mirror_test v$h2 $ip2 $ip1 $dev 100 $expect vlan_capture_uninstall $dev