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 3DC0F41C23; Mon, 6 Feb 2023 17:28:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF7DE42B7E; Mon, 6 Feb 2023 17:28:50 +0100 (CET) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mails.dpdk.org (Postfix) with ESMTP id 7B516427E9 for ; Mon, 6 Feb 2023 17:28:49 +0100 (CET) Received: by mail-pl1-f171.google.com with SMTP id e19so4735246plc.9 for ; Mon, 06 Feb 2023 08:28:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=/oBh6F2cSMLF7wTp4SmBlCV3ytlbzpBFe5gfVPmhLC4=; b=NI+UjOiPUc9fkpjeeiTHYhMHulkcq05FpSf+xomvMWiHjGn86V2pNmz42f79K4NGhb FXf+uB58fsyp+gpEENgKvrkrD3MwGxlSupvjaPWYZj1eVUMuqHrKWyttO9rDPKfjeEuy TotvJmZid7wiUaavO5ae9alb48YZ9iUzSyqVJjNHAycMAWFUXaN5PrE6U6hMH+rWw9na jrtN4EVHps3aRLR5HFEQz2ZELEloACeU3V5OZcrCKsk85G7e1q0BCpfg8V6b7Wpu+F7S fXsbJ8i4VjmDYVp7cZgNDM1OXvWRhUrLZaySOpgjPQz4xitHo+OMEbJjB+/HKXp3hOQh VazA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/oBh6F2cSMLF7wTp4SmBlCV3ytlbzpBFe5gfVPmhLC4=; b=bFBWmyF5nhqlIqgESNd1tmAHx3sT30wGqQBjMBgIeIfTdybH3hWzsJamglgdKpztl7 TlUbmSojccuien34ZozR4Obj+wlIBSaoWcVrO9hSHNk8Ivw+8/kk31dmagz8rGiy0P+n uEnts1kpC+67nKcjOptgbTDh9GC3nj+0iMhtIYRm26GckE0OWPCvbYPPwT73sV8l6rlH HgN5ylj+mxLAW2NQXDk/oNLdUgAlBWfdH5nKbKaVNGT3bAwfvpjbwGdyBfstYcvyi1sV dYNFI/LC+8+KBUjmnwx+zf/PkXZTzUV6plZsy6bjBa3sIg71NIpX3IHdNAnSFplMkpKu bqrQ== X-Gm-Message-State: AO0yUKUheHkSJBCEsU6pbi8PP4VV7Dc+a8ZpGT+I/V/7k03T40aT8OEg 9E5zLFOST+Lx0gqA71DocLF/pA== X-Google-Smtp-Source: AK7set8E3XGPKD+qU2ko/tyPwxS76+/eisygOnN3tMjUwlXSkptn6TDdROOMo/IBIKVdgjDZYQ6Nww== X-Received: by 2002:a17:902:f155:b0:198:fb24:95f7 with SMTP id d21-20020a170902f15500b00198fb2495f7mr6139757plb.29.1675700928368; Mon, 06 Feb 2023 08:28:48 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id l4-20020a170902ec0400b00176b84eb29asm7059981pld.301.2023.02.06.08.28.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 08:28:48 -0800 (PST) Date: Mon, 6 Feb 2023 08:28:47 -0800 From: Stephen Hemminger To: Chaoyong He Cc: dev@dpdk.org, oss-drivers@corigine.com, niklas.soderlund@corigine.com Subject: Re: [PATCH 0/3] cleanup the PMD Message-ID: <20230206082847.79056c82@hermes.local> In-Reply-To: <20230206070549.27265-1-chaoyong.he@corigine.com> References: <20230206070549.27265-1-chaoyong.he@corigine.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: > 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(-) > I am working on getting rid of RTE_LOGTYPE_PMD; all driver should be using their own log type. 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 not 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 failed\n"); nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "nfp_cpp_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 failed\n"); nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "nfp_cpp_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 socket\n", __func__); nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "%s: error writing to socket\n", __func__); nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "%s: socket creation error. Service failed\n", nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "%s: bind error (%d). Service 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 call error (%d)\n", nfp_cpp_bridge.c: RTE_LOG(ERR, PMD, "%s: service failed\n", __func__); nfp_logs.h: RTE_LOG(level, PMD, "%s() rx: " fmt "\n", __func__, ## args) nfp_logs.h: RTE_LOG(level, PMD, "%s() tx: " fmt "\n", __func__, ## args) 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");