From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F021541C27; Tue, 7 Feb 2023 03:17:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9394440ED9; Tue, 7 Feb 2023 03:17:43 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2100.outbound.protection.outlook.com [40.107.236.100]) by mails.dpdk.org (Postfix) with ESMTP id F3147406A2 for ; Tue, 7 Feb 2023 03:17:41 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=df/RTrZX9dLp4SPX78kui8gtLHHdfVSmCFY8s6G/ZmP3M/wZGZqblzx1VZrB49ywqdfFPbFH+AWOuq4SDQnShttmavb+wW8PZOCUCokocDde7jpx95BDaP0kTnwzLStOP2fe5mI7QfperOccc0xCLyOcLnVBEbcBrHlhzmz4YRfpymeQVCZtfU5Yf9ux14w54nS0ZlmZa65dfFBaofcvP082UiLd3uCFZhXAUDrS4vPhfJ05fnisBmTF/7B3JcH1sdOPAgyxeHL1ObrvHyp8nfTM3bdikpE/jNoVcNKIOHo10psoRmsLv9vKY5n474yaZcUiRjvmFV32gvgaEghSRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RtJqeoTkc1Ev9vygQqSaVXUm4GLbjwI0wzrJYdOykW8=; b=mmRbZv6OxhxKUDQFfCbhKluO5wDdDgSPDVgkDT7FVsg+wwXWgwCZ7sjc+nW4eYeyeORlpfKFy8tFl3o5Z7gEiiIxlEaWHwXoKkJ3H5ZyBAhufyl8kz34/6aRPz2fLWEVAfjtmYO2pH+Nsz8r2KAGaV+84mFMY1iQFu0dmBmRenJYOpAgcAN4VRmr3p1G++4kqzk7K0TJSyK8axOxFkdl6mYKOW3WBQXU4EpKpRmvB6q8DFQ6lWDRALZvkVSmK2VX+oLz84P38xbnJY3Twp7pFN3q2ZNudmDV+Mu3y+jM/LTzecvPuuUFgSh7yv300SUzpsWGRNZj+reXAoW2om1q9g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RtJqeoTkc1Ev9vygQqSaVXUm4GLbjwI0wzrJYdOykW8=; b=XasAPe6NTE6mo4fzHVejC2eyww4D8kq8n1UY/Lwsab38UeN3msD15UhG8apN8fME1v5M1F4BOpjUK2hGTP/+kD5L4DM3lF4vUy7oBO6v2XmWtzz3BLJ4a6lOYoOUn6eDPiYlB95n8j+HARvbU1J8T7HCCTbZyHuStCClhTYItC0= Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by SN4PR13MB5693.namprd13.prod.outlook.com (2603:10b6:806:1ec::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34; Tue, 7 Feb 2023 02:17:38 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::7ea4:e421:5dd5:9f4d]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::7ea4:e421:5dd5:9f4d%4]) with mapi id 15.20.6064.034; Tue, 7 Feb 2023 02:17:38 +0000 From: Chaoyong He To: Stephen Hemminger CC: "dev@dpdk.org" , oss-drivers , Niklas Soderlund Subject: RE: [PATCH 0/3] cleanup the PMD Thread-Topic: [PATCH 0/3] cleanup the PMD Thread-Index: AQHZOfl8OtKMjHnRwUWk/PJu2ubPva7CHDmAgACcsEA= Date: Tue, 7 Feb 2023 02:17:38 +0000 Message-ID: References: <20230206070549.27265-1-chaoyong.he@corigine.com> <20230206082847.79056c82@hermes.local> In-Reply-To: <20230206082847.79056c82@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR13MB5545:EE_|SN4PR13MB5693:EE_ x-ms-office365-filtering-correlation-id: 0fd1707b-5465-4fad-4c9d-08db08b17be9 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wbVbFmXc0i60CEzH9mUS9tFi6V+uWHyxXa/GpFgUwRvIE85tcJTRMBjpZ8Ee0ud46SHPJ1IzmGv2mloaHelrOLkioaOHBSwjX3Ai+lBGJfguKl1MouuJngWw34kSjZRpt3Cei563JkTxResRPTA9UrhKTztNFA21JsVKieg2vW8dZcjWYIyH1DQASSVIxjn+XaSCOohTL8uDI6xFhiAvbE2nIeu5oA6Y0tqkcOC8ffm1Ise15VoJoIlTKTYGXXw5meTUlpTchthGMQWhQNO7+vOPG2bicDcy11z8du6VQQXTQL2KEqhXQb28opXEI9ghgkbV1PR4qe/Bz5j+vgC1xEkCPOlSq2YK7wYgOjVYoMpdbAev2/ptrFOzoxxihnoxxEg/1IJipmCwZ4VFg5GL9Qo+LuJbiUYiYRuWP+WbwIp8FNemqjuVdjmqxhf222b0ToHRAMhMMFWF35ltg3l6exmoELHMBIh1KkXywAkBwvB7q3PtC9p2ecGra6A3uK+CrxBqYDcZFTO0oT+8dzrwz6i6IrRCiaGBUr9eWKee5eHhDefvQALgL7A8NT4ZZ0G0HyPcieKGqVetl1BQ1xXPhzfi2pP+o9IKd6x9gX9XEgIjGj+qSnR4RGliY2tbIEIsXSX+rRbx49lj5TzpIjHpuArD7MynU6GaY8LCKdxnhErtbGmlThyFnHVzF+2pysZnizLIbuWKY5ok1xn54ED56eMYMjuDpgz8DaxZ8QeB5o3QV5S6b1NDP2ij9ziknMIZ x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(136003)(376002)(39840400004)(366004)(346002)(396003)(451199018)(41300700001)(66556008)(66476007)(66446008)(6916009)(76116006)(64756008)(66946007)(8936002)(8676002)(54906003)(4326008)(52536014)(33656002)(86362001)(38070700005)(38100700002)(122000001)(186003)(9686003)(26005)(6506007)(107886003)(316002)(44832011)(55016003)(5660300002)(71200400001)(2906002)(7696005)(83380400001)(478600001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?UQBbicngPw1upvUmy9xPOgw7nCE759XZtl9F7X8xgjwee0SO1KVFbiAmPQqv?= =?us-ascii?Q?265vAj41rq/AM3DNsRXoTCoVBBe9wBOzZFZZrL8puICMvaF/nUDs3P5jp7+g?= =?us-ascii?Q?pJzWCdEyAh+KgjDhWIlXrxl8jUNjGzWGsH7XE0riYZghYg6Q32/jzNkWH4Oi?= =?us-ascii?Q?SsMgKFYoT92FxYPtJBAo9KuhcKhn1kitMUI6DgnGlQ+A4ikOWNUUI9/nFQo2?= =?us-ascii?Q?ooyMNzE9CKv9kSZSLuN32hyHgm/s/rbxmfe8IwVbbqlJx+EmY0qtgbLtzrRT?= =?us-ascii?Q?edvoMg7GC4MxZLLThOnmNyfj9khNuSHWy9+i54I/y84xdfs9t3sM7xJ7APy6?= =?us-ascii?Q?dJAkLRdeeAD0vgmWyNzs5vO99CDPxO1GuZwgFZck2UiIxox1wF5Q0nRhEL5S?= =?us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kT4dAmCn5cPL3FW87DMNa9Paa+G?= =?us-ascii?Q?E2VAq74EZNfn3vUVkBCJpX0Wmm1VKFH5MXesxLIZ70MF1nRiw5AoTqntRGUT?= =?us-ascii?Q?kYtxiUmx70UIcToVOof+rqEXKP7Iz44DqzGRYQuke5YebeZ/KZUSS1iIihFx?= =?us-ascii?Q?tMo3081eiluMs1+r25v2Bb2CIk2rnozuBh6OcDGVtlFe2wQSxYTgtk2QLAda?= =?us-ascii?Q?l8M3wY12hUOEOEq1ltaW3T9xJw+jb1/CzhulkoLLbgOZ/QD1n0TZnSi0XJ8n?= =?us-ascii?Q?Qp0QAjeAREf+ta6kzZx0JjLMkhLJ4EKj076QWNjP?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0fd1707b-5465-4fad-4c9d-08db08b17be9 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Feb 2023 02:17:38.4021 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: E1alNdbBvpT9bow29+ilse2FZDuHslhjFxykYCIW/VlasQFV2DI2BQ52HQy+wkjeAGT8HJXfAqMd66E84BF+0dEykd9QLmf4gmcjJKBHArw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR13MB5693 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > On Mon, 6 Feb 2023 15:05:46 +0800 > Chaoyong He wrote: >=20 > > This patch series aims to better align the PMD with the preferred DPDK > > coding style. > > - Remove the usage of 'printf()' > > - Remove the unneeded header file includes > > - Explicitly compare pointer with NULL > > - Explicitly compare integer with 0 > > > > James Hershaw (3): > > net/nfp: remove usage of print statements > > net/nfp: remove unnecessary include > > net/nfp: explicitly compare to null and 0 > > > > drivers/net/nfp/nfp_common.c | 25 +++--- > > drivers/net/nfp/nfp_cpp_bridge.c | 4 +- > > drivers/net/nfp/nfp_ethdev.c | 2 +- > > drivers/net/nfp/nfp_ethdev_vf.c | 2 +- > > drivers/net/nfp/nfp_rxtx.c | 14 ++-- > > drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 88 +++++++++------------- > > drivers/net/nfp/nfpcore/nfp_cppcore.c | 31 ++++---- > > drivers/net/nfp/nfpcore/nfp_hwinfo.c | 23 +++--- > > drivers/net/nfp/nfpcore/nfp_mip.c | 16 ++-- > > drivers/net/nfp/nfpcore/nfp_mutex.c | 14 ++-- > > drivers/net/nfp/nfpcore/nfp_nffw.c | 10 +-- > > drivers/net/nfp/nfpcore/nfp_nsp.c | 36 +++++---- > > drivers/net/nfp/nfpcore/nfp_nsp_cmds.c | 10 +-- > > drivers/net/nfp/nfpcore/nfp_nsp_eth.c | 38 +++++----- > > drivers/net/nfp/nfpcore/nfp_resource.c | 15 ++-- > > drivers/net/nfp/nfpcore/nfp_rtsym.c | 48 +++++------- > > drivers/net/nfp/nfpcore/nfp_target.h | 2 +- > > 17 files changed, 176 insertions(+), 202 deletions(-) > > >=20 > I am working on getting rid of RTE_LOGTYPE_PMD; all driver should be usin= g > their own log type. >=20 > Looks like this driver has a lot of places that need fixing. > $ git grep 'PMD, ' > flower/nfp_flower.c: RTE_LOG_DP(ERR, PMD, "RX Bad queue\n"); > flower/nfp_flower.c: RTE_LOG_DP(ERR, PMD, "rxb does no= t > exist!\n"); > nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "%s: area alloc= fail\n", > __func__); > nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "area acquire f= ailed\n"); > nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "nfp_cp= p_area_write > error\n"); > nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "%s: area alloc= failed\n", > __func__); > nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "area acquire f= ailed\n"); > nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "nfp_cp= p_area_read > error\n"); > nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "%s: read error from > socket\n", __func__); > nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "%s: unknown cmd %d\n", > __func__, cmd); > nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "%s: read error from > socket\n", __func__); > nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "%s: error writing to s= ocket\n", > __func__); > nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "%s: error writing to s= ocket\n", > __func__); > nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "%s: socket creation er= ror. > Service failed\n", > nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "%s: bind error (%d). S= ervice > failed\n", > nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "%s: listen error(%d). = Service > failed\n", > nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "%s: accept cal= l error > (%d)\n", > nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "%s: service fa= iled\n", > __func__); > nfp_logs.h: RTE_LOG(level, PMD, "%s() rx: " fmt "\n", __func__, ## ar= gs) > nfp_logs.h: RTE_LOG(level, PMD, "%s() tx: " fmt "\n", __func__, ## ar= gs) > nfp_rxtx.c: RTE_LOG_DP(ERR, PMD, "RX Bad queue\n"); > nfp_rxtx.c: RTE_LOG_DP(ERR, PMD, "rxb does not exist!= \n"); > nfpcore/nfp_cpp_pcie_ops.c: RTE_LOG(ERR, PMD, "NFP lock for > secondary process failed\n"); > nfpcore/nfp_cpp_pcie_ops.c: RTE_LOG(ERR, PMD, "NFP lock for > secondary process failed\n"); Thanks for your review! This patch series just the first step to make things right, and we will sen= d out another patch series=20 to refactor the log system of nfp PMD, which will solve the problem you poi= nt out. Do you think it's okay?=20