Message ID | 20181119161006.5405-7-idosch@mellanox.com (mailing list archive) |
---|---|
State | Accepted |
Commit | d1038cd0f67e542f2744782f958b95c4909fb63a |
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-2.web.codeaurora.org (Postfix) with ESMTP id C68E317FE for <patchwork-linux-kselftest@patchwork.kernel.org>; Mon, 19 Nov 2018 16:11:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B71ED2A0DC for <patchwork-linux-kselftest@patchwork.kernel.org>; Mon, 19 Nov 2018 16:11:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AAF972A0FD; Mon, 19 Nov 2018 16:11: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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 94F0F2A0DC for <patchwork-linux-kselftest@patchwork.kernel.org>; Mon, 19 Nov 2018 16:11:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730015AbeKTCf3 (ORCPT <rfc822;patchwork-linux-kselftest@patchwork.kernel.org>); Mon, 19 Nov 2018 21:35:29 -0500 Received: from mail-eopbgr10049.outbound.protection.outlook.com ([40.107.1.49]:48096 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729935AbeKTCf2 (ORCPT <rfc822;linux-kselftest@vger.kernel.org>); Mon, 19 Nov 2018 21:35:28 -0500 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=LeTYR4u0CSF9dUA+WR41FzRqmJpyqOmqkTxL5a0KGFE=; b=NL4/o4nsRcHcpnVBni+GG8+DGB/gJy/OD3e0uXbzHWGQ/oKx2BFaiWeAzYo2WuvxrgPYC5D2jCIRsNBHPqmsoWzeP3b9/lRTsPCeDdyy3BpdgRiiJXvg7h5LMZH8Jb/JQXUVzPh3oHBLY6CdNHZMTdn9sde4D52tTQbk5yU/+d4= Received: from AM0PR05MB4978.eurprd05.prod.outlook.com (20.177.42.95) by AM0PR05MB6225.eurprd05.prod.outlook.com (20.178.115.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.30; Mon, 19 Nov 2018 16:11:13 +0000 Received: from AM0PR05MB4978.eurprd05.prod.outlook.com ([fe80::f953:cde4:ff8d:501a]) by AM0PR05MB4978.eurprd05.prod.outlook.com ([fe80::f953:cde4:ff8d:501a%4]) with mapi id 15.20.1339.026; Mon, 19 Nov 2018 16:11:13 +0000 From: Ido Schimmel <idosch@mellanox.com> To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>, "linux-kselftest@vger.kernel.org" <linux-kselftest@vger.kernel.org> CC: "davem@davemloft.net" <davem@davemloft.net>, "shuah@kernel.org" <shuah@kernel.org>, Jiri Pirko <jiri@mellanox.com>, Petr Machata <petrm@mellanox.com>, "roopa@cumulusnetworks.com" <roopa@cumulusnetworks.com>, mlxsw <mlxsw@mellanox.com>, Ido Schimmel <idosch@mellanox.com> Subject: [PATCH net-next 06/18] selftests: forwarding: lib: Add link_stats_rx_errors_get() Thread-Topic: [PATCH net-next 06/18] selftests: forwarding: lib: Add link_stats_rx_errors_get() Thread-Index: AQHUgCJ+QF9PmuuRa0y3VYFVzKvldw== Date: Mon, 19 Nov 2018 16:11:13 +0000 Message-ID: <20181119161006.5405-7-idosch@mellanox.com> References: <20181119161006.5405-1-idosch@mellanox.com> In-Reply-To: <20181119161006.5405-1-idosch@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM5PR0601CA0031.eurprd06.prod.outlook.com (2603:10a6:203:68::17) To AM0PR05MB4978.eurprd05.prod.outlook.com (2603:10a6:208:d0::31) authentication-results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM0PR05MB6225;6:t54ROZkOvsm54MdhYcHH5mktde5dMgpXEnxvb4+fk9AI/tKgsVSLO4A3yUzbIKysue3yq3S5D+J+Yn/uhfxvAQ3Le7fnz3uJTPFatLdsaQ7KTgQw3KXxdbj//mheKvp9iA0LMassCV2WPOhZF0fSQySeE3U63c/lqjXl5H1PWbfgfg7idq3ypZSwpQnx6a+gPtNC6HoZEj5LJOlA+t+PytiSXqZk2R/reid/+DqeXywZBdviz/4CukJ4P4vWCarRmOgCNaEBYIzpw33TUmr1Ou7VJJk7DAavf60zYtCPjrBMvSbzY408xhodOWibfSH4HIoUYW+Pl7WGMSTcix1jal38c9g85TL0OzJPYPCxlUo96Y7MMs2x9NvH6xTeyKeUcY1rwCCN3QaJEUekpZC0xwJPpSlYqsrAGPmjf7zVjTMYgQuM1rzXjhlOYU+SEDuIMfcs4qua7a3yxDfJ+LfT6A==;5:J2RH2uNsQoH+V0kt8Tdtc5vTeOx9GeeMWJyS4SXfEX+Cn5nhg+qOZPDPRrVbtfvyCl/M0jeb2ujEC6CtbLasmpz+giMDhpY3gqWnzZI6d58I30PUPok6TIzt9MIdmPEaGgQAe3oQJYEFxYQ4l5ZRvuwhEvsOBr4FwyNaScg170g=;7:MR0p1lkUiGv3zaZRbxlD38aiY+MjBu8GuvZV/KxU3f9nJLCiTqkFiUj/beLzZ5JA0OJpBR39kyL2l5gk90JtaXwWfkZutannfck0P9hItdaz+8a+BykPV1iWnQawS3TUIB6alATFsryanPOG2E5eyA== x-ms-office365-filtering-correlation-id: 17cda732-d1e9-425c-b553-08d64e39a09a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:AM0PR05MB6225; x-ms-traffictypediagnostic: AM0PR05MB6225: x-microsoft-antispam-prvs: <AM0PR05MB62250A4240B32651BD396B60BFD80@AM0PR05MB6225.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)(93006095)(93001095)(10201501046)(3002001)(3231415)(944501410)(52105112)(6055026)(148016)(149066)(150057)(6041310)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:AM0PR05MB6225;BCL:0;PCL:0;RULEID:;SRVR:AM0PR05MB6225; x-forefront-prvs: 08617F610C x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(136003)(39860400002)(366004)(376002)(396003)(189003)(199004)(71200400001)(71190400001)(478600001)(110136005)(54906003)(316002)(386003)(102836004)(14454004)(2906002)(2501003)(107886003)(26005)(97736004)(25786009)(256004)(4326008)(53936002)(6512007)(105586002)(68736007)(106356001)(1076002)(8676002)(186003)(3846002)(2900100001)(446003)(6116002)(6486002)(7736002)(6436002)(486006)(305945005)(76176011)(52116002)(2616005)(6506007)(36756003)(99286004)(66066001)(81156014)(81166006)(11346002)(86362001)(8936002)(5660300001)(476003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR05MB6225;H:AM0PR05MB4978.eurprd05.prod.outlook.com;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-antispam-message-info: JbmUe+LvdtuuBfBO0VPgq6479otOO0GscPdkE8CW7/noLrKq5mtajEabaFFY5BqhGEPtMFgfzP76w+joiBhW1Nis9HtkVWGELQ9WCY4EUp07g5t7ZHqgXEg1ROgNIPXYcp+8TP6nUyG35v/A3uukisV3k6jSOfeIYcLDuntoX5nzlbpX8ErufqQSBqZfLN9+zE4qlWIIC7wvR9RHm75qjI5K0Mu66GDgE41BsvaBwmM3uDoMqD6yxPp6SHHj2NEnndMsF8Ee5nxX8IW6xi4/DMBouRVkCr5ikKfLD68CsI3PfM8BPYQKR0M1zLYDdxdBbrLVa7OCrTFBhfDXBg5a2x1n6LmhIs+NjihAo8kfqss= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 17cda732-d1e9-425c-b553-08d64e39a09a X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Nov 2018 16:11:13.7121 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB6225 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 |
Series |
selftests: Add tests for VXLAN at an 802.1d bridge
|
expand
|
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index e916663a1019..7af5a03bcb32 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -477,11 +477,24 @@ master_name_get() ip -j link show dev $if_name | jq -r '.[]["master"]' } +link_stats_get() +{ + local if_name=$1; shift + local dir=$1; shift + local stat=$1; shift + + ip -j -s link show dev $if_name \ + | jq '.[]["stats64"]["'$dir'"]["'$stat'"]' +} + link_stats_tx_packets_get() { - local if_name=$1 + link_stats_get $1 tx packets +} - ip -j -s link show dev $if_name | jq '.[]["stats64"]["tx"]["packets"]' +link_stats_rx_errors_get() +{ + link_stats_get $1 rx errors } tc_rule_stats_get()