Message ID | 20180501111806.112319-2-shahafs@mellanox.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B6B452A66; Tue, 1 May 2018 13:18:31 +0200 (CEST) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40048.outbound.protection.outlook.com [40.107.4.48]) by dpdk.org (Postfix) with ESMTP id 9126D2583 for <dev@dpdk.org>; Tue, 1 May 2018 13:18:29 +0200 (CEST) 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=Ujz62HuM68mNUgGrfU1I04+lVa5dHLoE5u9QOso2a+A=; b=Pdi10axfC/Ex4gwaviFb4JEREz+SCZXtYpZgA8qeWjCgsy4ROpCjLu2AN8Ed5/3heId1qpT/HWVArAeUTYQMjRpfrwC8aqlBNaNQzD2kLYNdFUtX1M1zk04XFFVqRihWQ8FrZAGHLDEJcAEMXDdxM4sYrh5ZrRIi9eIlgH3ySQM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (141.226.120.58) by DB7PR05MB4426.eurprd05.prod.outlook.com (2603:10a6:5:1b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.715.20; Tue, 1 May 2018 11:18:27 +0000 From: Shahaf Shuler <shahafs@mellanox.com> To: nelio.laranjeiro@6wind.com, adrien.mazarguil@6wind.com, yskoh@mellanox.com Cc: dev@dpdk.org Date: Tue, 1 May 2018 14:18:06 +0300 Message-Id: <20180501111806.112319-2-shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180501111806.112319-1-shahafs@mellanox.com> References: <20180501111806.112319-1-shahafs@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [141.226.120.58] X-ClientProxiedBy: DB6PR1001CA0006.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:b7::16) To DB7PR05MB4426.eurprd05.prod.outlook.com (2603:10a6:5:1b::15) 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:DB7PR05MB4426; X-Microsoft-Exchange-Diagnostics: 1; DB7PR05MB4426; 3:AoFMYzsXcykxwmzWw3b5AsjZTW6sZ7iI9eo80q9XUZeOOpKMHXXbk0zqgJcYa7Dxls5C8Ou0yOz/Hnd7puuOW5rGXTW+aKdl8QVGlDDJ/IP2zw+jKD/e0ILwlwItBEpJY/q9ZsYsRYLaukA+qupZWrVwoovcCFzmcP/6hM5zkGFlYcbPWVDkTfq1YXPoMqHtsMN7HiA/yASXaOG+J/8x1IQ4ZYAmVzpagVsE6Brt30L+ui4CF7TN/kxORM+T7nI4; 25:4kS6PV4/jJl85eb21XNYLBgGNV54Oklx6docc53xHMHS9wEs+K9bdXNp4FzRJjJweZMly5uhRKLSnHm44h2X8KZ47XGQFyiddVBFJ/2l0iKOCES2guBlE4SwRqEbZB6OB5zW9e9Wz/vg+/mumitcng9MK3JgPUw9LL0aZx6YS2MhhnZfrmeFVwfpO6RWG3TMD6Jfuazfx9ZYrT4bUo4yNGLuTMhQ3NtWsBJ3dKoE4v3XRx+pExrZcAaH7wMDjWfwObU045gxUTJQKlvkHQh4rBdvwva5TAvzva6Y1GgCdUDPN9Ywt5CqJcVTkpiYhPhH8McSHyet3kigo/cXSx3KMg==; 31:iR0L6/SsOUG0lXuWFaaLHWKXMjG9dBazM5yTkJ/baZwYVfgnbWwzD975ymOBnWnvzPtYvNm+TJzduTIcGxjTmeFjV4EVkEuOPhB+iJnIk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442654D21E33024C392DBDDCC3810@DB7PR05MB4426.eurprd05.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(10201501046)(6055026)(6041310)(20161123560045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:DB7PR05MB4426; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4426; X-Forefront-PRVS: 06592CCE58 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(366004)(396003)(39860400002)(346002)(39380400002)(199004)(189003)(25786009)(26005)(50466002)(36756003)(52116002)(186003)(386003)(55016002)(76176011)(51416003)(16526019)(7696005)(7736002)(47776003)(66066001)(81166006)(2906002)(6666003)(8676002)(81156014)(6636002)(50226002)(8936002)(21086003)(97736004)(4326008)(478600001)(105586002)(106356001)(48376002)(68736007)(53936002)(6116002)(3846002)(11346002)(2616005)(956004)(305945005)(316002)(486006)(69596002)(476003)(446003)(1076002)(5660300001)(16586007)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4426; H:mellanox.com; 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; DB7PR05MB4426; 23:TP9dfx3rIvpJ6g62hP4f+eFT0lE3YnqbPevHkR/oI?= RG85I0KIdvfVeLBJwuEfXN2hv2CbvHSqIV+RebWZeFrBUeyHXAOkD4SAiIfK0iYUX5/R1tLPw9aQRNXO/3I+5WNqwiq4GgWxdyxUw2cbuyW0GIEVR8G3ad7q881LPx8CbjZb61csQoN+TdI47Hw9+YgHn2aLvduPrA+i6G6UypDvH+TIUGUGrKttbYZ4pgCigDgG+QEb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YuHFz4a5uiOV3GK6+3HqYoBveqeR3bR9lkkxEjI90I8NhZOJI3ZDrhKVDPBSdf2I6twkdGXWEcg9+EmYXTY43pDz5TGIePwEkowx90uXMvg1P0INGVumfeymjUpGv8Q54dhpVbWxT6RPw2gLdJr2j/TwMO82y18gp6239xXLgsPWb3EiYFM/+csjQ9pa X-MS-Office365-Filtering-Correlation-Id: 4a287397-00c0-4838-617c-08d5af554390 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 May 2018 11:18:27.8722 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4a287397-00c0-4838-617c-08d5af554390 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4426 Subject: [dpdk-dev] [PATCH 2/2] net/mlx5: fix probe return value polarity X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
ci/Intel-compilation | success | Compilation OK |
Commit Message
Shahaf Shuler
May 1, 2018, 11:18 a.m. UTC
mlx5 prefixed function returns a negative errno value.
the error handler on mlx5_pci_probe is doing the same.
Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno values")
Cc: nelio.laranjeiro@6wind.com
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
---
drivers/net/mlx5/mlx5.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Comments
> On May 1, 2018, at 4:18 AM, Shahaf Shuler <shahafs@mellanox.com> wrote: > > mlx5 prefixed function returns a negative errno value. > the error handler on mlx5_pci_probe is doing the same. > > Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno values") > Cc: nelio.laranjeiro@6wind.com > > Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> > --- > drivers/net/mlx5/mlx5.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c > index 46cb370a29..ab860b5985 100644 > --- a/drivers/net/mlx5/mlx5.c > +++ b/drivers/net/mlx5/mlx5.c > @@ -804,12 +804,16 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, > goto error; Shouldn't you do the same for mlx5_uar_init_secondary()? Looks like a few more. E.g. mlx5_args(), mlx5_get_mtu() and mlx5_uar_init_primary(). What about ibv_query_port() and mlx5_flow_create_drop_queue()? Thanks > /* Receive command fd from primary process */ > err = mlx5_socket_connect(eth_dev); > - if (err < 0) > + if (err < 0) { > + err = -err; Instead of changing sign, how about 'err = rte_errno;' ? However, err looks redundant to me because mlx5_* funcs set rte_errno. Here, err is used to set rte_errno at the end. Thanks, Yongseok > goto error; > + } > /* Remap UAR for Tx queues. */ > err = mlx5_tx_uar_remap(eth_dev, err); > - if (err) > + if (err) { > + err = -err; > goto error; > + } > /* > * Ethdev pointer is still required as input since > * the primary device is not accessible from the > -- > 2.12.0 >
On Wed, May 02, 2018 at 01:54:37AM +0000, Yongseok Koh wrote: > > > On May 1, 2018, at 4:18 AM, Shahaf Shuler <shahafs@mellanox.com> wrote: > > > > mlx5 prefixed function returns a negative errno value. > > the error handler on mlx5_pci_probe is doing the same. > > > > Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno values") > > Cc: nelio.laranjeiro@6wind.com > > > > Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> > > --- > > drivers/net/mlx5/mlx5.c | 8 ++++++-- > > 1 file changed, 6 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c > > index 46cb370a29..ab860b5985 100644 > > --- a/drivers/net/mlx5/mlx5.c > > +++ b/drivers/net/mlx5/mlx5.c > > @@ -804,12 +804,16 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, > > goto error; > > Shouldn't you do the same for mlx5_uar_init_secondary()? > Looks like a few more. E.g. mlx5_args(), mlx5_get_mtu() and mlx5_uar_init_primary(). > What about ibv_query_port() and mlx5_flow_create_drop_queue()? > > Thanks > > > /* Receive command fd from primary process */ > > err = mlx5_socket_connect(eth_dev); > > - if (err < 0) > > + if (err < 0) { > > + err = -err; > > Instead of changing sign, how about 'err = rte_errno;' ? +1 > However, err looks redundant to me because mlx5_* funcs set rte_errno. Not it is not, rte_errno is the strict equivalent of errno but instead of being global to the process, it is global per logical core, its cannot be determined nor modified at the beginning of the function thus the function must track any failure and report it accordingly. > Here, err is used to set rte_errno at the end. It is just a optimization to avoid a lot of rte_errno sets among the function, it must only be set if err != 0. > Thanks, > Yongseok > > > goto error; > > + } > > /* Remap UAR for Tx queues. */ > > err = mlx5_tx_uar_remap(eth_dev, err); > > - if (err) > > + if (err) { > > + err = -err; > > goto error; > > + } > > /* > > * Ethdev pointer is still required as input since > > * the primary device is not accessible from the > > -- > > 2.12.0 > > Regards,
Wednesday, May 2, 2018 9:50 AM, Nélio Laranjeiro: > Subject: Re: [PATCH 2/2] net/mlx5: fix probe return value polarity > > On Wed, May 02, 2018 at 01:54:37AM +0000, Yongseok Koh wrote: > > > > > On May 1, 2018, at 4:18 AM, Shahaf Shuler <shahafs@mellanox.com> > wrote: > > > > > > mlx5 prefixed function returns a negative errno value. > > > the error handler on mlx5_pci_probe is doing the same. > > > > > > Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno > > > values") > > > Cc: nelio.laranjeiro@6wind.com > > > > > > Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> > > > --- > > > drivers/net/mlx5/mlx5.c | 8 ++++++-- > > > 1 file changed, 6 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index > > > 46cb370a29..ab860b5985 100644 > > > --- a/drivers/net/mlx5/mlx5.c > > > +++ b/drivers/net/mlx5/mlx5.c > > > @@ -804,12 +804,16 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv > __rte_unused, > > > goto error; > > > > Shouldn't you do the same for mlx5_uar_init_secondary()? > > Looks like a few more. E.g. mlx5_args(), mlx5_get_mtu() and > mlx5_uar_init_primary(). Yes thanks. > > What about ibv_query_port() No need, according to man: RETURN VALUE ibv_query_port() returns 0 on success, or the value of errno on failure (which indicates the failure rea- son). This is also the case for ibv_query_port_ex, I will align it on the next version. and mlx5_flow_create_drop_queue()? Yes, needed. > > > > Thanks > > > > > /* Receive command fd from primary process */ > > > err = mlx5_socket_connect(eth_dev); > > > - if (err < 0) > > > + if (err < 0) { > > > + err = -err; > > > > Instead of changing sign, how about 'err = rte_errno;' ? > > +1 Ok. > > > However, err looks redundant to me because mlx5_* funcs set rte_errno. > > Not it is not, rte_errno is the strict equivalent of errno but instead of being > global to the process, it is global per logical core, its cannot be determined > nor modified at the beginning of the function thus the function must track > any failure and report it accordingly. > > > Here, err is used to set rte_errno at the end. > > It is just a optimization to avoid a lot of rte_errno sets among the function, it > must only be set if err != 0. I think I will keep the local err for the meanwhile. > > > Thanks, > > Yongseok > > > > > goto error; > > > + } > > > /* Remap UAR for Tx queues. */ > > > err = mlx5_tx_uar_remap(eth_dev, err); > > > - if (err) > > > + if (err) { > > > + err = -err; > > > goto error; > > > + } > > > /* > > > * Ethdev pointer is still required as input since > > > * the primary device is not accessible from the > > > -- > > > 2.12.0 > > > > > Regards, > > -- > Nélio Laranjeiro > 6WIND
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 46cb370a29..ab860b5985 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -804,12 +804,16 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, goto error; /* Receive command fd from primary process */ err = mlx5_socket_connect(eth_dev); - if (err < 0) + if (err < 0) { + err = -err; goto error; + } /* Remap UAR for Tx queues. */ err = mlx5_tx_uar_remap(eth_dev, err); - if (err) + if (err) { + err = -err; goto error; + } /* * Ethdev pointer is still required as input since * the primary device is not accessible from the