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 2910EA00C3; Tue, 20 Sep 2022 20:01:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BE77B40DFB; Tue, 20 Sep 2022 20:01:52 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2072.outbound.protection.outlook.com [40.107.243.72]) by mails.dpdk.org (Postfix) with ESMTP id 904F84069B for ; Tue, 20 Sep 2022 20:01:51 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dQdeZXjygMJC+OvCLbB+JcNCH/FqUm7ASoZFiO2nB1V+5svrrv4Z6aR0LM734rqu2I1FzcJ7LiHhCzZ7emoSvk2dIDYseH58uJ7/z3nANpMBjlnfm1S4aPJ1xF/4avjU2eJxWRpNL1AbM1kQrxHOswGpoAUQjJhFhTpoK4JGwBh9LohiTDPmCH0950I1cxsBRbzbc8ooP7KBwyabc3roxXgdT+LUgjxH/l4RCxsGqDphf9CiJv/zpUBKZzj5tWuc5O0Ej7nlq/VjyYNM6Qp9a3myFJkGSoTvfdvfHeYrTRgtzJAtVTsnvFn/S9BXIHwTdA9b+giKIlsnonvzYXvgyw== 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=BNveEC/K9Q6o/P0aMtOJ/hNgemdEXHy//oziTqx221o=; b=JwY+aFQchXvnvcpPA0yrBMH4+fJjM8MaRNRdKeWsZqCZL6hg+UkZLmoy05st7gtyyCYZ51y+pfjVUPuVbuHGv7WrPE0dbIQdzwPCIZnP+IGwxKh5qmOk28KPDAkmwguiZQaM3/GBsrO0ffNzOwpMAUkkiatbScn1/LlT8FcmKHBkaHwmoGoWDBYC3pSjXtCT7Oo5f8fdpRwZdNAmgIgAhO2rwsjmia6z5VMdwtCwbK/hWrA/jDON6zkDtIGEEnoG5hzXgKm3xxTxOOdjhMD4LhwPyO6+wtU4vPF2PuSPp6OepMGya9tFQtrcfFo0YxcfsrprFRlIehoQvAq8YSSGgA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.80.198) smtp.rcpttodomain=corigine.com smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BNveEC/K9Q6o/P0aMtOJ/hNgemdEXHy//oziTqx221o=; b=BgWP9xMGdwHErvrfS5uSVoL/r2UHLsTp4Es+lKR0RFL0G4i3BgvhFXGnsm7Qo3j5/mQA9kXMCMTToQ808APb0MRkgf6sBaG77zSltnCloeiq8LNgRNpKNL05+INCw7e+YxAi9hgWEq4eI0KtQCANKGoV6QhV8kphWYWPXUfp/AE= Received: from SN6PR08CA0030.namprd08.prod.outlook.com (2603:10b6:805:66::43) by CY5PR02MB9014.namprd02.prod.outlook.com (2603:10b6:930:36::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.16; Tue, 20 Sep 2022 18:01:49 +0000 Received: from SN1NAM02FT0014.eop-nam02.prod.protection.outlook.com (2603:10b6:805:66:cafe::df) by SN6PR08CA0030.outlook.office365.com (2603:10b6:805:66::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.14 via Frontend Transport; Tue, 20 Sep 2022 18:01:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.80.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.80.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.80.198; helo=xir-pvapexch02.xlnx.xilinx.com; pr=C Received: from xir-pvapexch02.xlnx.xilinx.com (149.199.80.198) by SN1NAM02FT0014.mail.protection.outlook.com (10.97.4.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5632.12 via Frontend Transport; Tue, 20 Sep 2022 18:01:49 +0000 Received: from xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) by xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 20 Sep 2022 19:01:47 +0100 Received: from smtp.xilinx.com (172.21.105.198) by xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) with Microsoft SMTP Server id 15.1.2375.24 via Frontend Transport; Tue, 20 Sep 2022 19:01:47 +0100 Envelope-to: niklas.soderlund@corigine.com, chaoyong.he@corigine.com, dev@dpdk.org, oss-drivers@corigine.com, james.hershaw@corigine.com Received: from [10.71.194.74] (port=53823) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1oahZ5-00019v-S1; Tue, 20 Sep 2022 19:01:47 +0100 Message-ID: <12848fb2-4957-1425-ea4e-0e4f62f13024@xilinx.com> Date: Tue, 20 Sep 2022 19:01:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] net/nfp: improve readability NFP HWINFO header Content-Language: en-US To: =?UTF-8?Q?Niklas_S=c3=b6derlund?= CC: Chaoyong He , , , James Hershaw References: <1661492343-23225-1-git-send-email-chaoyong.he@corigine.com> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1NAM02FT0014:EE_|CY5PR02MB9014:EE_ X-MS-Office365-Filtering-Correlation-Id: 696e2559-e2cc-435c-a282-08da9b3230cb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hGkYNMd0qbEs7YG29jT5mgYMDksKLvQ8hcl/Sk1Rxwe7p0rr6gxAF7H+RPYNpQrW1kmbzzf7pZJEXkgtQVbQEB+IGYByH1gKwW8k1tNOAjCeIUqqS5R1yiQczBhA23VvpiX1TFHePNbB0je134VmvsG3oFEzF/t8KUy75ltjDjRFUl37jkDGcu2623Nz84mwy46ZOrDWuSk45x3VmwB1Ok5EJ/ZS1Wl6Y5s3q39couzHwVRzb1CtDKo3zu9fyWUv2K75Baj5u2zzpPmsRGEpwH+GFZ6k2+xBrzcyrvADJ5AENDf1/2ZoyY1cuKlJC7FWbtNc/ZNuOV1FIhimVRzQr0cRPRJl02+opCPvl5OG9R9/a/rvWmsigGLmBFyLBD1tXumJdeW2aWDNELc37RgIRFf/KRcGmJdzUlzziMJzNmlUnq+PbI5ls1s2Fv9OHKdEbw0/O3DV4lF/Eg0oV5P3HK/jb7qIpm4QovEu/6McMIWuadCVR5PojkdrCOsV35NCXSf3ud+Eu9xVOzoRSYzKyUAgksfXtAaSpLeEEDskRE99lwCFhRzdz4syKbLBKFN5gJfYD/1OBtjJ5gQEgcll9GJY+hjLDOgQIrumxc28LlwpALkVmn+CtahbJd3P6Gq7OZ4KSqry9wRMO8/oHQ1AJRBDIdzUXpAmQCG/72TeQPei/QW4Us9EHrICwCO1JjGhf11NCpKcK5LxU/eIe3n4ZhXxC/JUPsZi31gmvSlQ8gmjwywEOxpibo7AADBpO3ZkM/Ue0sb8X2bklk6J3Pr8yGmaDTQMnvn3HBvJ5i8708M8aEWpjhl30DLHByPzJ9EgqjRDSEVdhGmly550yYVYQw== X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch02.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230022)(4636009)(39860400002)(376002)(396003)(346002)(136003)(451199015)(40470700004)(46966006)(36840700001)(53546011)(2616005)(478600001)(41300700001)(336012)(31686004)(83380400001)(82310400005)(66574015)(186003)(426003)(54906003)(4326008)(40480700001)(9786002)(70586007)(2906002)(8936002)(5660300002)(47076005)(36860700001)(356005)(7636003)(31696002)(36756003)(6916009)(26005)(82740400003)(40460700003)(70206006)(8676002)(316002)(44832011)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2022 18:01:49.3324 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 696e2559-e2cc-435c-a282-08da9b3230cb X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: SN1NAM02FT0014.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR02MB9014 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 9/20/2022 6:51 PM, Niklas Söderlund wrote: > Hi Ferruh, > > Thanks for your feedback. > > On 2022-09-20 18:33:02 +0100, Ferruh Yigit wrote: >> On 8/26/2022 6:39 AM, Chaoyong He wrote: >>> From: James Hershaw >>> >>> Prepend `0x` to the NFP HWINFO header value that is printed to improve >>> the readability of the printed statement. >>> >>> Signed-off-by: James Hershaw >>> Reviewed-by: Chaoyong He >>> Reviewed-by: Niklas Söderlund >>> --- >>> drivers/net/nfp/nfpcore/nfp_hwinfo.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/net/nfp/nfpcore/nfp_hwinfo.c b/drivers/net/nfp/nfpcore/nfp_hwinfo.c >>> index c0516bf..9f848bd 100644 >>> --- a/drivers/net/nfp/nfpcore/nfp_hwinfo.c >>> +++ b/drivers/net/nfp/nfpcore/nfp_hwinfo.c >>> @@ -108,7 +108,7 @@ >>> goto exit_free; >>> header = (void *)db; >>> - printf("NFP HWINFO header: %08x\n", *(uint32_t *)header); >>> + printf("NFP HWINFO header: %#08x\n", *(uint32_t *)header); >> >> Why driver is directly using 'printf', but not rte_log APIs? >> >> I can see there are already 'PMD_INIT_LOG' & 'PMD_DRV_LOG' macros for this. > > We have a series ready to convert all printf style logging into rte_log > APIs as well as fix some other style issues. > > We also have a few other things in our internal patch queue waiting to > be sent out. To reduce conflicts in patchwork we are sending them out in > the order as some of them depends on each other. And the one cleaning up > log messages are at the end of the pile unfortunately. > > Do you think it's acceptable to take this fix as-is and then a patch > that convert all printf on one go, or would you prefers we move touch > this line only once and create a v2 of this fix while also moving it to > the rte_log APIs? > Hi Niklas, Good to hear that you have patch to convert them to rte_log. Instead of changing the log content and API with same patch, it is better to have them separate. I prefer to convert them to proper log API first, and later fix the content of the log (to not update a line with wrong call). But order of patch preference is a soft one, if somehow other-way around (first fix the log content, later the API) makes your life easier, I am OK to go with that too (as long as both issues are fixed).