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 8F96241C35; Wed, 8 Feb 2023 02:56:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7A51740E6E; Wed, 8 Feb 2023 02:56:41 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2057.outbound.protection.outlook.com [40.107.92.57]) by mails.dpdk.org (Postfix) with ESMTP id 9606140DDB for ; Wed, 8 Feb 2023 02:56:39 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nA1eHhWdN9QSxd5gINdBRgpjuIFsL59JmfGxJAPwBONE7WEAYTrD1kCy9peqrRykODSUoI/KsHcLq4Cdl15SK0i3mEoMAReFQhW8RlIrTmBPZe9w8YRXs+BfdBKWtf4+TuhrUuFArEHqzkotghow60TlbW5IjMk2fRSnYQW4HsWbITmxvZj2rsZCYQgFGUYCAO3cs2NR3Hj+VUzUDUfMdlo3RWLOI5SljcctQ3V7y0v2bQAJp7PhF8UusBxKKgKsVGEx5G9YzKgmU86pBvxMc0OeL5dhcZkwqkieIAihJWT9/pgaYpQ5l3HEi6PxvvSrtQbNpn25PmIC25roLebixQ== 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=dkjRJca9DifTo/o8Xo5nppqXYLqxdVbGqFfrZg/jT5Y=; b=e1kDZAfXdsZJeC2vWxn8R4zLLHp2pJTlfvLI0ze16KcjtThawDKVvNQAh5fk9M63/nL1/tcxhFgiRqQez2M08caqjV5jHYKzxShbo1YQZaVJ21loPNAYO/ICqunxK+SEU6FOw/qQeURch16+162MIU9rq4UkeObnZJQmzwbF12n2IuJGOSVhzMGrGrfR5hCtA4jP47qhcMi1KI7UjAozWgSOiZINOdyrDlGbEmULbSdBGa3I/yGR8NTt7vyM/5nmoooF87i6wvVJQR1qGd7doMJ65ZlTNEFwqvYv7RUlSBCpp9RDTD0fJ8ggcAZQRrxkGCFyKA1ETemD1L93joTB5w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dkjRJca9DifTo/o8Xo5nppqXYLqxdVbGqFfrZg/jT5Y=; b=veAxN/3jKPUZje0QqbcsIS0KO5N8U2kmGKOjpISX0B7+LD9osr/WQUfjPe3q2GmuSXh8cpxWTfoeyaWJTROarRXhhiCjvmudLdQVIIS9zga7Puqt5L6v630zLwO8CXPo69f1s93iOQks6NvsFP0K/2lwy663879HfwnqHgWu4yw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by DS0PR12MB6485.namprd12.prod.outlook.com (2603:10b6:8:c6::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34; Wed, 8 Feb 2023 01:56:37 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a%8]) with mapi id 15.20.6064.034; Wed, 8 Feb 2023 01:56:37 +0000 Message-ID: Date: Wed, 8 Feb 2023 01:56:32 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH 0/3] cleanup the PMD Content-Language: en-US To: Chaoyong He , Stephen Hemminger Cc: "dev@dpdk.org" , oss-drivers , Niklas Soderlund References: <20230206070549.27265-1-chaoyong.he@corigine.com> <20230206082847.79056c82@hermes.local> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P123CA0065.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1::29) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DS0PR12MB6485:EE_ X-MS-Office365-Filtering-Correlation-Id: 20a6717d-c480-4ecc-e933-08db0977b6a7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: inCr1yHixOFUstor94JkK2k+n+1DYupb4gH+qfjs/Lyl2JUTmLtZJ3zssxCnuwO4pymcaoGfFrP+w2IPjEWqj1EHZo++6QMj1KCaKKMzTcp8YEJpkioT52G8VlhF/N12E8qiiNymGkIr9o6j4Mq9GBLaIwKmaf2C1aKUf1aF1iDd8xeXw5mzcBZS1dPs6NtAPzcls2hyqcWmqtCVxXEzPEFlhd9JASPbTYpCVjctG+ZWNJznLf6Fk2Tp5ifUfWVOz8vHDnSydSZxi1snSa9ms3wZPV3inREH4IXiRDNFn7i5zDn1Fj0UZm+0in/Cmu+4FnkHPyoyXBN9yWY5wF2xNzhBIJYVy/+13RYuvEepZFXuEmRr+3MC0MSYdySIto4HQtumfvyEcfZBw/xYFhGEuLTkuEBBegTmO8u1qWoFj56pWUJnlJgm0jOc5ADZtPnXGiQrErasJLl7HX4PY1R+Kqraq24erLbzRzmkIrDP4gwWKOcpn2jWHh3oDQo6IYGfZLqYMQvz1Kn8fR1WExOZbPylQPHeSwmTfwB2HEqbSj/NgfiNlCQ1PeicKfGJGIYavNObSgXUvAm75HR2aj/UzS2Ix+CyfE3nbI2ZBmlZja0XKn1HsmKkea42yVpfifFtJz6gq5d3Fi3Jv9+7+MFiw5eHL0Vcb21W2DMCbHC4xg6Gx/w8G1UkFt5pWn7lNpg5mYVQRwnrh1SUf2I59CN99jzxjmRp11AKSCYhvE3PXEI= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(346002)(376002)(396003)(136003)(39860400002)(366004)(451199018)(26005)(186003)(6506007)(8936002)(66946007)(38100700002)(83380400001)(41300700001)(6666004)(5660300002)(2906002)(66476007)(66556008)(8676002)(4326008)(6486002)(53546011)(478600001)(44832011)(2616005)(6512007)(54906003)(110136005)(316002)(36756003)(31686004)(31696002)(86362001)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dlRnTDZibmttcUg1MzhpZ2x6S25UUVorNVd0VTBhSk56K24vdEhPUUlvakFl?= =?utf-8?B?NFFWdkFsV01CVThXZVNBY3hzTnlCSzhkNXo0ZzJBYnpVT2d2OUFpb1N3N0xa?= =?utf-8?B?VDZFM2MwYnI4WkFKSDlJTWpRZG1BR290allIWkpPMk5qcm9YeHFRWk5RNFJP?= =?utf-8?B?dmg0alVTWGJRK3RPNmFGeSt3SUp6NVhRTmxwK0RMQlpheGI0K1hnQVJoVXY3?= =?utf-8?B?bWFsTGdGTmhiYmxtd0x5ZWVnSDJHS1hmeEZtRnYwMU93UmxUQzdsUFJGRVNk?= =?utf-8?B?YjZCdzZidzlyZ1FqbEl1VDZXNkcwMEFLbXRxRUVoRndaYlgzWGhQZ0JwWjU4?= =?utf-8?B?ZnFDdkZiSWRjb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S-Exchange-CrossTenant-Network-Message-Id: 20a6717d-c480-4ecc-e933-08db0977b6a7 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2023 01:56:37.6084 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XSNWoWaw2nWAiGyljmDTWajNYuJtc4SlRWZ5Vfdemz15CCQ1081bLT0G0/Dyljvj X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6485 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 2/7/2023 2:17 AM, Chaoyong He wrote: >> 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"); > > Thanks for your review! > This patch series just the first step to make things right, and we will send out another patch series > to refactor the log system of nfp PMD, which will solve the problem you point out. > Do you think it's okay? Thanks Chaoyong, I am merging this set as it is, remaining cleanups can be merged as they received.