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 61E60A034E; Wed, 9 Feb 2022 20:07:20 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4B66F41141; Wed, 9 Feb 2022 20:07:20 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id CFBDF41141; Wed, 9 Feb 2022 20:07:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644433639; x=1675969639; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=DNEygbv10le2pcuxNAXMdT1zUw6zRmjan39qFsLkZuw=; b=CZ/zRixomg5puX1EQ8DtNp84F5CDfd38KiZdR1EH/trdyoWnmWYDrkfX oF4at++SZGHdtBvlbHzn2yXAFqlO00ioa/NeS4q+5W9v6UIxvc1RzAr9Y 5LIHOi0dnTGBN7MsFRNtyy/LspGAi3A5p6wV6Z81Yx7BXEo5xzes3i5vg geJjIbUIeni4FESejJqhG32T7KqZuAK7tC7c54xe7cgzHU75rhZtbQGf7 QhGEJDZWymZLZXdF480Gs7ibdHJx3iRKhN0nKUwocdguyfYiO2ItyR7BD UO9KnHYymsXLxvt4s5P7NjJLXRVD9jCEJHELAFI6hXQNAT1xm4BltOp9U Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10253"; a="335719324" X-IronPort-AV: E=Sophos;i="5.88,356,1635231600"; d="scan'208";a="335719324" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 11:07:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,356,1635231600"; d="scan'208";a="568357143" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga001.jf.intel.com with ESMTP; 09 Feb 2022 11:07:17 -0800 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 9 Feb 2022 11:07:17 -0800 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 9 Feb 2022 11:07:16 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Wed, 9 Feb 2022 11:07:16 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Wed, 9 Feb 2022 11:07:15 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JoVyt/w8u6BCBB1opk5HEh/xw+K2TEsMK/vYr5qI6i4QYRominSN2BKTyDU/16K1+LkfjjIpQRXTIPa1LbcM/dUy9pwMqqUDGZMbc5DuqcAk5ZsJYM38UFY4oK19Qz0S2TYaweMDF1C0LYmU1OshpLqgToA/f0GcqxWcLnLft5ZMcXx2ZWhcdNN/VVXU84DU3jZiF6wuZtpmxfBJEiW9td71Vkg8QEcTZSy9SfNEjJ20mri2NKimZeZwYY1WLPG8KRR545Q3DM9IMnZ+RSGyJ4PxFTpJap87Lir+WP5cdFQ14BUIqYBGNrjIEJgOPwIYyFbhU9PGnhpsCpXMgpuB8A== 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=hPcQHvzDc5ms85Em24CuX1Ujf6VsgbTkR8N39NH4RM4=; b=IJmsObufkMW47sj51+ZpOom/+oXgcXNDDi+bNzVfGmNgG4giXyKauE48YDi39Z1BNLUOvUeJLGrxYjM50T/1u/Tk8vgT/pQI0jFyjVaquz0AZ+7QWcF9jG1+2ds3aslXAn74Kcoz8WmZ6o3hp387U9P5rwAEc2jRj8b9avVIQiPy2MDaGIr1+IhMxvYDc741dgXIO/636xPW6DNGEPfMu730hq04pwsFvMjv27TRx6ssE4tbI2EDPAoJt8Wkowy0Jyylr5VxGcoFgd6SZ1z5tlCSIKjv1dyTHiYTRncaqZ6KHvUu6gJXIut8Q0OM3GOxBlHo4N7YiXkZHTFKH+RyoQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by BL1PR11MB5222.namprd11.prod.outlook.com (2603:10b6:208:313::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.11; Wed, 9 Feb 2022 19:07:14 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2%4]) with mapi id 15.20.4975.011; Wed, 9 Feb 2022 19:07:14 +0000 Message-ID: Date: Wed, 9 Feb 2022 19:07:09 +0000 Content-Language: en-US To: Jiawen Wu , CC: References: <20220209104213.602728-1-jiawenwu@trustnetic.com> <20220209104213.602728-9-jiawenwu@trustnetic.com> From: Ferruh Yigit Subject: Re: [PATCH v2 08/12] net/ngbe: fix debug log X-User: ferruhy In-Reply-To: <20220209104213.602728-9-jiawenwu@trustnetic.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0206.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9e::26) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cfe8951d-4fe7-4d6e-06b1-08d9ebff61ed X-MS-TrafficTypeDiagnostic: BL1PR11MB5222:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3173; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: O8pG3QKavlVNVcKdMkacg19OHYhTw6nTnpDV/Qrin7++6w2FAX6sHgLcxNxsDMsfNZqiYLbSXsxbHoLY26PbR8EzhNj/X6jmQPs2bUKpPLnjVXGKKl6TidLFMiTgRWzNOaji4KSQBTT7VOYuVgwMW+TCYLoUfvoEGO3LCdGR7jrHJCHTvzaVn/oB4DwkcQ6reMyU867FGkaACa5fa1PW8jXjdcflteoa1X8Ys6SuA584VsJYl4YroD4oR4JcjJNPxhLkpsOVyC+3nuKre4jHP9zJN0iJeTOiCISIzOrZppGQp+xXBCfadD3ZpP6azcs4nvY/rdXXoXekOlr0DbzC/XMqPDaxno552ZEvVAXG9ezuvwTs1XH3XlkvF/mHMwSz4FN2mvROMWbB0VPN5KdWW83WJCJOXZZ98psIdlY3wQnAT/iDnAHXD4mZCHxfmaNR/3qk/CEhLMzo/5uleQqZT4N/AqvtmNfqplYPUbJgCv13O6RslWjKZtGcDkP6a7OAE/aVf7n0jI3Sj7RykYb5tbdx8M1IdlArgZfTQRsvMzFA5uE2VF0viTUwdUTNfJjHrx3Do7FQqiohXhA45g2Pjb00NUuAwyPnrtCVJYg+iLYHp0qSSCT/SlyCtCH8oTzqNpk5AMYUEYH2UNaxGQ99yewZAOjSJwce11tfuYt4YiL/fbl9zVmaeHJZVMCXnebhfSXEOqQAJIGr1U/JkY5KxQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(5660300002)(66556008)(55236004)(6512007)(6666004)(82960400001)(66476007)(186003)(2616005)(38100700002)(316002)(6506007)(53546011)(8676002)(6486002)(83380400001)(508600001)(31696002)(2906002)(66946007)(26005)(31686004)(36756003)(44832011)(4326008)(8936002)(86362001)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UnUrTktnNmZPclBKRWQ3VDBwTFg2UTU4cGg5dG9KdmpBR0Z2a25ybTBGQXpO?= =?utf-8?B?NnNiYVZ5RXdCQThCT3gzWnJNUE5hTVdKSzF3VHdSWlk2OG5IMFdiMWt1SWR1?= =?utf-8?B?Z25vM0dWQTVQUFp4Q0hZYXhidWYrOUEvK2N0Slo5MDQwUTVPalFTenNuanE0?= =?utf-8?B?Z0x1SWxJeUJuUC9tK2c5b25ya0tnT1R3dTI2YTFuOXNaR25SOW5IOFZlQW5T?= =?utf-8?B?TmxsbFgySlhvNFJXbGsxOFlPUk5pRFNZWGdIeTNlMEpqODhkczRlOGo2NWtm?= =?utf-8?B?TDVFekNkM0dQRlUwbis2QkorREdVZzJLYmxlWmRUTWZacU5hQVhBWHFMY04w?= =?utf-8?B?RlVicUE0N2M4U1JqZkhaeEZzd1FzTkh1cm9lYkcyRkhITzJ2RXZJZkpZMy9L?= =?utf-8?B?U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network-Message-Id: cfe8951d-4fe7-4d6e-06b1-08d9ebff61ed X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2022 19:07:14.3778 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: muLNqseq7LQssybsXm+W2mkA3l5kIS7FeoCTDLkcg6tk7LKTxks4DVgnzoipgnmwkdwYEOTrRCKY8RoG1ntXig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5222 X-OriginatorOrg: intel.com 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/9/2022 10:42 AM, Jiawen Wu wrote: > Remove 'DEBUGFUNC' due to too many invalid debug log prints. And fix > that double line was added by using 'DEBUGOUT'. > > Fixes: cc934df178ab ("net/ngbe: add log and error types") > Cc: stable@dpdk.org > > Signed-off-by: Jiawen Wu > --- > drivers/net/ngbe/ngbe_logs.h | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/ngbe/ngbe_logs.h b/drivers/net/ngbe/ngbe_logs.h > index fd306419e6..b7d78fb400 100644 > --- a/drivers/net/ngbe/ngbe_logs.h > +++ b/drivers/net/ngbe/ngbe_logs.h > @@ -15,9 +15,12 @@ extern int ngbe_logtype_init; > "%s(): " fmt "\n", __func__, ##args) > > extern int ngbe_logtype_driver; > -#define PMD_DRV_LOG(level, fmt, args...) \ > +#define PMD_TLOG_DRIVER(level, fmt, args...) \ > rte_log(RTE_LOG_ ## level, ngbe_logtype_driver, \ > - "%s(): " fmt "\n", __func__, ##args) > + "%s(): " fmt, __func__, ##args) > + > +#define PMD_DRV_LOG(level, fmt, args...) \ > + PMD_TLOG_DRIVER(level, fmt "\n", ## args) > Both 'DEBUGOUT' and 'PMD_DRV_LOG(DEBUG, ..' are in use for same thing, but one appends '\n' other doesn't, this is very error prune and there are already wrong usage in the driver. I think no need to add complexity for something as simple as this, what do you think to unify the DEBUG level macros, at least unify the line ending behavior? > #ifdef RTE_ETHDEV_DEBUG_RX > extern int ngbe_logtype_rx; > @@ -37,10 +40,10 @@ extern int ngbe_logtype_tx; > #define PMD_TX_LOG(level, fmt, args...) do { } while (0) > #endif > > -#define TLOG_DEBUG(fmt, args...) PMD_DRV_LOG(DEBUG, fmt, ##args) > +#define TLOG_DEBUG(fmt, args...) PMD_TLOG_DRIVER(DEBUG, fmt, ##args) > > #define DEBUGOUT(fmt, args...) TLOG_DEBUG(fmt, ##args) > #define PMD_INIT_FUNC_TRACE() TLOG_DEBUG(" >>") What is difference between 'PMD_INIT_FUNC_TRACE' and 'DEBUGFUNC'? As far as I can see they are for same reason, and both macros are used. If they are for same reason can you please unify the usage? > -#define DEBUGFUNC(fmt) TLOG_DEBUG(fmt) > +#define DEBUGFUNC(fmt) do { } while (0) If 'DEBUGFUNC' can be removed, why not removing from the code, instead of above define? This is your driver, you have full control on it.