Message ID | a902aea095149aa0b8bbcc96de8784c17699444c.1528300289.git.petrm@mellanox.com (mailing list archive) |
---|---|
State | Changes Requested |
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 4DB7760234 for <patchwork-linux-mlxsw@patchwork.kernel.org>; Wed, 6 Jun 2018 16:02:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B3C429960 for <patchwork-linux-mlxsw@patchwork.kernel.org>; Wed, 6 Jun 2018 16:02:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3963029968; Wed, 6 Jun 2018 16:02:34 +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 79E5A29A89 for <patchwork-linux-mlxsw@patchwork.kernel.org>; Wed, 6 Jun 2018 16:02: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 411D2Q5YGMzF31M for <patchwork-linux-mlxsw@patchwork.kernel.org>; Thu, 7 Jun 2018 02:02:06 +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="gF/IuIdp"; 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.2.74; helo=eur01-db5-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="gF/IuIdp"; dkim-atps=neutral Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0074.outbound.protection.outlook.com [104.47.2.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 411D2K6vFgzF31g for <linux-mlxsw@lists.ozlabs.org>; Thu, 7 Jun 2018 02:02:01 +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=RBnZeC518uJKXVso2wLfxKEcZwlNRdiIxwv6pNLT2k0=; b=gF/IuIdpbeWc9/Z1Mqehxj3EJWeRAa5Bl6etD6i3+IO1MHTEVWQDd6xDetDHFQdbLkzkxJQgqL1nRBmxwlNJ9n0gTqZy4ha5IFy+6Kdg8Q5TF9mob7J8KZYFo7SPuYFaJO9RwaZ+pZ0U4wRa6Kvr/1Gqp+ud1/CRrcI0q7G+Qo4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; Received: from t540p (78.45.160.211) by AM0PR05MB4178.eurprd05.prod.outlook.com (2603:10a6:208:57::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.841.13; Wed, 6 Jun 2018 16:01:55 +0000 From: Petr Machata <petrm@mellanox.com> To: <linux-internal@mellanox.com> Subject: [PATCH net-next mlxsw 2/3] selftests: forwarding: lib: Support team devices In-Reply-To: <cover.1528300289.git.petrm@mellanox.com> References: <cover.1528300289.git.petrm@mellanox.com> Message-Id: <a902aea095149aa0b8bbcc96de8784c17699444c.1528300289.git.petrm@mellanox.com> Date: Wed, 06 Jun 2018 18:01:49 +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: CWXP265CA0003.GBRP265.PROD.OUTLOOK.COM (2603:10a6:400:2e::15) To AM0PR05MB4178.eurprd05.prod.outlook.com (2603:10a6:208:57::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM0PR05MB4178; X-Microsoft-Exchange-Diagnostics: 1; AM0PR05MB4178; 3:tL0b9IJt1QWYicOnu3yb2uExvogXNJ9oMQUJzuTnfRMcC80ABuMhJa4jTCqhdLTWR08hzFSsnOHvI+y9mFWl/74zJMIbLk1CzVK4B0dj52XFZ+woPaZL0k8iIPn3TSUpEXebcNww9uOOUmyoZaTAau+p9b5eYDTRAsc5ToVbhe5ODA4Ir5zZHZU1WXcBK3iP3d9fcNNmwdfHQUjWXJSGnh+pCoEVu6WJ9pfi7beWW2N3IlI+BWhKql4UTRQokyNu; 25:T+uyMoOlt8Sze7d17fSCRx9xodvohTeqYhIfO6+AytHjurZOkhWHyNE4VyaVn8JLEep994rttBXaEcvVF9PH1YxWQlnG1Ai/UjiC/E9VTKxLG4jzd/LZc+vPcLf22GCeb6/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ehC7tt3sjZ2SXeqqnQnGJlQm+cZqqb5J+q6NOzzWv9EerU0FnTgFqmjkPGj6GZytooD0+8Wol6D+tqxEks4nxQMmv82G1RcGwXcnda9lzxrXoCg62ygOiAIy7DLvUr3wccctUpyCYuXgoXI2jErxUZ08Ktce31S1sAJPfFtksNZC7P62Bq/MEqO7bfiKsHrCyI44hLXCQgO2yHDB/sMT/0i0Rk0TI4xL01BiLcFWQ== X-Microsoft-Antispam-PRVS: <AM0PR05MB41783A14005C885ACC9CDF5BDB650@AM0PR05MB4178.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)(10201501046)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:AM0PR05MB4178; BCL:0; PCL:0; RULEID:; SRVR:AM0PR05MB4178; X-Forefront-PRVS: 06952FC175 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(366004)(376002)(39860400002)(346002)(39380400002)(189003)(199004)(97736004)(81166006)(2616005)(476003)(956004)(5660300001)(486006)(8936002)(51416003)(2906002)(106356001)(446003)(8676002)(6486002)(11346002)(81156014)(3846002)(66066001)(6116002)(86362001)(47776003)(68736007)(6496006)(52116002)(478600001)(53936002)(2351001)(6862004)(26005)(386003)(316002)(25786009)(76176011)(105586002)(6666003)(6636002)(16526019)(118296001)(186003)(48376002)(16586007)(7736002)(50466002)(305945005)(58126008)(37006003)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR05MB4178; 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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KSOIPfGidU4XzvzhrxrJTEvMLxsVJcEOxQ3xRBq94uwkrcfUXONzAgYoLc?= =?us-ascii?Q?JmkxhSdHe6/2lUbMeiq1HeDDYx4MrdoFucBDCiWXHoS6A+oEAp1xhWH1s5Yy?= =?us-ascii?Q?iHsvYgjhqDwTCNRp+MTy72rm8c3S8HcAEwqiuOVKI2B1/p9PjF1st6I/Vipp?= =?us-ascii?Q?V4XVxhNy6LbJU270AXkV9sXni7uKk9f2pza843QWM38/MgpUfXFkxemB2eo8?= =?us-ascii?Q?dlG3MZbwXA1occ7dWxhEUIq6cYOEVM+5chqp9kllZxvgHKqYA9mmISJZLIP9?= =?us-ascii?Q?JCcd5vNKOOG/bqibB35gI/ZFgXaLIyl5S0hF+1wcHVXJIh2bX597KoBXBy9T?= =?us-ascii?Q?HWUx0SF+u1Y9XGeNGz1lHdMYiT5WkbYYWHianolW4VnVTS/oqSEIXMGbg=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Antispam-Message-Info: BkWJdMDS+ztVUuYe5PPHXybRsY4NgvGWSd925hsPXArimGK0UUjFzCjzhYsv6+5CNvAMBV6V2ieeFnndIFyISsYCO97xiu7bsW++NLu0z0Tn2Bxkq5mawycgST7jq2h8XPOamNBU6kSKpmLBUm8D0ZgzaWszHkNWs/KboL6n8g03WtkudVRvR+bN+L+wITFX X-Microsoft-Exchange-Diagnostics: 1; AM0PR05MB4178; 6:O6RrlO1O2lcRuXMT1ekKA2L7jL/NJWMFgdNlSYo84t6r21zWg33rxQcelJcD1Ic8BpKLD9uOHGIUfDzdwI+mo2P9kG2nIx/L6MZnDkY5QcCkAz3Rs70SVgswSFb4LgpnQwcAlD0HPtja/i7wYQN1Y32YvhcKapI9tha55JocNZWGOHJtvCK6hIL6Llye7CwjibL/3lhOkAuktf2avu7HDmBw2pIDQGd1c9IfvGAq7yIpe8uma0Kq7qocLv70vXB+MFcIA+RwUKwX5OePgJFK5AUUDI1xApvNf4+2L7B4+wxFzlLUeKOvk4hfGsmzhNL602AWwCHrNu7oJxc4Vb+C3esZEw2N84dCFNFrzlBDasZbAxgzB2XjfA+3kZAeyWF5HD3P4oY+AMweQ7LfJv9EI3Lw9KoDf3+0nuF9ORCofplumKZqYVQWGszy7bIyrshKyRmCvDVPmytUxsrmLVYKIg==; 5:Q8eUf9gkhBgwT4/eRGFS5wPieZDsqGbZ4OUqTomRj9tTkQasyKvR0dC8SKTfIqgpvPaw9J5b2/tkWZwYori1MAx4yABSlMhq2y40NNPlrWdS/DJ0xKNtWqCA3j3WEYCwotEpE/fF9k2u9gSq0GlKQyyrqSrnQZjsZnPI+cVsRpo=; 24:VgK++3swrXrG5M0hl9pPVSLbnqjES2Ym0HC50S91JHEAM14qSFz5MbpfNv0FJXxG2bw0aEIarTG/98PaTZ4tIpup1NFux4oONopsqVlE9Yg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM0PR05MB4178; 7:gNlD8O6cSkkr48eq4Rlz0WG6OqdUIglz69l/8geKoEIaGLfYL0sYkBhoWA8JqOgWtwhjKPg2arYk1tqGPdjojf9rId5cuO2RppuGuEMOPornkaq9412sFhtPm9ckPaAkDVd/VduG70KXwf98+PEm+80U7vHqwuXUJA/UFBl8v8OUeYF4uh4t4SpGcCoXjZbAk3y23mMUBCIEepp1V1veavZ6LldqFyfoY16LVykFACOE6EwzJHT4Tu/SiWZ8Vj+0 X-MS-Office365-Filtering-Correlation-Id: c4b98031-0ed3-4ce8-cc1e-08d5cbc6d378 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2018 16:01:55.2103 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c4b98031-0ed3-4ce8-cc1e-08d5cbc6d378 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4178 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 06d6dcb..bd1bb08 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -394,6 +394,27 @@ vlan_destroy() ip link del dev $name } +team_create() +{ + local if_name=$1; shift + local mode=$1; shift + + teamd -t $if_name -d -c '{"runner": {"name": "'$mode'"}}' + for slave in "$@"; do + ip link set dev $slave down + ip link set dev $slave master $if_name + ip link set dev $slave up + done + ip link set dev $if_name up +} + +team_destroy() +{ + local if_name=$1; shift + + teamd -t $if_name -k +} + master_name_get() { local if_name=$1
Add team_create() and team_destroy() to manage team netdevices. Signed-off-by: Petr Machata <petrm@mellanox.com> --- tools/testing/selftests/net/forwarding/lib.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)