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 EA58FA00C2; Thu, 10 Feb 2022 11:16:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BCB644013F; Thu, 10 Feb 2022 11:16:14 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 4E18340041; Thu, 10 Feb 2022 11:16:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644488173; x=1676024173; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=Pa+SmOlXrMj3+eXApE6sL7NoTwFFC0IVLp8T9gECFE0=; b=FgnKG7o61g7krjERRGDXPr06tMqeRa1n4OYqwbMRxJegngyaeQL7bpIR ugEh3szuxz4MvjGIUJbT8H3KNtzFC+rTenaZCFcOCW/TYfQBOpeXwC8PX mRpB3RJLUKeRgIUcdz93RsjBqmm8iJ5LS61PpE3G5deTCZAcRZi4x8l29 8P1gzdk/8fTXzGAOSuiV8qw0YOiv2DhnqElzeEtRbkGEqmWNzqipw4hqr O3D335gFZyij/x9iIhDIpGX5VvGvRdpfnVuljrKrg03C9YLAf76UK85v8 ayt+lduXUG8wslEnlVre8Z9mPqSDtHRT8fByJxA1EsgCUYD0lORXV9PZn w==; X-IronPort-AV: E=McAfee;i="6200,9189,10253"; a="230105298" X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="230105298" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 02:16:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="485632482" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by orsmga006.jf.intel.com with ESMTP; 10 Feb 2022 02:16:09 -0800 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 10 Feb 2022 02:16:09 -0800 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 10 Feb 2022 02:16:08 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Thu, 10 Feb 2022 02:16:08 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.170) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Thu, 10 Feb 2022 02:16:07 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UnCNQVrD0UbLlZ7JxQLsUeREYJiwfIlJTAKHOxCxIuuguZ6EFnVyMq7cY2VsLwzi1VtMJbTonvoFk7x/fdYWMJ+oSYsUzd1OGG6u0h8F85hhH14QW9q+jeSKoV+Ay0Tt11Fp5l84n2LobaERe8dL/FwGdsXUAzGhcBCePIfL7epljbs5uu3xwblN1w7oPS0NntBiozik4UrjWLP7WKE0MIDw6i150rqCBeJat1PAW9ctqD5UDu8KMlBzlrtGLJ8UY4qedpxCVVhlXFS3t+m5fC0NNqORDik2gqr+abxshQsDCen3U34Mn9IEY+zsCTv0yfwzFPxmz0rOkkW6uJ5mfg== 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=7jfrgx8mL2tAGJ3FVmOhpTsy9RCybe8wdESwkHLZ9yw=; b=IORs0ucAOaZXuxI+tVKk+ueNp+5vyISiothDM+4GGr96oviic/taALaxqZFF61TidO9AAoYUKhx2btlzYK//ZK388mRaJXlo5Hd57wTGp4qV6nN7toPVEFD7sw41UctXT7KZJyZEi7gPSWKCCDCtqefyF5dG17PEil5DbJMgr/bxQRUCuHsxLdIFIc9OMp5PDX6CV9IRRylhK2GW9ULxFnzg/D2DJaIYaKLT460vj7W1Pa1WOzoXK0Zh7Z6xgVJ/D/SvdGqMaLv+F0Se7OdQ/4Fyh63afnF7ljkjHoW0Az8HUZ6eN9Qo+atvWzv2Em/MPuW9qnMr8/If7gYeoE4rAA== 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 BL1PR11MB5400.namprd11.prod.outlook.com (2603:10b6:208:311::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Thu, 10 Feb 2022 10:16:06 +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; Thu, 10 Feb 2022 10:16:06 +0000 Message-ID: <56bcd034-1e9d-c172-b449-3ee71d2a2835@intel.com> Date: Thu, 10 Feb 2022 10:16:00 +0000 Content-Language: en-US To: Jiawen Wu , CC: References: <20220209104213.602728-1-jiawenwu@trustnetic.com> <20220209104213.602728-9-jiawenwu@trustnetic.com> <004201d81e54$c0401160$40c03420$@trustnetic.com> <09f2fe07-b15b-9b05-b57c-54eaef14fc94@intel.com> <004501d81e63$7cb39890$761ac9b0$@trustnetic.com> From: Ferruh Yigit Subject: Re: [PATCH v2 08/12] net/ngbe: fix debug log X-User: ferruhy In-Reply-To: <004501d81e63$7cb39890$761ac9b0$@trustnetic.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0057.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2af::14) 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: 285cbb1f-3848-41d0-1ff0-08d9ec7e5970 X-MS-TrafficTypeDiagnostic: BL1PR11MB5400:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PPBEC/XJs77njlS5ZRreOjpSRxqhfIsXL5txhE0zslCmEYnBb3toajur462UwAToj8D9sIuTP7QlLP4ntMRsTwtBgTlC2FeYEs9gGnspeBHLSTNahz3UreZ2PQZ9Y+qK3K0n1tgAjGV9izlueimKwqM6Zxeq/vSlwOQ49yE9ELHLRkzzeDPWD81ajH2oLo4TP0+LNriTY68TyPDeJHx3heQMOuZ6ehaG48x4hr/JQmSwnv4/5HM1G94N/lj+bTL0Cb8phHawdetS6Fwj/IPd6VGBOun32Tf/fhTWZvXz8US5PRtz/uVAj329O9Ws3xgdbVm29jQiRaEuQOeou0WQetZnqrtcn9gfDBKQ8w8ZY0Hq+acXq6jkLtv9dUFteLAHOwTkgfhPksZrbprffqMCPEthw2Nv3iWGEPvPkUKck0By0TNKTiDWYZjomg/s1loKZ1Icc/wVFV5ue/8mEUgiYpw5HPS3C561jMkcFN87u4rU/vC07a9Nksw7yLHsugyld0Mx0PjtXWuFghlL67CBJwoK8MrfAgeAtEaT96bYCZIRUPJEUucRVtw1HYLMzimOoQqZ86HzS9yyzty4Gsxiwtp82MUj20lVPkEHGgnsh/AqIHuOk2p4inoC35bG/EmtHzDSHtXMJhanryAdPpoua36eukh4tC03n2y5IwDwBJnXxKMz0gfdDVE9/PwHaBdu8J2sBiEtVIG17b3wBzUJ5g== 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)(66946007)(83380400001)(6486002)(82960400001)(316002)(26005)(2906002)(186003)(2616005)(31686004)(86362001)(66476007)(44832011)(6512007)(5660300002)(8676002)(508600001)(6666004)(31696002)(38100700002)(36756003)(53546011)(55236004)(66556008)(4326008)(8936002)(6506007)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dmE1SXBxbjZWeWJ5N3J3M2d6L3RkejFYbFVoOUpNT1NsOHZ5VDZhaWxRcW5O?= =?utf-8?B?NWNTdE5hU3FPUmtodlhtSExhV2p6clFXODJobGFuRWc0RW1GQjAzSHF6MzR2?= =?utf-8?B?bk1NeFBnQTh5YjdmQVZSenpiR3N1Uld0NlM3bklrdGJCbFhsY2ExRlF5TW9S?= =?utf-8?B?cmNaRktsRWVDbkJ3UnhzeDFDQlkyV0JTNjYwa0xXU2JiZ2hmRU5vYmx3T3U5?= =?utf-8?B?dXpsbU44YmFodVVPQ3NJWUMvdFZTNndESTZ1ZG4wWk5qS0M1WFhJZDdFVm96?= =?utf-8?B?VXZBZEloUmJ2VEloNkRRNnkwdEdC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B?OU9QeXg1Q0cxSzRmU1UwRjAveS8zS2k0M1JsR2lCMTkrd2NLTUlzUWx0eUZt?= =?utf-8?Q?gb+5zUBGwDY+HHRNnZuFSgw=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 285cbb1f-3848-41d0-1ff0-08d9ec7e5970 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2022 10:16:06.2221 (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: kuOMJWwrQ90TDwt2PzqsSrp31gayxZk8nQoaikrER4MIVM5TMRY30V3IxBpRm8/WL2Qf88S9bzcR08H60N5x5A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5400 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/10/2022 9:49 AM, Jiawen Wu wrote: > On February 10, 2022 5:03 PM, Ferruh Yigit wrote: >> On 2/10/2022 8:03 AM, Jiawen Wu wrote: >>> On February 10, 2022 3:07 AM, Ferruh Yigit wrote: >>>> 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. >>> >>> Okay. I just realize that this is going to be a big change, so I want to keep it to >> a minimum. >>> Anyway, 'DEBUGFUNC' should be removed, because 'DEBUGOUT' already >> contains the function name. >>> >> >> If it will be big, we can move the fix out of this set, to not block set, and send a >> log fix later as a separate patch, what do you think? > > I think it's actually better. > As long as you commit to send log fix after -rc1, I am OK. Are you planning to send a new version of this set, or will it work if I just drop the patch 8/12 & 10/12 of this set and continue with this version?