Message ID | 7202f0e97d3e0f7b2b1274a51f62f6efb3e65d09.1532716714.git.petrm@mellanox.com (mailing list archive) |
---|---|
State | Not Applicable |
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-2.web.codeaurora.org (Postfix) with ESMTP id 82FB6112E for <patchwork-linux-mlxsw@patchwork.kernel.org>; Fri, 27 Jul 2018 19:10:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 710132C48E for <patchwork-linux-mlxsw@patchwork.kernel.org>; Fri, 27 Jul 2018 19:10:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EC282C498; Fri, 27 Jul 2018 19:10:58 +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 989AB2C48E for <patchwork-linux-mlxsw@patchwork.kernel.org>; Fri, 27 Jul 2018 19:10:57 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 41cdpm0KygzF16f for <patchwork-linux-mlxsw@patchwork.kernel.org>; Sat, 28 Jul 2018 05:10:56 +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="wtLsJnF0"; 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.52; 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="wtLsJnF0"; dkim-atps=neutral Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0052.outbound.protection.outlook.com [104.47.2.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41cdpf2sTPzF15L for <linux-mlxsw@lists.ozlabs.org>; Sat, 28 Jul 2018 05:10: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=Ru1vchQjHLHp3PvB8nLah7Z3FMDHVsHhcqpoT9diY+U=; b=wtLsJnF0Wu6elFK+gD5m75IbT/vgiKDpr+y4+vVHP4fcdXrYF5iRjAyDceZCPpkw+i/CWjVCf5B9cvzY8BlBfzbKIYijsuDKT0pepDrKFhMaw1mC9UEqgpivlDTLhBz3RM8ZKmdlWeiGDpSk/wiKUXMR51Qmz7pQ4hTQDfS9NgI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; Received: from t540p (78.45.160.211) by AM6PR05MB4181.eurprd05.prod.outlook.com (2603:10a6:209:40::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.17; Fri, 27 Jul 2018 19:10:43 +0000 From: Petr Machata <petrm@mellanox.com> To: <linux-internal@mellanox.com> Subject: [PATCH net-next mlxsw v3 09/10] selftests: forwarding: lib: Add lldpad waiting functions In-Reply-To: <cover.1532716714.git.petrm@mellanox.com> References: <cover.1532716714.git.petrm@mellanox.com> Message-Id: <7202f0e97d3e0f7b2b1274a51f62f6efb3e65d09.1532716714.git.petrm@mellanox.com> Date: Fri, 27 Jul 2018 21:10:38 +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: HE1PR06CA0135.eurprd06.prod.outlook.com (2603:10a6:7:16::22) To AM6PR05MB4181.eurprd05.prod.outlook.com (2603:10a6:209:40::26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5179a779-877b-48ae-6a0f-08d5f3f4a705 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600074)(711020)(4618075)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:AM6PR05MB4181; X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4181; 3:1VwEN7lyQHVME6CRP7YLvK0Nfcbu694ir1RuByCD2Iac4f1ZtX9G4jSWBzgAoWJCjOMfgC6JHazUkq3LkBu8LbPEErBtiuplHgnDaUvsyywe5RGHlNP/mVJUfr+yyzyEyE96gLEghFXCTF5YU+AHAcjKYniofRtNbwN+0+eJycSql4YOxoBSxXDyGJ9N9WkJ/ChsblVex6eaIYigper7Q4Bfjvz/htNfy1E07cv1Nha12DCT5QNCKQL1d2GNanRu; 25:xjF5usQqr3/zH0tL8XUyfyfIrIWNhaK/Y1MJKWye6X98Y7wEYnZ4maXPzdMWODdevHeg/lq5U25oG6pX4GsXae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wu4b; 4:CUB0v3Y1dD6DvgthOr87KBfIVZ4UoPYdc+zGh3SrYu1pIMwvhH7WizvC0xI/zlg6BcMEr6fBpRdsh3icdaG8+e+/hYLw659smM1hq+hbzVKd3MHd6ifaovaWvRJmOZ6hlJaQs/heClSVOSh/TYmGoZID26c8MVftMPoBJl3k60qwZlz9cwrzpnSiSRkPnbsp8uuXfZeW7FNxf5YJnyu4dvbO8r6D/foRCkogzHEU+ozFf1ZEMA1Ggf1rU3ezmyotc9JVLpdjZX+Lvhov6pvaZA== X-Microsoft-Antispam-PRVS: <AM6PR05MB41819C7212ECA232F31B44BDDB2A0@AM6PR05MB4181.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)(3231311)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:AM6PR05MB4181; BCL:0; PCL:0; RULEID:; SRVR:AM6PR05MB4181; X-Forefront-PRVS: 07467C4D33 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(376002)(136003)(366004)(39860400002)(396003)(189003)(199004)(476003)(6496006)(2616005)(81156014)(53936002)(305945005)(316002)(7736002)(486006)(37006003)(16586007)(58126008)(36756003)(186003)(16526019)(26005)(81166006)(105586002)(956004)(8676002)(76176011)(386003)(2351001)(51416003)(52116002)(68736007)(47776003)(8936002)(106356001)(446003)(11346002)(86362001)(66066001)(6862004)(118296001)(25786009)(5660300001)(3846002)(97736004)(6486002)(50466002)(6116002)(48376002)(14444005)(478600001)(6636002)(2906002)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB4181; 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; AM6PR05MB4181; 23:NwVgFmiJzw9g9uyDIFUKudbHwQHOYFo9jp5v8uUV0?= Dl9t4hvpghkmI5+4DlkpHGAvFgam0B72ws27En9zkd6HF2Me8ke/e+iCXhK4RjQthPkzeRrb6dE5Ys7yImgE/8QdS0VVsfQfn8s7XpOQ5jFQwzjyCKKo6Ss4DLkxBVMcO05HDbV+ChenVXYBwiSs+IXDNRBR5pZfown0DmwfhkSJ1K91X9l4PVsSxLut++9J1dcDrNtVN6EFn7Xz+XMlX+F5jr9yTcJDdiH4LWsj11+jMpG6JAvULy3dW0nzf6KtrJZaBbeXt+PVSSuyE6pNTKrGjkMs9jV5RJEUSAgMAIuq+VdYSqrjVC2GyBUnInO4bzAn0oR7yhmqjRcSpNHmAhJLgcFL8c0Ba8UmNr8zky3O9AUEmYYQL4gO8dhnf2Yf4Fry+5nuiCRHZ0GV8yEB9+hpphQ422tqylKRd1FZ/a7Tc8S4mqfRNgjh16iZqsX+QSy427oMsiVbg69aQ/ycgs3/9VUzCRUgHhIEeJxWZqk+OcRhIVQav49VdtRMq5PeCCRySpnfDCcTJxPWxMNohcZYQP/N15U6QEhFSCzt372bbq8AYVWrf/5prUjsQP6w5Ap092mX7U2+lP8o3Rq9Th4eOF+imeUfKz99e/IcyvFwEud5CYsFbePBQtrvDXmamS/N5MuKTQyRIKBP8i3sDvHTiqAOiyIRcvdFc+NAroEE4TpNSe+zhgLFCDB7hkBZiWI7SfPpA2Gc8Sxp601C561ZSBNycNL9ocVdYODb+pzoo9ToYLhLLVQfbaCxZT+xXFBGKCeeD9t7IsDJu6qemo7uj5PZFtewjeTuPHV1cw176nSo/yau6GzMy74EUvPJy+7m90Dprd8rGudsYKi8BxzxOEQyg1aU97rB3miJR8bbhhTgmFseIA3hwjHHVE9h92tg9SgJbYhQlhF1St0KyJb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8rbHeBzKxGZjTa/poYJXXn9hDugf/GvCPE4K5oNE6j71Ntmvgj8mfqHlPXQY8lQgbtUiL80NIhPDSOhvqzmArMwjBpF3wkpg9GESyqtg==; 5:kMKjJtFWMHbElS83KWa/lfLsCqVbcxiSt7LLCiPKNn9jflr21LUn1ZPR5kAB91wvYmDai7qQY+JWBUno8k1ZAJJkUSAHoDw7okezEwtesGc9nqNGTxaYu2OiVEdM9/u32TiOjxb79LTnm54YX7o4Rhuk7NRTowAvUd2XeIUPJx4=; 7:gK3Jgf3ZQrL5OW+zpZfp/R5OTWcwJuwfVNui7AYa070Sz7J3/cZSQqIz6Edgr3FoARi+3VxNSJTNsqC40YXhbUm01qjwF/k2bn4aXhLHlzA3EgfeBkmV8pXpefJYXzYiVIgnzmO7vsWPu/DItHJnnGd5QFy8EphY7bZlhaXmMMGQS58Jd45J0gsYLVIz0FXyB2xP0F9mbVU2KaNdWDAZ5GGEwSb/OCmznMzrXsmkNMfIPDddVX9pQHaI1I26ILkN SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2018 19:10:43.8059 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5179a779-877b-48ae-6a0f-08d5f3f4a705 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4181 X-BeenThere: linux-mlxsw@lists.ozlabs.org X-Mailman-Version: 2.1.27 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="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-mlxsw-bounces+patchwork-linux-mlxsw=patchwork.kernel.org@lists.ozlabs.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
mlxsw: Support DSCP prioritization and rewrite
|
expand
|
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index d396f89d864d..abdcae9dc5c7 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -242,6 +242,27 @@ setup_wait() sleep $WAIT_TIME } +lldpad_wait_set() +{ + local dev=$1; shift + + while lldptool -t -i $dev -V APP -c app | grep -q pending; do + echo "$dev: waiting for lldpad to push pending APP updates" + sleep 5 + done +} + +lldpad_wait_del() +{ + # Give lldpad a chance to push down the changes. If the device is downed + # too soon, the updates will be left pending. However, they will have + # been struck off the lldpad's DB already, so we won't be able to tell + # they are pending. Then on next test iteration this would cause + # weirdness as newly-added APP rules conflict with the old ones, + # sometimes getting stuck in an "unknown" state. + sleep 5 +} + pre_cleanup() { if [ "${PAUSE_ON_CLEANUP}" = "yes" ]; then
lldpad can sometimes take a long time to push the configured values to the kernel. In the mean time they are stuck in pending state. Add a new function, lldpad_wait_set(), to wait until all values that have been set are pushed. The situation is similar for deletes, where however there is no good indication of whether the values are pending. Just sleep 5, which seems to be enough time for lldpad to consistently update the kernel. (Unlike in previous case, where the delay is often in the 30s ballpark.) Signed-off-by: Petr Machata <petrm@mellanox.com> --- tools/testing/selftests/net/forwarding/lib.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)