From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0087.outbound.protection.outlook.com [104.47.1.87]) by dpdk.org (Postfix) with ESMTP id B0F3F44CF for ; Sat, 20 Jan 2018 21:45:18 +0100 (CET) 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=aoCATvWYF6923zje8pSmE/amMIiEjrgaGsP6PyHhaAY=; b=A1OxmDf3YjEXmpGk4sOytPIqqZY7T2syeQ3un+L7nfr/QVerAym+fsrHcSvr7Ydrwv7vda6VX0P2RC2iBo7bC4hrDubcgg1HDfk55vx5oP6r/imUdufNpHa1jlWjZdewmxf535LF2OkJ1x8BiVOhZPEGO929SkHPRXpSh3dAuF4= Received: from AM6PR0502MB3797.eurprd05.prod.outlook.com (52.133.21.26) by AM6PR0502MB3605.eurprd05.prod.outlook.com (52.133.20.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Sat, 20 Jan 2018 20:45:16 +0000 Received: from AM6PR0502MB3797.eurprd05.prod.outlook.com ([fe80::6c28:c6b3:de94:a733]) by AM6PR0502MB3797.eurprd05.prod.outlook.com ([fe80::6c28:c6b3:de94:a733%13]) with mapi id 15.20.0428.019; Sat, 20 Jan 2018 20:45:16 +0000 From: Matan Azrad To: Thomas Monjalon CC: Ferruh Yigit , "Ananyev, Konstantin" , "dev@dpdk.org" , "Adrien Mazarguil" , Gaetan Rivet , Andrew Rybchenko , Alejandro Lucero , Jerin Jacob , Hemant Agrawal , Shahaf Shuler , Olivier MATZ , "Zhang, Helin" Thread-Topic: [dpdk-dev] [PATCH v6 4/6] ethdev: adjust APIs removal error report Thread-Index: AQHTkIIfz/9AsEWLtE+XPWGUXf0Nn6N57D0QgAF1TICAABqAAIAABWkAgAAA6YCAAZYf8IAAIP2AgAAEGiA= Date: Sat, 20 Jan 2018 20:45:16 +0000 Message-ID: References: <1516220357-13013-1-git-send-email-matan@mellanox.com> <3230393.d19WHEAjBn@xps> <1624152.X7h7I9Omfq@xps> In-Reply-To: <1624152.X7h7I9Omfq@xps> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-originating-ip: [85.64.136.190] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR0502MB3605; 7:llATD8XqPuBrvm4026k3KSGX8DMWVAl5VzWOuMn6GDYtZ//hVxddWCjo6kttURhNd/4CXbYve3+hGu6flgyVxS940R/HHLuy5Hx1D49tQtJwOutqGX/W6xeoGLbvlDAEh6M58mA4REKrBn2qqo+T2KjSv0qg/bPy/WZ+d7twRcNqoK/0hGyppckGwFHBhwM0iyYAIkIqFeREFV+9vN65YButWnmHl3e2qANUgSM0lskTAZ03v9wZciojz+8l/59u x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 4cd7f5cd-94a1-4e51-3506-08d56046b633 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(3008032)(48565401081)(2017052603307)(7153060)(7193020); SRVR:AM6PR0502MB3605; x-ms-traffictypediagnostic: AM6PR0502MB3605: 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:(6040501)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231023)(2400081)(944501161)(93006095)(93001095)(6055026)(6041288)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:AM6PR0502MB3605; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:AM6PR0502MB3605; x-forefront-prvs: 0558D3C5AC x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(396003)(39860400002)(366004)(39380400002)(189003)(199004)(6246003)(39060400002)(93886005)(6116002)(2900100001)(25786009)(3846002)(99286004)(76176011)(102836004)(26005)(53936002)(316002)(8656006)(7696005)(86362001)(97736004)(54906003)(6506007)(7416002)(106356001)(55016002)(2906002)(33656002)(9686003)(8676002)(478600001)(81166006)(81156014)(6436002)(14454004)(8936002)(66066001)(105586002)(305945005)(68736007)(2950100002)(6916009)(229853002)(4326008)(3280700002)(7736002)(3660700001)(5250100002)(5660300001)(74316002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR0502MB3605; H:AM6PR0502MB3797.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: oa8Nt6Zya2Epnh7GnxGpwiZBLavVij/qiwmwVH0xrX1bhFdhv2rwHJLtVty/s76dWRutnk1UlNJBtra9fT3MaQ== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4cd7f5cd-94a1-4e51-3506-08d56046b633 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jan 2018 20:45:16.2485 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0502MB3605 Subject: Re: [dpdk-dev] [PATCH v6 4/6] ethdev: adjust APIs removal error report 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: Sat, 20 Jan 2018 20:45:18 -0000 Hi Thomas From: Thomas Monjalon, Saturday, January 20, 2018 10:29 PM > 20/01/2018 20:04, Matan Azrad: > > Konstantin wrote in another thread: > > >+ RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0); > > >+ > > >+ dev =3D &rte_eth_devices[port_id]; > > >+ > > >+ RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->is_removed, 0); > > > > > I'd says these 2 checks have to be swapped. > > > > Konstantin, Please explain why. >=20 > I think he was talking about these 2 tests: >=20 > + RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->is_removed, 0); > + if (dev->state =3D=3D RTE_ETH_DEV_REMOVED) > + return 1; Ahh yes, it makes sense, I will swap them. Thanks.