Message ID | 6ee99d118fd0a5d0779c6bfd00476759e47e893c.1525795691.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 201086037F for <patchwork-linux-mlxsw@patchwork.kernel.org>; Tue, 8 May 2018 16:12:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EEB228FF0 for <patchwork-linux-mlxsw@patchwork.kernel.org>; Tue, 8 May 2018 16:12:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0325428FF6; Tue, 8 May 2018 16:12:35 +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 5A9F628FF0 for <patchwork-linux-mlxsw@patchwork.kernel.org>; Tue, 8 May 2018 16:12:34 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40gPdr6B2lzF1lS for <patchwork-linux-mlxsw@patchwork.kernel.org>; Wed, 9 May 2018 02:12:32 +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="yNLSYFOe"; 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.69; 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="yNLSYFOe"; dkim-atps=neutral Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0069.outbound.protection.outlook.com [104.47.1.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40gPdl4rdDzF1mt for <linux-mlxsw@lists.ozlabs.org>; Wed, 9 May 2018 02:12:27 +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=4bngMmnCcbhbefRjqwLkjD0fZU8IHl1TmVNyt+T+tS4=; b=yNLSYFOe4jCnlcFnGUbS4cAzfRONgLb2mCqJ/fmUwTfuf8O3zB3SZt5KIlS9kETLW136M1S52ygBXYsDPlI4l1J48vxxIquRY3wQU1MaeO7ANfU75uPY4wRPL0IdzD8wz7KfwMFxyMXtfABxlc3TdPWTNplvQgMTah+XId0wQpI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; Received: from t540p (78.45.160.211) by DB7PR05MB4188.eurprd05.prod.outlook.com (2603:10a6:5:18::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.18; Tue, 8 May 2018 16:12:20 +0000 From: Petr Machata <petrm@mellanox.com> To: <linux-mlxsw@lists.ozlabs.org> Subject: [PATCH net-next mlxsw 2/2] mlxsw: spectrum_span: Use a more fitting error code In-Reply-To: <cover.1525795691.git.petrm@mellanox.com> References: <cover.1525795691.git.petrm@mellanox.com> Message-Id: <6ee99d118fd0a5d0779c6bfd00476759e47e893c.1525795691.git.petrm@mellanox.com> Date: Tue, 08 May 2018 18:12:15 +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: LO2P265CA0108.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:c::24) To DB7PR05MB4188.eurprd05.prod.outlook.com (2603:10a6:5:18::29) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4188; X-Microsoft-Exchange-Diagnostics: 1; DB7PR05MB4188; 3:U8O8pJUNz+d8Qef5qT32Sxhu9zZLRY1fkJf2t5DjdQlG8LAstdrxCz4ahBSNMGWfJki2kene6bsaZq1pm9iWES2gnEkdp3xQtayH8vjMSa7BeSpmLAl/CrQdYduXlhEY95u7vjTbAC/smdFjwWc35ZWYWX4SQOlRwCPcDW9FrB3iEbPkjFuMuRu+m58wfPpvTclXcoeFJyUhScae+jvXk2oXmnFikFCYFU7QMaHTpww5hGnB4B53yX9p9k+Xm9bq; 25:CEjz3MBe4RBll6oPFYSYZ9b2UHcHfQswSIqFXXd6paJ2+PGItcYJ1RA1kLWAhOYCTN84tQ+yuCeWoZrSStkRmsn6Lopm5J/pxjgltZLj6PB57u519PsKyxVTAvWl2TfZLWEgabuEKTnIl7TfEGr1Ntp2KUEXh+S7t0wg4lBOT960vEUJQQu2BJeW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uTvdUQVtIO9xxge7MQOFpAH+UulQJBEeSPGva+PWXw4hLu1UzmShVrYrPEzG0iHK3j/B17Zduh6NqkRQUJZOHTq4B8MkTaXzCw/naqp7aPAKkY6gGDKEC8WF2qk7rPfSKFntYd6sNB5oBbjfGFd1D7wCpYZNy/RRqI/QV55SK8Aj8xOKm8xCwkDzDI0F/lFb4YWw== X-Microsoft-Antispam-PRVS: <DB7PR05MB41884FD6033C09F337CB3A3ADB9A0@DB7PR05MB4188.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)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:DB7PR05MB4188; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4188; X-Forefront-PRVS: 0666E15D35 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(39380400002)(376002)(396003)(346002)(39860400002)(189003)(199004)(66066001)(86362001)(105586002)(106356001)(53936002)(47776003)(2906002)(8936002)(7736002)(5660300001)(36756003)(16526019)(68736007)(2351001)(118296001)(8676002)(81166006)(81156014)(6496006)(305945005)(3846002)(26005)(4326008)(2616005)(51416003)(107886003)(52116002)(478600001)(59450400001)(97736004)(76176011)(58126008)(386003)(25786009)(6116002)(6486002)(16586007)(486006)(50466002)(6666003)(6916009)(48376002)(316002)(476003)(956004)(11346002)(446003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4188; 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?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NdqazeZk?= =?us-ascii?Q?989zhzt8Tudf+c3OD185/PNYbcYxQEfmuYIEDFoYO7k6kfT2Rf1IRvz4p7Y0?= =?us-ascii?Q?+CweK26JWBBjLkNWQJek3T0Ak1AHnmGfM3kuVs5kbNdxDYz/PY1kLCrP6Ebn?= =?us-ascii?Q?xUDWInnKtXyHSNcomqMigag/mYXVr2GjKc9WoImnZfaAjVGYb6xgsVtB3wsC?= =?us-ascii?Q?UBcIjGd43WlpIz+iphM7CQj+S39seZWkb72PosSUvDL00F5k7SWtwUcWRUKS?= =?us-ascii?Q?nzw+69jtKRU69UedBrJDtYW/D7ADyi9JEMlbMfmEdBuB0tS1Nw8E7qOal6+4?= =?us-ascii?Q?CYx+JLDAHIsankCvuLmNBdbLg/AIxjApwS0rkZxfHsrdxK8fCs68rrfIA=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Antispam-Message-Info: 6UJjDN9a8reE+EG09Qrz88j812/eshSTJ4aKvnOJnM43A3rdw+NdRF9MuGjeitzFAYcidEEbC5UK2gaewGHwDCnjJXKjP+gPuuOZS43MGqYAOW2729sYCQeqs7LLh1/qMKjG7++q+gdbr2UolAcwZDNQvNBEn3Mn9UPYhdege8qH6MghfFyoNDU86XknFZDc X-Microsoft-Exchange-Diagnostics: 1; DB7PR05MB4188; 6:pHXR4RthCfou0A9rw/yy1AOEmHkD3zCd1k4q53jatck0tJpABJOUqwb+lPjCqbsH4dQwgaV4briRYKmUSudOk3BPSBX64ASnx1qEkWodC4tvYaPXf3HlrYL2KvpR4vZQXFc2ZK5uWZLYo9Ux8nN2Htj87hNiJiuOcudvgOzBE6hl9z7zSqrUiqK9R/9psuxbr1TRiLotDg/DuL9agx2TMuH+oUu1OSTtxF3RFWRChm9hGyaZeLcG8KMAk0iYCM+LSIlbcnZeHfN84mEaxou0noqgMS5mJIrLmbWkyVguMXFN2ZxYj4dUyJ/4AN0aDORD6zQbrAB5Gt+BxQ6N9d6xmkqvBrXRZ7HMQwXOmLt9wfvxFDO4IMr/KFxKHSsC3pOmuOfX6tOFC6Mru+yXWrSFfhU1HoBJrg1J0s2A8yQya1x4tpMKIgWI0J0w4cmU1IcFvTUAtWiRWEMuGEozT3tnDg==; 5:N7iDnbLmIZe43NLmcrOMjBBWwfMUUfJUEHg+GYhqvZFKHk5w1ROURRjS+0V+rcV9Ytx1G0upfhlVHCLrvuq+S5lusPUJej8sClQnQLkdpyZyFuk7IN5wtYRbWAQYI/GRoTLgktYH2KV2Z2Gb/k5ElGAyNZnUG7PfBZVCmJVWg9M=; 24:kgA/jZdgC3Vf0+Dh3FOfJ5n7V5+fmQX1WAg5Zi71U3DTT1J0+Mk0GVjYby6XeNF/O1mou2M59OojnR88AYK1fy2zQBt+s/zAqDn0SOtRn64= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB7PR05MB4188; 7:2yGWxdsy+CWkrwsMGrKYsRqYT2fJsb9FQnOPbmiqWxaRjid9y2sz+oiqBEVDz9DEZ/PnNJbjBiwDVvnmo9yw2ibmJk033xkN6z2Yg6VEtTOZoCxPPpcPqEqz0sVUKKLBcTDCBhAcn8fLu/e7EYJFcUYusBZ8vbFX0gNSc7uch5yd8czjdxCulj/aWDbhBj8BzxTogv0S6bpuygUWUnZ20V5cIbgkXQih27yMEO9r5ZVse0HcLUogW9FKdGATs25x X-MS-Office365-Filtering-Correlation-Id: bf28cdd6-d795-456c-b3e6-08d5b4fe79f5 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 May 2018 16:12:20.1600 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bf28cdd6-d795-456c-b3e6-08d5b4fe79f5 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4188 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> Cc: linux-internal@mellanox.com 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/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c index adf1f78..e5f4f76 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c @@ -924,7 +924,7 @@ int mlxsw_sp_span_mirror_add(struct mlxsw_sp_port *from, span_entry = mlxsw_sp_span_entry_get(mlxsw_sp, to_dev, ops, sparms); if (!span_entry) - return -ENOENT; + return -ENOBUFS; netdev_dbg(from->dev, "Adding inspected port to SPAN entry %d\n", span_entry->id);
ENOENT is suitable when an item is looked for in a collection and can't be found. The failure here is actually a depletion of a resource, where ENOBUFS is the more fitting error code. Signed-off-by: Petr Machata <petrm@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)