Message ID | 6470f6c246f6c755b7fe9b249a7ad06c86ea1af5.1529492104.git.petrm@mellanox.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Ido Schimmel |
Headers | show
Return-Path: <linux-mlxsw-bounces+patchwork-linux-mlxsw=patchwork.kernel.org@lists.ozlabs.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 51DD860230 for <patchwork-linux-mlxsw@patchwork.kernel.org>; Wed, 20 Jun 2018 10:58:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4286928E0C for <patchwork-linux-mlxsw@patchwork.kernel.org>; Wed, 20 Jun 2018 10:58:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 374AE28E24; Wed, 20 Jun 2018 10:58:13 +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 8729028E1C for <patchwork-linux-mlxsw@patchwork.kernel.org>; Wed, 20 Jun 2018 10:58:12 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 419hdG34f3zF0xv for <patchwork-linux-mlxsw@patchwork.kernel.org>; Wed, 20 Jun 2018 20:58:10 +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="pKPEzI4v"; 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=104.47.1.43; helo=eur01-ve1-obe.outbound.protection.outlook.com; envelope-from=petrm@mellanox.com; receiver=<UNKNOWN>) 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="pKPEzI4v"; dkim-atps=neutral Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0043.outbound.protection.outlook.com [104.47.1.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 419hd72bDdzF0x4 for <linux-mlxsw@lists.ozlabs.org>; Wed, 20 Jun 2018 20:58:03 +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=pyZryl81mERXWFqaMyHX4toD1ieOnhV64dxnDw3m79g=; b=pKPEzI4v+0AT/jf3KzdGIOaLtzuAeFnO77+r0U9FuhtkB2AlcHTzewI1Xqwj+PRN1sBk9iHD1ORrwMG94Srw9qMvQ4WAMKWIR4RAMKMRjsdR3HctoobUPjCzJ31+D1P7hwcurdFie8cHaVdlVnLLBEEwvclAPsdZO7JT6+5V4D4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; Received: from t540p (78.45.160.211) by AM0PR05MB4179.eurprd05.prod.outlook.com (2603:10a6:208:57::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.14; Wed, 20 Jun 2018 10:57:56 +0000 From: Petr Machata <petrm@mellanox.com> To: <linux-internal@mellanox.com> Subject: [PATCH net-next mlxsw v2 3/6] selftests: forwarding: tc_rule_stats_get: Parameterize direction In-Reply-To: <cover.1529492104.git.petrm@mellanox.com> References: <cover.1529492104.git.petrm@mellanox.com> Message-Id: <6470f6c246f6c755b7fe9b249a7ad06c86ea1af5.1529492104.git.petrm@mellanox.com> Date: Wed, 20 Jun 2018 12:57:51 +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: CWLP265CA0097.GBRP265.PROD.OUTLOOK.COM (2603:10a6:401:51::13) To AM0PR05MB4179.eurprd05.prod.outlook.com (2603:10a6:208:57::28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: bdee7ddb-26f8-4988-0894-08d5d69cae0a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:AM0PR05MB4179; X-Microsoft-Exchange-Diagnostics: 1; AM0PR05MB4179; 3:4BgtkPp3KQhJcig3Ekm4vpEYatZFBqmdFbTivcCFb8hfRdqC8O1yvGI6P423D8vRiORpfJdZKeU6FclEHPEdklHXLMYWZ74x6uSTX9OAzQpr1lpqYXY5Z0elmqJuRDF/NhlU9L6donHTN5PNMs8P3S7LjNkWFG/vfrqN7RQjPLfH1RrfoecVEZtkHwTTnRIXCdFv9dCvz6TzDR+ryYowXDMFvcwLPiRSsfLDALjViLUSsEHIodCL+n1hSkSKk+YT; 25:i7Jyk0Nz7qI2FIy5U1fWLVXQ9Tq5Zxxs3DAJA+mckWh8fAclNX5UzJHzE65cPIn/wHI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ZrIQ/9tt3UVYbQp84gkS4lvQAnM7issP; 4:a2BWpi5vwloN9gmPa1lsdtm26pgFYLiyYvIBaAg14LPyOGr3mn/OCyQeGzUiwpOwj4HDjGhinyGlQDYwY6xCLbNfKNok8GF3wJ0+yNurryVuIOiyrtGYU5umfO39/QtO5Y9gycZkiUiLSc8pXd6XRACPNemVsMpMso4ISwEEgJRS5qiLmfZVacAEKbAV1K61jCgGfV5h0CK/s2rKqUOWgxTKUHEiDaQTNGRQIFgPpYtjUu0N05ZAgBvsDBxrc6uaVvCDyH/Lt4UGmBSayUjSTg== X-Microsoft-Antispam-PRVS: <AM0PR05MB4179683459D500A19EB9C0D9DB770@AM0PR05MB4179.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)(8121501046)(5005006)(3231254)(944501410)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:AM0PR05MB4179; BCL:0; PCL:0; RULEID:; SRVR:AM0PR05MB4179; X-Forefront-PRVS: 070912876F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(396003)(39860400002)(366004)(39380400002)(376002)(199004)(189003)(50466002)(6496006)(11346002)(48376002)(386003)(53936002)(2351001)(6116002)(3846002)(26005)(86362001)(16526019)(446003)(16586007)(2906002)(316002)(58126008)(37006003)(5660300001)(97736004)(6636002)(6666003)(36756003)(186003)(956004)(478600001)(52116002)(66066001)(8676002)(81166006)(81156014)(8936002)(76176011)(486006)(25786009)(51416003)(68736007)(118296001)(105586002)(6486002)(7736002)(305945005)(476003)(6862004)(106356001)(2616005)(47776003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR05MB4179; 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; AM0PR05MB4179; 23:4drhKkYuJ0F+upgdsMpNfeCDD+RZsrhlaaAjRknB5?= =?us-ascii?Q?lBh2hixBpx/X51rydsB4mQGSSzJqZEC/dK1kX8bFn7ML8Jel4T31QX7mmYMD?= =?us-ascii?Q?3zfoWXDOSYdgc5zBjH/gtjWOGATpQnM8vQXWmzfsMxhMuUFdS+vqB5q11eZs?= =?us-ascii?Q?B+2Y6JLHL65nu/YjMhCa/4IxWwIQZVAgMxG5QVco2nJbyhSkT8vqCiMsqh21?= =?us-ascii?Q?YqcRUDxgodHqlzIaast+05I6IAAJhzAis7uusfOfIaaHV1R+zPt5jElzh2SH?= =?us-ascii?Q?pX6OlKePTJqgb/PhnCCaWybZYbvUe4fFbp1yrRIqFCCLW0xUCPFiaNl3Z+Wn?= =?us-ascii?Q?mZ/yfav8C3xterAK7MwKsYxBykwQdszQi9yjiKN80K7KBxiCQ15oiBL6uIxh?= =?us-ascii?Q?W+9BiFHiOa1220JkW52D8+P7pPvFw7xf9ggufGar7Spyl8ghyFfJK+fTm/Gc?= =?us-ascii?Q?Jp+blMFqNuuN+eDmKOJ1VBCHfSBLzEB/0ghpjiX2IQmW/9sJJhmSZqiQCfGV?= =?us-ascii?Q?9YD9zNlquXMPgQ7k189Y6yIqQb/nTJJ7WMk2I+foiJKgnv1+j67nZUtxTz7m?= =?us-ascii?Q?ISOUcEmxsSg2MzkHkeg7S8kI7XMp2AL5ogGqs/yYohREKH5Y4CZ7qNASls5P?= =?us-ascii?Q?nD29EAbPPMuDJz5anPDmpANECEasM0Kg8vrWeZtBOZgYUdM8Nsr01O31EQqw?= =?us-ascii?Q?+SDZYBIkkoy7uhdk30hM2GLQy33GrglVPnC4fZRqIPhfv5tvKCSA7f3tNPQp?= =?us-ascii?Q?pJdyk+Pl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NUzsW8KNHi3AJYeZZFqUl/ZrDvo+xpytZFCyE6bnrxhKncqw4fkTp1Ec0PL0BG1xOrE9g4VWdJjpuxNdY9g9QzN3O9d8dl0oKFFB/bvSlep+4winG7CJUrRi3S3gsiOy290oFsu4ijWPK5IPRmlnny7E4F5pDcJFJ3wHQpK5rV1HvmXdktpFkAZTUEZYCJ1T0AGvKesUQb6OksNnZD5Eh+hmo39AMfLj6InEt7KZwB1OCkmmDX1kHtJJDHltSVqkHznQpA1fA5uPCeyGm4d9wuSJq50yXRZUb6GYnZdbWTxxrWHbu14o0xp4sXPRybWrqGnHzn6/KN50f97OsFKxwgTApX3zTNQTIPrc90E4r9YluKCERbJTF8mNoK8ipX1Y2p2tj7RrQ==; 5:2NVlLDNNXpAmYDVQFrPEztIKByc4Q0L73gu90kbO3wMZgQNtl1Rx2spef7i52UhA8tie5GZpTOAuaE6ZtFLq6i77dBANSgYMjKQ6zncHIX2q1y2sSpKbb9MdDB8/dnRhcyI8jZFCl1rgEVj+V96x9/orgUoJsqZyewNxdc7GrVc=; 24:VDXehVNbS/5RybLg+Ui8g6HIjGrvekUDDkd8jCca1a94grR/mrD5TFLdScw1CyMhaGaRWjcqomXNU24p/PtPVbrUAZjiQuXa6Pie0gmPzII= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM0PR05MB4179; 7:2rqIft3ishvn8rx4EfG5ZyZ9ii4rEEc9TxOinFPmthQtuyLa9NCNgymvnHTaoIjVbTJbwrlvIIvcm/QijEQpqFTOdHzIsqWmNaGkEEK/LRcXpTgw0/mIwulqJ4s/nHWxOJ5taBcZ9Wnd0TTtiaaqoBgrnZBfDbmLViG1SxSwFKyFXcgqfS6UxbEA77Mwt/dKQKuJ9mH5PYbtfgjp5uBtbReT7bnUynx+eUy9N3lHPO9HAJwIk/DmkGesQLN6X12g X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2018 10:57:56.3576 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bdee7ddb-26f8-4988-0894-08d5d69cae0a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4179 X-BeenThere: linux-mlxsw@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: mlxsw driver development <linux-mlxsw.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/linux-mlxsw>, <mailto:linux-mlxsw-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/linux-mlxsw/> List-Post: <mailto:linux-mlxsw@lists.ozlabs.org> List-Help: <mailto:linux-mlxsw-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/linux-mlxsw>, <mailto:linux-mlxsw-request@lists.ozlabs.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: linux-mlxsw-bounces+patchwork-linux-mlxsw=patchwork.kernel.org@lists.ozlabs.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index a33d17ed54aa..51e45a2750f0 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -439,9 +439,10 @@ tc_rule_stats_get() { local dev=$1; shift local pref=$1; shift + local dir=$1; shift - tc -j -s filter show dev $dev ingress pref $pref | - jq '.[1].options.actions[].stats.packets' + tc -j -s filter show dev $dev ${dir:-ingress} pref $pref \ + | jq '.[1].options.actions[].stats.packets' } mac_get()
The GRE multipath tests need stats on an egress counter. Change tc_rule_stats_get() to take direction as an optional argument, with default of ingress. Take the opportunity to change line continuation character from | to \. Move the | to the next line, which indent. Signed-off-by: Petr Machata <petrm@mellanox.com> --- tools/testing/selftests/net/forwarding/lib.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)