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 BDA76A054F; Wed, 7 Sep 2022 13:16:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6049740143; Wed, 7 Sep 2022 13:16:51 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2089.outbound.protection.outlook.com [40.107.223.89]) by mails.dpdk.org (Postfix) with ESMTP id 629F4400D6 for ; Wed, 7 Sep 2022 13:16:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UtGCfKMt7vntwP/NYZXuaFVP2y1wqA2FiJsJkG/nsuUAWqkePi1o+xbbEDaC69fjSAqlc53LtMncGVfDKcZaTDSLDNTKXQmqB0GE/qZhY7EHOlB8tAt4SIV+Ep+UAV5oL5xgGRwRQFx+m5Vs7DxgPWCml7Pa+XuknC5lkzGishk015O2UCdnYtr+sJN3MWaitGtraOA9TPRTg1aG2jwjaJPv30auHYv4eXZPbIHVuLmAxDtY9j7BQ6iVEgtr+bSkcGLjUv/D/LFtwR9dj5wbrMCfp8d9nWQ8FzYc7A9ZPHJxD2+Hsc+CCObHhp8xnR0gJ9UROvkDbjJNLFg6Obb1rQ== 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=hBYBuWVKFqP/lXvsgwfB39b3mhxS7RpNY7CE9CJpZnA=; b=O7y+mO5HbAEO9xk63uVe7/Y/pS/W7B0yjOdeznH2mhoGH2q2EQa/p2gsOSURUoYu0acbgBI7pzaK01s/8oQX8T8WUjtA9QmV/tccphPNTakXbW6MWcG1oXgH8nMkAVVJ65ATbcILg7WD3JUg2YSBOSz59UJJlq0Azre9UJjqQFbZq5KfVR8Lmi8MmpRjhdAMS2RpvMq5eVG2fZmkC3Q3kaETPv+XjA1skROscJFU4sxDakiMHO9psyq2mJW2L9f1rD1LOhM+axK7t0OSd1aCOnEytGlCQ+2aSmEJL2crLFhUyVcQ/nxXFx5M6y0Vfc3EGRrIsCaAsliURbi9tVaJMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.80.198) smtp.rcpttodomain=intel.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=hBYBuWVKFqP/lXvsgwfB39b3mhxS7RpNY7CE9CJpZnA=; b=HFsL0779SDPq5z6FkmYN27Oy51xTR9DkBoCBgcQuLurda0Vj6IGbJs3iuR5F+VpG7jtuSVm++btQl591ne3dWHuGvWyQcagS1HEcWqEgfccqT6XYrBWxhX1yIJ/suPkeka3P12ZQjx5zWjBhrZQ3bSzOXkkr1tvtgCWbmKUHNvA= Received: from DM6PR21CA0016.namprd21.prod.outlook.com (2603:10b6:5:174::26) by DM5PR02MB3305.namprd02.prod.outlook.com (2603:10b6:4:65::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.18; Wed, 7 Sep 2022 11:16:45 +0000 Received: from DM3NAM02FT056.eop-nam02.prod.protection.outlook.com (2603:10b6:5:174:cafe::3c) by DM6PR21CA0016.outlook.office365.com (2603:10b6:5:174::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.4 via Frontend Transport; Wed, 7 Sep 2022 11:16:45 +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 DM3NAM02FT056.mail.protection.outlook.com (10.13.4.177) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5612.13 via Frontend Transport; Wed, 7 Sep 2022 11:16:45 +0000 Received: from xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) 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; Wed, 7 Sep 2022 12:16:32 +0100 Received: from smtp.xilinx.com (172.21.105.198) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server id 15.1.2375.24 via Frontend Transport; Wed, 7 Sep 2022 12:16:32 +0100 Envelope-to: junfeng.guo@intel.com, qi.z.zhang@intel.com, jingjing.wu@intel.com, dev@dpdk.org, xiaoyun.li@intel.com, awogbemila@google.com, bruce.richardson@intel.com, haiyue.wang@intel.com Received: from [10.71.194.74] (port=57902) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1oVt2l-0006ul-Vy; Wed, 07 Sep 2022 12:16:32 +0100 Message-ID: <2ec388b4-4fef-33c8-7cfd-099aeeb72728@xilinx.com> Date: Wed, 7 Sep 2022 12:16:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH v2 02/10] net/gve: add logs and OS specific implementation Content-Language: en-US To: "Guo, Junfeng" , "Zhang, Qi Z" , "Wu, Jingjing" CC: "dev@dpdk.org" , "Li, Xiaoyun" , "awogbemila@google.com" , "Richardson, Bruce" , "Wang, Haiyue" References: <20220729193042.2764633-2-xiaoyun.li@intel.com> <20220829084127.934183-1-junfeng.guo@intel.com> <20220829084127.934183-3-junfeng.guo@intel.com> <809cd2ff-56d6-72e3-e689-30b512283ab9@xilinx.com> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM3NAM02FT056:EE_|DM5PR02MB3305:EE_ X-MS-Office365-Filtering-Correlation-Id: 220bd569-57cd-44f1-a647-08da90c27337 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: t+OSl/s9hluMJR+RdWWEM6KlE3cUo4bEbAKoZqoc5TVRyoNvs0qePuEPt40GvvuPtIN2bhRNccBHjCSWOwgT6DWk/Yldj1ZN0qLIG19fdV6/O8/pFAu4sbhh5HrSv6Wer+lHaRufu4RRXcD6dNeHAPuJV9z4ZSVO/HdbIvseZH3r9khzWenzJuS70eWRshePvhN6gTY+GpQ4bgs7BV/l3rIyY0Z1+cUrmyZt9C1x8+X2lg5gvgFNwfAhHYDLE6Zo5gChdldeM73HT51A4gEMlRuoGebUQncfIPGSKE7VcTu3GMmF16ESFE+J0eN2dOqa+a9I142+iHz+2vUlUETt1RHifIaKWnlwQj6i1WdaXt/Yi/kJ3uQCoH9KYPg0xo9AlKMgahcIHAix4seIzEFRgswOfuuUlk8kJ287/aKvbM5hBvNdA4fXom6j/0OjlRq2SSEhHL4aLu9N5metNOPl2HQXbyJUT/5zFkf6RtEgAnvQv+oWWVFGHZu1O+IjfKAayc/Q8Uohcf5oQisO2tLhoIkj/L9q3LNt28+J2ZbZzXAhsDjoneyXJGSGyNqxyWUgSKM/e/VZC6Cq8T2DhMGLMxXDjZ44GAHGaJTUmQhfrh8GW1iXX+7gQlUHO6idIn9N0g8oUSKHX+FhrlUjyTqKgA0Yf2Tqf5HQn225aYUZ4pZe02qXxKbxq7bZ3evaqpNOlahLHHauZ7mJGLCml7POeMm5gUWa0SDiJgp7Jh4xzLMgad2E5X7Apde+JDO3ewn6q12/eyjRd3n/9oSUVJVgZJ6YsWMAkblGD/nb4pOnSifRKPeJ8eFJm0YjhDRrtYdY 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:(13230016)(4636009)(396003)(376002)(346002)(39860400002)(136003)(46966006)(36840700001)(40470700004)(336012)(40480700001)(9786002)(53546011)(2906002)(8936002)(83380400001)(41300700001)(426003)(82310400005)(31686004)(36756003)(47076005)(5660300002)(26005)(186003)(44832011)(2616005)(478600001)(36860700001)(8676002)(31696002)(4326008)(70206006)(70586007)(316002)(82740400003)(7636003)(110136005)(356005)(54906003)(40460700003)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2022 11:16:45.5241 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 220bd569-57cd-44f1-a647-08da90c27337 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: DM3NAM02FT056.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR02MB3305 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/7/2022 7:58 AM, Guo, Junfeng wrote: > CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email. > > >> -----Original Message----- >> From: Ferruh Yigit >> Sent: Friday, September 2, 2022 01:21 >> To: Guo, Junfeng ; Zhang, Qi Z >> ; Wu, Jingjing >> Cc: dev@dpdk.org; Li, Xiaoyun ; >> awogbemila@google.com; Richardson, Bruce >> ; Wang, Haiyue >> Subject: Re: [PATCH v2 02/10] net/gve: add logs and OS specific >> implementation >> >> On 8/29/2022 9:41 AM, Junfeng Guo wrote: >> >>> >>> Add GVE PMD logs. >>> Add some MACRO definitions and memory operations which are specific >>> for DPDK. >>> >>> Signed-off-by: Haiyue Wang >>> Signed-off-by: Xiaoyun Li >>> Signed-off-by: Junfeng Guo >> >> <...> >> >>> diff --git a/drivers/net/gve/gve_logs.h b/drivers/net/gve/gve_logs.h >>> new file mode 100644 >>> index 0000000000..a050253f59 >>> --- /dev/null >>> +++ b/drivers/net/gve/gve_logs.h >>> @@ -0,0 +1,22 @@ >>> +/* SPDX-License-Identifier: BSD-3-Clause >>> + * Copyright(C) 2022 Intel Corporation >>> + */ >>> + >>> +#ifndef _GVE_LOGS_H_ >>> +#define _GVE_LOGS_H_ >>> + >>> +extern int gve_logtype_init; >>> +extern int gve_logtype_driver; >>> + >>> +#define PMD_INIT_LOG(level, fmt, args...) \ >>> + rte_log(RTE_LOG_ ## level, gve_logtype_init, "%s(): " fmt "\n", \ >>> + __func__, ##args) >>> + >>> +#define PMD_DRV_LOG_RAW(level, fmt, args...) \ >>> + rte_log(RTE_LOG_ ## level, gve_logtype_driver, "%s(): " fmt, \ >>> + __func__, ## args) >>> + > +#define PMD_DRV_LOG(level, fmt, args...) \ >>> + PMD_DRV_LOG_RAW(level, fmt "\n", ## args) >>> + >> >> Why 'PMD_DRV_LOG_RAW' is needed, why not directly use >> 'PMD_DRV_LOG'? > > It seems that the _RAW macro was first introduced at i40e driver logs file. > Since sometimes the trailing '\n' is added at the end of the log message in > the base code, the PMD_DRV_LOG_RAW macro that will not add one is > used to keep consistent of the new line character. > > Well, looks that the macro PMD_DRV_LOG_RAW is somewhat redundant. > I think it's ok to remove PMD_DRV_LOG_RAW and keep all the log messages > end without the trailing '\n'. Thanks! > Or you can add '\n' to 'PMD_DRV_LOG', to not change all logs. Only having two macro seems unnecessary. >> >> >> Do you really need two different log types? How do you differentiate >> 'init' & 'driver' types? As far as I can see there is mixed usage of them. > > The PMD_INIT_LOG is used at the init stage, while the PMD_DRV_LOG > is used at the driver normal running stage. I agree that there might be > mixed usage of these two macros. I'll try to check all these usages and > update them at correct conditions in the coming versions. > If you insist that only one log type is needed to keep the code clean, > then I could update them as you expected. Thanks! > I do not insist, but it looks like you are complicating things, is there really a benefit to have two different log types?