From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0061.outbound.protection.outlook.com [104.47.0.61]) by dpdk.org (Postfix) with ESMTP id C18E6200 for ; Wed, 2 May 2018 03:54:40 +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=+Mif5cVV1ReOca7IQMmUpNAYE+r/fpPo/2H8qdeCFbE=; b=T3kQLRDETi1yc2xQDloQEv3qObY1toNXAulosC2v5U+snVlDPYyLkCa4Ngs+NK4Qxrr0QLssmed+VTaFbYmKCaYBi6hbEbLu7UnwU80tbJaUSWcyPqZIWY3lN2bPaGvonwRigEcsLbmVWEEcniTW+ZlgYO20kl+6r9TTsBVi/4Q= Received: from VI1PR0501MB2045.eurprd05.prod.outlook.com (10.167.195.147) by VI1PR0501MB2159.eurprd05.prod.outlook.com (10.167.196.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.715.22; Wed, 2 May 2018 01:54:37 +0000 Received: from VI1PR0501MB2045.eurprd05.prod.outlook.com ([fe80::5453:e317:6563:11b3]) by VI1PR0501MB2045.eurprd05.prod.outlook.com ([fe80::5453:e317:6563:11b3%13]) with mapi id 15.20.0715.024; Wed, 2 May 2018 01:54:37 +0000 From: Yongseok Koh To: Shahaf Shuler CC: =?iso-8859-1?Q?N=E9lio_Laranjeiro?= , "Adrien Mazarguil" , "dev@dpdk.org" Thread-Topic: [PATCH 2/2] net/mlx5: fix probe return value polarity Thread-Index: AQHT4T4hEhtnolyhOUeN0EZMrm9fxqQbro6A Date: Wed, 2 May 2018 01:54:37 +0000 Message-ID: <246A35AF-2BFD-41C6-BEFC-A93D559FBA88@mellanox.com> References: <20180501111806.112319-1-shahafs@mellanox.com> <20180501111806.112319-2-shahafs@mellanox.com> In-Reply-To: <20180501111806.112319-2-shahafs@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-originating-ip: [209.116.155.178] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0501MB2159; 7:avekg6OJc+zFvyOtDj/FD0uO2ViSkTtaeFaw9hqcDkvvOKlAv01c6awaGmZ13K4katRJcJnhZZrSJp0zmZFXaSN9yamKQIV6kf0HTAnYoPmJcZ7XgxuEU50TEEFobfu9S0w1RphLp2qV6wD70sZOnR9c+QkUlQGgKwevqK6s5fjU5Usg6Evmqtou11XXJn5QdRMjdAdN4YLSLSJPHYuDHUKcfITZ73bVfTLstFICxY9PPdfBCNYD7aR53omMvKwI x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(2017052603328)(7153060)(7193020); SRVR:VI1PR0501MB2159; x-ms-traffictypediagnostic: VI1PR0501MB2159: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231254)(944501410)(52105095)(93006095)(93001095)(6055026)(6041310)(20161123562045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:VI1PR0501MB2159; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2159; x-forefront-prvs: 06607E485E x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(39380400002)(39860400002)(366004)(396003)(346002)(199004)(189003)(7736002)(105586002)(4326008)(486006)(53936002)(6246003)(6862004)(86362001)(316002)(2900100001)(5250100002)(6512007)(106356001)(3660700001)(97736004)(3280700002)(2906002)(83716003)(81166006)(36756003)(2616005)(6486002)(476003)(33656002)(6506007)(11346002)(5660300001)(6436002)(37006003)(14454004)(478600001)(3846002)(102836004)(25786009)(229853002)(26005)(6116002)(76176011)(8936002)(81156014)(446003)(8676002)(6636002)(66066001)(68736007)(99286004)(53546011)(305945005)(54906003)(82746002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2159; H:VI1PR0501MB2045.eurprd05.prod.outlook.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-antispam-message-info: eSavpxOuDxUkrixiN4bP8FIeCtg4y39xu6CB4ajiWXVUN1Rmv2DfTLs+cT+LXHZmOKLdTFiKpPjofchh8JYcF7iy4cqJKskVVj9WRsu6ZQRTHfVh2IA4o+H08VhI4XE/3YvFHUV6jrAPAuxE2CLksRBIatzFsJrleNnDG+e/AHrFmSS0b9nP/rK56JUlRD++ spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 003429d4-5f94-40cc-c0ed-08d5afcfa912 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 003429d4-5f94-40cc-c0ed-08d5afcfa912 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 May 2018 01:54:37.0275 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2159 Subject: Re: [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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 May 2018 01:54:41 -0000 > On May 1, 2018, at 4:18 AM, Shahaf Shuler wrote: >=20 > mlx5 prefixed function returns a negative errno value. > the error handler on mlx5_pci_probe is doing the same. >=20 > Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno values") > Cc: nelio.laranjeiro@6wind.com >=20 > Signed-off-by: Shahaf Shuler > --- > drivers/net/mlx5/mlx5.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) >=20 > 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_p= rimary(). What about ibv_query_port() and mlx5_flow_create_drop_queue()?=20 Thanks > /* Receive command fd from primary process */ > err =3D mlx5_socket_connect(eth_dev); > - if (err < 0) > + if (err < 0) { > + err =3D -err; Instead of changing sign, how about 'err =3D 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 =3D mlx5_tx_uar_remap(eth_dev, err); > - if (err) > + if (err) { > + err =3D -err; > goto error; > + } > /* > * Ethdev pointer is still required as input since > * the primary device is not accessible from the > --=20 > 2.12.0 >=20