Message ID | 50138197e2d52547bb214ba4a21ef2397a0edf30.1527788672.git.petrm@mellanox.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show
Return-Path: <linux-kselftest-owner@kernel.org> 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 DADF1603B5 for <patchwork-linux-kselftest@patchwork.kernel.org>; Thu, 31 May 2018 17:52:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C891D28ECF for <patchwork-linux-kselftest@patchwork.kernel.org>; Thu, 31 May 2018 17:52:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD32828F30; Thu, 31 May 2018 17:52:28 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5941528ECF for <patchwork-linux-kselftest@patchwork.kernel.org>; Thu, 31 May 2018 17:52:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755923AbeEaRw0 (ORCPT <rfc822;patchwork-linux-kselftest@patchwork.kernel.org>); Thu, 31 May 2018 13:52:26 -0400 Received: from mail-eopbgr50063.outbound.protection.outlook.com ([40.107.5.63]:25497 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755894AbeEaRwW (ORCPT <rfc822; linux-kselftest@vger.kernel.org>); Thu, 31 May 2018 13:52:22 -0400 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=mZRHbmUyzpRxfXxdWqe0yB/5fXY9h0B7gymPsRXmvIU=; b=g9iec08fkgUZRnUczmzArmWf5kroqOEzcKDPKe6nsgcikB5OzQ8ObDT6Xdui0Fd/lR8WNlZivq0rPQHcm0ZnVRhE/BVkxhYWDSIhYR3p5kyuDAwfsext7OkaVJ+LJBlaDsPvWoj1zCqID+PyNDCfsbI03c48cMfy0LIdzLYY7nw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; Received: from t540p (78.45.160.211) by AM6PR05MB4183.eurprd05.prod.outlook.com (2603:10a6:209:40::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.797.11; Thu, 31 May 2018 17:52:19 +0000 From: Petr Machata <petrm@mellanox.com> To: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: davem@davemloft.net, shuah@kernel.org, idosch@mellanox.com Subject: [PATCH net-next 3/9] selftests: forwarding: mirror_lib: skip_hw the VLAN capture In-Reply-To: <cover.1527788672.git.petrm@mellanox.com> References: <cover.1527788672.git.petrm@mellanox.com> Message-Id: <50138197e2d52547bb214ba4a21ef2397a0edf30.1527788672.git.petrm@mellanox.com> Date: Thu, 31 May 2018 19:52:15 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [78.45.160.211] X-ClientProxiedBy: CWLP265CA0210.GBRP265.PROD.OUTLOOK.COM (2603:10a6:401:4e::30) To AM6PR05MB4183.eurprd05.prod.outlook.com (2603:10a6:209:40::28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(2017052603328)(7153060)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DqXHQ2YIEb43q7gPqba0dCHDvJn8njm9HW+ZK2eaHtAwYD6Kh3WVEizK5Ia7wIVt2Fy1mUAC0BT4WEsEdYfxYXL5W8zK/6dPOfS7u7KZhKyHZbjLXhEWDR4hrTSOma/zBFdI4Dl0n9ZiJgGl5PZCPkK/ugqPX1oyGYTV5+BPQXRXXzqKv8v9LFXhwKHw06ticiR8phV0u2dkBV9B+IJKW4czk7UjkefdgedeqKZNmZ1bvPKVrCFE54Vo2wBP3lZ2M51/2enGcEdqVnvGeJ6CPnxE9KaFpGvPBEdPuQ4A3kevbaznapClobGgi0Y8qfzIQhNpreA+88g+bnYR9IwFOJfHe8oIIVg3kWAo8dQexJfRNPIRuDhlITwDufDxRIY+bIZv5SEHhVumX/YkMfRpiOioO0iWETt1YGPFZ; 4:z3BmJ8SOisHFZ0eefRrGyhWLnKSi9cm+/bbz2E1flQXX0ttlrnG2nU24fuKznUuXuO9b9l8EDsdSAOzns6ysK2bANqV3dzI/EcleBaAzY5w/1y/UJ87+9cYZgaJXSDdbyRYyfFORjT28zL/QzyS5cS7HlOdSpDJJ1yL4WIQL+Tpuf7IxwNpXeQiXGbVzuoJbh4fB4pWJSGcdbwwhFJEvyzPaBh0vHt255sPYWtv66ByCnFZou9TLkxzCGy0n9goJpAsTBRAcQGxOYVHdkjrJyQ== X-Microsoft-Antispam-PRVS: <AM6PR05MB4183001FBC2A71403641329FDB630@AM6PR05MB4183.eurprd05.prod.outlook.com> 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)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123564045)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:AM6PR05MB4183; BCL:0; PCL:0; RULEID:; SRVR:AM6PR05MB4183; X-Forefront-PRVS: 06891E23FB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(39380400002)(366004)(376002)(346002)(396003)(189003)(52314003)(199004)(11346002)(107886003)(6486002)(486006)(52116002)(2616005)(476003)(51416003)(956004)(16586007)(6116002)(81156014)(305945005)(81166006)(8676002)(59450400001)(26005)(316002)(58126008)(3846002)(6496006)(66066001)(8936002)(16526019)(4326008)(5660300001)(68736007)(105586002)(53936002)(478600001)(50466002)(25786009)(7736002)(97736004)(47776003)(48376002)(118296001)(36756003)(86362001)(386003)(106356001)(76176011)(446003)(6666003)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB4183; H:t540p; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM6PR05MB4183; 23:/ongdpHlBLARe62hCO/vRZhxClmtWcDgF3CRmSWXI?= =?us-ascii?Q?F+53+vFfOOoCytUkSnwY8/gVS3Wc9X669IgAnbtPanBCMLXRNm7h/pT21Stc?= =?us-ascii?Q?8UyC26I2VQYvaRVruzizwRHyIbMz3seNfa+Z+1SXIY+XtGEgMWVMLAoQvcAf?= =?us-ascii?Q?CbtYA83XWOqgIKzs6LjdYKabzgaueADUJQk8dLE5XIjWTtzUPckr3ZV1z//4?= =?us-ascii?Q?c9nhAQw6LkLJr+mfYlPHdqb7eT/16K/c7nkUA6p/QTPEhw51gCihqx3W3HEx?= =?us-ascii?Q?CxJw73M/lW8Q6cJcL4fajH79D3AX40ZQU91HKGogLyFwAztR+ZuhjZ8HItrg?= =?us-ascii?Q?/6NOYdTk8SRBJU91C0cgBwopLCrjSiEO+vygj8R6vLCWrxc92GNgTWGDLI+d?= =?us-ascii?Q?bumGSpTaCbXhXLY/YCCc6aJzLbexgmA8tN3motC34qrUWRVdRHhFNxcV/yTV?= =?us-ascii?Q?3OWCwxKAeqzvuPBpniJ9p2N+UBIe5GOtBTg/Gg1KBACNqDLYzRa6z63jGfXK?= =?us-ascii?Q?OpkSbQrHikI0le6+PjOZcw6Obp9W11RfSme4OnO+LyWdzqSdHiRG6RCEFT19?= =?us-ascii?Q?1XzW+M1mI4BiEXeop6npYjmuPvEIa3DElYKNjyP24VXdYO4zVjvxoT+V+fVn?= =?us-ascii?Q?HGNcP4iF6elSAbofUh4iS8CsYsf0ULSfoOSla1OabqyRMpQuMWHG4MTtEHWo?= =?us-ascii?Q?EpkdVDtq0nEHHF6+hYaohr7HCG7dq2PfM8typg3TzzE8JbcmEZ0DC6k0HmIy?= =?us-ascii?Q?4JKHmvln8C31NmIDWENiCL9uYht6lyhp1J4mjdDS3+RygethrwkTYzoT2FMb?= =?us-ascii?Q?aN27b7ztesANFuU522jDstA9zEiLlQFq000fYays6nCop2AJYfXJhR7hi3xe?= =?us-ascii?Q?s+v+o2HeC2LuWHsaSDuEvUA3x3/eVgtQjZB0faTlLD9XPLm2fYfp8TK/Hs3c?= =?us-ascii?Q?fVnZoMY4icpnKw1Kb3ZZQUkN36N/eI7/jmazyly2qshXUUsXxFdoZMgHhAwk?= =?us-ascii?Q?uDStHnbCGgS6YwjrfJpTZlTgJTaLYS+8Qjrvv7m4KdbogH9qYxnsKk3G7pMg?= =?us-ascii?Q?br4sgzLuGpvdwN8vg8e3dk/niqYxp8i/ulPeoVLAbIxR8CzYeqKrpqzc45HA?= =?us-ascii?Q?zMyofYzgkcs06r5N5UJa9IN6BCQxCspHCv0vq11wdIAE/+go3E2sP654vy+R?= =?us-ascii?Q?cUVuNWzvJopVcv/9cJGjFc0Q4kjMok9QWADzAX7PhwEMLxFEXIaytVpbQ=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Antispam-Message-Info: 0vk/PeS2QkiHBMfG2L5HiANunp2vlSq3idEqiCRtwM9ruvF74nkiTUjR8p7tXkV61mSQVr1yLKbqn/It/yjFokZoZABXaGyX8vEvCdFOVDZcH3a5nF3CHlknYB5AWKiELBt+rwU+nsc83oaa668RsrjatSlC+Fj71RLXZKKcqlpfAHPc+ivnoUoUsohfJere X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4183; 6:CS+Qv6acp335e6Plt5+IUB5f+11VBFXjb9Em55I9fCkIW1j0+hiezCy55AXmRz4zVoY5jbPXh/YOYMEbc2U3IxDzY9p1u5UDNRboPnICTXW6IXa9DjZ04P+Lbc2lCdsWh45B0xRiReWOyntZhbbbgys9ihJZ80bsUwQRwnGGKySNwks58m+oFUwAbXka6kvcJpM9fH11crnOOqqVkLNr20m0q6yNu6k5r1Iy9r3P/jzgO2srvdWeEh+ekuNwfirlOJ3nzQDRUFlvu8xXGQXw+V22KN7InZANFbDL/4W87HRzC4lb1xm66q9XRwoCVODdahd//lw3x3qRJSagkT8u4ZYgWKBHHByPFMYt3U+ARujGznPPh7wy52KOoIz6CF9Rbbc1dbRKPXg550u3COkPkrk7bm5wnF0OOXUcw9RzO619Y7I40TITHbPbbfgiwkVn+ohye2skJWIGMNkx7Ev5Mw==; 5:8Y7NSKIXTMEFl3jMdM6No/Wed1NrFtpina4J7hpSLetgG5UiKxfjPjbw62cmmmlTK6C1mfrUCZKS9HGTs7Tjbi11Ccz6rFxu5cq4JQNuMcZp6na0pd+G9+NCdx9hW+mwa9uG1kNHCSwHiRMth7Y+AtWoiM67HEXcoqICFID5OGM=; 24:Ij4D54GAn4MFYNmAa4oHP+bFL2FmE+cryaCXfc/IiRKoHX0icvE9fekPVDFMp+FSJpGWwBSvMKD9WLHEtFwXfDfbAjyY45iCVuDrm85X+R8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4183; 7:AqFCoEau7BPyAHczgPO0VPPEJJb2OAyn1Wfhsj1vctELrsGeauaFK32RelN4rgRk98Vf0QeHcj5dThjBLYdRx00fiP3NfJ9sp1FAH4it+jLNi9sXWvgrPKEuHa9vaOCj6WbhbNsZw2Zdn99DW0hPODs2lWmigTDJnBmXcMOfYG8cogUy7nr1zv+cVZ92/7Phrng6FdSDnqoG4OY8qiZC13q9MzPFpiIlHiLf9+0f046uQl/PlVYk2ESjWdhJDipg X-MS-Office365-Filtering-Correlation-Id: a2c8a725-889b-4dbd-fa08-08d5c71f4197 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2018 17:52:19.7280 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a2c8a725-889b-4dbd-fa08-08d5c71f4197 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4183 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kselftest.vger.kernel.org> X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/tools/testing/selftests/net/forwarding/mirror_lib.sh b/tools/testing/selftests/net/forwarding/mirror_lib.sh index 67efe25..d36dc26 100644 --- a/tools/testing/selftests/net/forwarding/mirror_lib.sh +++ b/tools/testing/selftests/net/forwarding/mirror_lib.sh @@ -102,7 +102,10 @@ do_test_span_vlan_dir_ips() local ip1=$1; shift local ip2=$1; shift - vlan_capture_install $dev "vlan_id $vid" + # 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" mirror_test v$h1 $ip1 $ip2 $dev 100 $expect mirror_test v$h2 $ip2 $ip1 $dev 100 $expect vlan_capture_uninstall $dev
When the VLAN capture is installed on a front panel device and not a soft device, the packets are counted twice: once in fast path, and once after they are trapped to the kernel. Resolve the problem by passing skip_hw flag to vlan_capture_install(). Signed-off-by: Petr Machata <petrm@mellanox.com> --- tools/testing/selftests/net/forwarding/mirror_lib.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)