From patchwork Tue Apr 24 10:47:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 10359255 Return-Path: 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 1DEC560225 for ; Tue, 24 Apr 2018 10:47:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B2FC251F9 for ; Tue, 24 Apr 2018 10:47:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F3DF927C0B; Tue, 24 Apr 2018 10:47:52 +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 EC257251F9 for ; Tue, 24 Apr 2018 10:47:51 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40Vg5d0Bn0zF1Rl for ; Tue, 24 Apr 2018 20:47:48 +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="tLufIGre"; 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.43; helo=eur01-db5-obe.outbound.protection.outlook.com; envelope-from=idosch@mellanox.com; receiver=) 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="tLufIGre"; dkim-atps=neutral Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0043.outbound.protection.outlook.com [104.47.2.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 40Vg5S6gHWzF1RV for ; Tue, 24 Apr 2018 20:47:36 +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; bh=dJKW4Zc+s20lJozxI8ZWnTXRdOdy6swdmMtNmfDkFz0=; b=tLufIGreH1w4Ls8+tA2xbQNitCvfy78sWjY2aj+gGHQI3jE0h09a+fMg5ZtFTHB6Vnv++/l3kh9KREIdMPtieFCBFPoyTPX6AmRclm5GJs/vh7ZYV0+KCZaIjhYUH2HK8wjj4Gi5ORD1V+RbMVJvAYqB5NVrZPApRzSYSFqKJlk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; Received: from localhost (193.47.165.251) by HE1PR0501MB2330.eurprd05.prod.outlook.com (2603:10a6:3:27::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.14; Tue, 24 Apr 2018 10:47:27 +0000 Date: Tue, 24 Apr 2018 13:47:20 +0300 From: Ido Schimmel To: Petr Machata Subject: Re: [PATCH net-next internal] selftests: forwarding: Allow running specific tests Message-ID: <20180424104720.GA27020@splinter.mtl.com> References: <20180424090059.23930-1-idosch@mellanox.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-Originating-IP: [193.47.165.251] X-ClientProxiedBy: PR2P264CA0039.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101:1::27) To HE1PR0501MB2330.eurprd05.prod.outlook.com (2603:10a6:3:27::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(2017052603328)(7153060)(7193020); SRVR:HE1PR0501MB2330; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2330; 3:vAGQ0sxQHrLvkaFlaZxEVdayngz/LU7tXTi+3bVNXWMNJEOvaGGEIRaEJpk7EeNM4Gje3If0E7RnHiI7xoqX2dZYUks5veB8VntoTFgBga8RofqXCnSZaXfuQNdm1or+zBVKCNO9XY6OyIz0CLGgbB2b0yB69cOFay1jAbqnNYPuc2U7xTmtoXmI4NFy/fGGgUy9mWSAXS61rzK1x+J1lFAI4yKA/4V8qWsb6rrUozjGxEOB0FR+kc9E/sfwxCYO; 25:gkHrrE8Tn+tH699HEhDzD9LK6lDsqHwCoNSYBV5W39Ih/Xzm3izhtAoYE/vRWAEiY/7B/CoFlkcdPWjnkmtba631FBrWNKbGhvZ5exEBB3BXHuoolbiVbWr4N8A5acNTTY5scLrYp42KI0gMMS6dTTs8c0pL38O7zerwud4WW6OAIrAW30Gn+aYLWSTryidHDt4A1ZRnsXarQUTxQ2Myp/OKf+e1KuVb8lZMpeOIlre1/kcDHllsZL8jRw5TKMrTF6qf3tXNb/JlY6/wbuqiv+S742hssNfyEMYHV/IAOG+N4bXj6fuzsCcxlks68bkloC/mBaHgS0jVwFc8zJ587A==; 31:927Hqz1ucmXI8D+1qm07AVzpdxhVkE0aKFW2/Br0uPbENHL6XOqZ5499FvJKCWI52nTJDizm76x5GUk9i13lEHENPBXq7V2dMiDivlFuTgT8zuVJ/qKSlKovh9aXU3ik9D3xxMhkGJjN5e/bOe820tx/cfZFCNl2PpoEKeYSjmiPyCo9j4xleH8zDz3Fc0AFP4XMAtYpBvrpBs4rmObOdIkSE0bXlpkfMW+mvG6hpMc= X-MS-TrafficTypeDiagnostic: HE1PR0501MB2330: X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2330; 20:9OBeQ7AOt8HE93QRyM/ll5ZKkszy1y5cN+hfeR9IjSMpocOIMQpz95CJReRgDpH0WVxPHjOelwMVmIfGKK+gMBdAjlwutRJJzL0qz2up9fukbcqoByP7bGS9B2V4/OcJqNAUsS43ianLuRIBQNISAkuDIpbUnlGVjTEXDTCOq7tJQ3VRbNLKLAErKRsUvjzQVeAeNkxnUm82IpEZRKpv+hFkS5NH55e5IlnhohEsWD1+Jx9dvDZq0aAuvclu1ZAsPf9qd4eXkbHjbCg27uB4yPvILVTXRWx9ab9/4apsdNKIY4IdKBpjpSL7xhTc/6oJ3AEcnk8NvdZaCKnNQAX6zCB5CXJM2tIzmfvvwj6+f20E+vAtjgcmaDHa4O5SihBskh7H8uPfanjrmkkETLkCtB/JjKAZELNUe9xPI2QyRv2iugD8B5JaNHoCwwy22mkDqB+0gOlikcKDWd/+uZQDswwhYWguQeT03R5no3hk0FVaplikYEHvtwk15L3pwh2C; 4:RqncFjQvPjXeQyKff+PNDyfoGAW50UPgxyuyhSxL309NN5hJGI+Jg+JpyZ9dAqWe/aWx1k63ppJFXYgVrNIW6hYEnuNOGrktYm1jTSxFhL6Cf5zC3Z5itIj8HfZEKj2h4EXlGphlFA984a/c/iLUrNcyOPfyTm2mMGDJYV1W+j0vyXO3ng5AuWHaqa9qfJU6wWM/YvrAQP95JCKsg8cf/ilBIHtlwLQjyvTykSi19rSqeoK75/MeeDFTV+y+U8SXRwGosQUIVG/4tAZ51GDL0g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231232)(944501410)(52105095)(6055026)(6041310)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:HE1PR0501MB2330; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0501MB2330; X-Forefront-PRVS: 0652EA5565 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(346002)(396003)(39860400002)(39380400002)(376002)(366004)(199004)(189003)(81166006)(86362001)(305945005)(81156014)(6496006)(316002)(16586007)(8676002)(33656002)(58126008)(107886003)(76506005)(1076002)(3846002)(6246003)(23726003)(8936002)(6116002)(97736004)(47776003)(16526019)(68736007)(26005)(105586002)(66066001)(386003)(4326008)(229853002)(6486002)(6666003)(6636002)(956004)(476003)(52116002)(6862004)(11346002)(486006)(50466002)(76176011)(33896004)(446003)(9686003)(53936002)(2906002)(7736002)(106356001)(5660300001)(478600001)(25786009)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0501MB2330; H:localhost; 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; HE1PR0501MB2330; 23:jo+u3B8FE8zdiOXVRUlxrS/EtHpxanKPzvUSRTP?= =?us-ascii?Q?k6gMKMj3pzHF6gzUXRlJ0D+ufuWr96Ye7Gw8YsrGOP1utsHaBudxedGJ+A+T?= =?us-ascii?Q?34l+5D3poVrvcthGBWJcCA55qVM6cZNiNWe201FlESzBH/NGInZZWbK5alyD?= =?us-ascii?Q?e13q7ncEJutjev7ksZ3B/scVQJxIDtv0ZqxgqDSYR9971YnykOeYsRXGLOSP?= =?us-ascii?Q?gdl+JhGTS3K7fzKJxorfzCDUF2GodRGoYG6B9AP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yDCIlMq+gx0J0AKC4Ek6WNQvY2x7/LmAGZC8/u9GH/9sYmgawKUbFv7wD9Mmaw4s=; 24:m2UmdNHjnJreWAQi2yCMbCs5vm+2lP9/JVAc+rDvf25R7XyVv+z2rfJSJJ8ZS42JP2prLlNA13lT2g3Xl3shAqWlXNCdQ70shkDSlreNEKw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2330; 7:ghLnkDAFHw15eIPtMbfm/w9LTvmro9PTPwSQmWlTw1ZUj6C/7OQrdFkXBO4PRFvkGIzNssk3snKRTjJYaaYVqfy8nZTXrRRmX/r1UVkz0l86Ekz23VcD62iejdrsN1l8K4Be4+LesIASAm8M0jv1AQyrbWYz8ocFRjZn6GAl0ooRVAuc0XrkuoX/VkyNe8xOoChiQ8sOsKEaqNPv1+0OdGEjqDwPwKQJZO+binyEU1QIL38S152P5trPhDXwIlqa X-MS-Office365-Filtering-Correlation-Id: aac5bfcf-12a2-4563-0cc1-08d5a9d0c583 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2018 10:47:27.2753 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aac5bfcf-12a2-4563-0cc1-08d5a9d0c583 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0501MB2330 X-BeenThere: linux-mlxsw@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: mlxsw driver development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-internal@mellanox.com, linux-mlxsw@lists.ozlabs.org Errors-To: linux-mlxsw-bounces+patchwork-linux-mlxsw=patchwork.kernel.org@lists.ozlabs.org Sender: "Linux-mlxsw" X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Apr 24, 2018 at 01:03:17PM +0300, Petr Machata wrote: > Petr Machata writes: > > > Ido Schimmel writes: > > > >> tcflags="skip_sw" > >> - gact_drop_and_ok_test > >> - mirred_egress_test "redirect" > >> - mirred_egress_test "mirror" > >> gact_trap_test > >> + tests_run > > > > I guess it's reasonable to assume that any ACL-capable ASIC will > > actually be able to trap packets. > > But wait, the test also assumes that redirect is supported. Maybe do > this, and just add the test to ALL_TESTS? > > diff --git a/tools/testing/selftests/net/forwarding/tc_actions.sh b/tools/testing/selftests/net/forwarding/tc_actions.sh > index 3a6385e..7abd6e3 100755 > --- a/tools/testing/selftests/net/forwarding/tc_actions.sh > +++ b/tools/testing/selftests/net/forwarding/tc_actions.sh > @@ -111,6 +111,10 @@ gact_trap_test() > { > RET=0 > > + if [ "${tcflags/skip_hw}" != "$tcflags" ]; then > + return 0; > + fi > + > tc filter add dev $swp1 ingress protocol ip pref 1 handle 101 flower \ > skip_hw dst_ip 192.0.2.2 action drop > tc filter add dev $swp1 ingress protocol ip pref 3 handle 103 flower \ How about the below? Linux-mlxsw mailing list Linux-mlxsw@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linux-mlxsw diff --git a/tools/testing/selftests/net/forwarding/tc_actions.sh b/tools/testing/selftests/net/forwarding/tc_actions.sh index 9b4acaf35cfe..813d02d1939d 100755 --- a/tools/testing/selftests/net/forwarding/tc_actions.sh +++ b/tools/testing/selftests/net/forwarding/tc_actions.sh @@ -2,7 +2,7 @@ # SPDX-License-Identifier: GPL-2.0 ALL_TESTS="gact_drop_and_ok_test mirred_egress_redirect_test \ - mirred_egress_mirror_test" + mirred_egress_mirror_test gact_trap_test" NUM_NETIFS=4 source tc_common.sh source lib.sh @@ -113,6 +113,10 @@ gact_trap_test() { RET=0 + if [[ "$tcflags" != "skip_sw" ]]; then + return 0; + fi + tc filter add dev $swp1 ingress protocol ip pref 1 handle 101 flower \ skip_hw dst_ip 192.0.2.2 action drop tc filter add dev $swp1 ingress protocol ip pref 3 handle 103 flower \ @@ -203,7 +207,6 @@ if [[ $? -ne 0 ]]; then log_info "Could not test offloaded functionality" else tcflags="skip_sw" - gact_trap_test tests_run fi _______________________________________________