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 3891741DC8; Fri, 3 Mar 2023 14:54:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C4E5A40687; Fri, 3 Mar 2023 14:54:34 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2084.outbound.protection.outlook.com [40.107.94.84]) by mails.dpdk.org (Postfix) with ESMTP id B4077400D6; Fri, 3 Mar 2023 14:54:33 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EfKwzoLth9ppj4XzcV/VUP6hUYGHj9X5FW9gXupPj88hxuD5MHldaEqAeQP2WuP3Dtv4/OT9w+xFFtpN2GfkbqNMfajw9ep109bZqDn7idd1MBjeLCF0guyZK4Y6Y8TXn10Gr1HKqYgQ7nCvGFc1QnPGHy0VbL+r+PBdWu+KyCpDZKrweEtbcRNF67YkzDbwkRqASjCV3JNDV8uP9jaHpDVWLnGfctb/ypSqoXfSXTP9CUborIjPfVVs07VLCjuZ2pOMzOqJf5/08Kvte77Bta1fGAhOxJhMdBNxdW1RhKvI+Tg8txZruXrlGnZCpTbc+GVbvzmEce00ZTuR8wE2Wg== 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=c1yGdLjU/2uj7enjdsx06bgGk+gq88HS6W0097Kn4xc=; b=jJempZf4HaaOs105l70E7WeHGRdNL0YeY6D5ZTR7AJWlZx7mgGyvnzGXEIQQImuM3mgKOb7Vi2tQcOgh6OXUaNDrs5Q+TuHKWze0xQc2MiPj3DjmofafsKdhGNr+R+DepDFYT5Bq/9HUZ10hAarcfyVkx0FH87honAUY2nlLR3Y8R+TMRNMLwtWhwZItm1xqi4Oc6EqFSI6OdHS3eRtIdyVWvOV3erID8w0BQQTSAbT0/swIAkdhQcdiwt2lR+hzYVQuVqsUWzbAd8mxfY3ZjNs2YPxzEtLY57RbbJIPPcuV15DbCDV2+r7WCGTP0NLDWbHy7+I6wr8LdsJ6dIUNDg== 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=c1yGdLjU/2uj7enjdsx06bgGk+gq88HS6W0097Kn4xc=; b=teFhHPUMgD0/O++svSRwve+71KyGMzfmPSjfq3+hduoqP/4FNMGYH+OjMW7ZilwVvUArnjznd7dBVJE6EeuHeOKPEEwlXoGL9rXGpQLtw5ZvnYZbDJp0i35WJwgCADYSWr6oScpF7vXmZZaYN3Lw0B2DREcqc/bJFrBRi+nVnUc= 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 SN7PR12MB8060.namprd12.prod.outlook.com (2603:10b6:806:343::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.18; Fri, 3 Mar 2023 13:54:31 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640%4]) with mapi id 15.20.6156.022; Fri, 3 Mar 2023 13:54:31 +0000 Message-ID: Date: Fri, 3 Mar 2023 13:54:23 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US To: Long Li , Stephen Hemminger Cc: "longli@linuxonhyperv.com" , Thomas Monjalon , Andrew Rybchenko , Jerin Jacob Kollanukkaran , David Marchand , "dev@dpdk.org" , Ajay Sharma , "stable@dpdk.org" , Luca Boccassi , Qi Z Zhang , Ajit Khaparde , Bruce Richardson , Konstantin Ananyev , Olivier Matz , Honnappa Nagarahalli , "techboard@dpdk.org" References: <1677012145-3559-1-git-send-email-longli@linuxonhyperv.com> <20230223100917.282f191c@hermes.local> <20230224095120.32c25481@hermes.local> From: Ferruh Yigit Subject: Re: [PATCH] net/mana: use RTE_LOG_DP for logs on datapath In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0082.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8::22) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SN7PR12MB8060:EE_ X-MS-Office365-Filtering-Correlation-Id: 5946b4e9-7bbf-407d-0226-08db1beecfe1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iXYQqIftVPnUbzZSLBEjDpvdJt0/yEW70RACmvG6YXkCL/7Wu2UGE8oMBecRY6Uhh9H3tm+C7vdqouqCChZcJz3WAniCgNyc5Xh4iMnlu86S/dm2PFF2UoR1FitvziAbr93C1KO73nqj1H65hZfNkwbhiVY+vkplUioILt+0kv2R2L9HuZhqVSyd262D2ZPHG4L3J3dfUKEy03UHse+Ae42jXr6f5RHKveE3Kr2R4UFmBBze98Vl51ESbt7sP09/DOOM5E1XuTemR+1MFIa2SCzTKN6mFKQT2iwpCWx9/hh8LvX0sS95Xa4EYe2iyByJzWy3jLxN2fklaMqheASJJmrbBpMk93Cql+FW84pIXyDsrQqqq6RaNsE7FcEZ3UdHn8hnRTMqyHkD35c3MOKdNopynFo2DCPB4B2QDL82Veievh4igAW4sDGYD1beExk4MtEvc6ZP1GFVr63v/HT5JpMgyJHG6Ib5dPHetJ9E/RvqbIr6AxBeTg2Wd1Jqp5PG+HwkZtarKN5lmFQaTzT8fm0zRMoQk2IISWSGAInw2X2/bSCGIdh/NQ2JSSsdtWv+d/zoUXNW23pGUovh4IZ3cGnJ8a9gyM7EHUK0006fpfUtrsaMEyOz0S7OwbxcEW4Fs/tcNjXMnxsuozYt6YxFb5EWzprLVFHjsl9NFSXi0aUOuvyr3tO2vnbSoPe9pzh1NIM1c9WTMJxUAzF27HmXEVf1oP3VFZJlfZFwEyx+gEI= 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)(396003)(136003)(376002)(366004)(346002)(39860400002)(451199018)(54906003)(36756003)(316002)(83380400001)(478600001)(66476007)(6486002)(26005)(53546011)(6512007)(6666004)(2616005)(186003)(86362001)(8936002)(41300700001)(44832011)(31696002)(5660300002)(110136005)(66556008)(66946007)(7416002)(6506007)(2906002)(4326008)(38100700002)(8676002)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eVY5SlhLOGJWc0FBTlM3VWk0YUhYbEJjZzdtWEljVEdUNzdxZE9UVUhZRFZx?= =?utf-8?B?dUtiSlgxUVlmeDFTU0pnck15UmVJQ1JYa210NkdkS2d4WnhMbVV5Uk1lTGVX?= =?utf-8?B?VGxZVDdxaDEwQnhhdENOTWhGKzl4QzJmTDF1dldvR3hxMXlWQXN5N3R2aWt5?= =?utf-8?B?d29QL04vakZVQWZNVFBKWEMwSzM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?= =?utf-8?B?WFZLK3dTMitZWjBmbzZGRGZoM015ZE4rOWhYZ2RBQmxmeCtkQkdFUHU1QlJZ?= =?utf-8?B?YnQ4WS9HY05MR2J4ZWFvVEpXRzYvamUvSjR5M29rR1Yya1FNd21HU1lLV0h3?= =?utf-8?Q?Yfr8MrPt2ktnaJeWpJb7eD/UC?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5946b4e9-7bbf-407d-0226-08db1beecfe1 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2023 13:54:30.9509 (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: IljbAMEtoGIkLfgi0DxHwGqYkpoIIMxLH0azQ9PU8remi1/riyA9O2xb6iRaitna X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB8060 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 3/3/2023 2:16 AM, Long Li wrote: >> Subject: Re: [PATCH] net/mana: use RTE_LOG_DP for logs on datapath >> >> On Thu, 23 Feb 2023 10:09:17 -0800 >> Stephen Hemminger wrote: >> >>> On Thu, 23 Feb 2023 14:07:25 +0000 >>> Ferruh Yigit wrote: >>> >>>> Overall I am not sure if anyone is interested in driver datapath >>>> logs other than driver developers themselves. >>>> >>>> For datapath logging I think there are two concerns, >>>> 1) It should not eat *any* cycles unless explicitly enabled >>>> 2) Capability of enable/disable them because of massive amount of >>>> log it can generate >>>> >>>> >>>> Currently there are two existing approaches for driver datapath logging: >>>> i) Controlled by 'RTE_ETHDEV_DEBUG_RX/TX' compile time flag, >>>> when enabled 'rte_log()' is used with Rx/Tx specific log type. >>>> ii) 'RTE_LOG_DP' ', compile time control per logtype via >>>> 'RTE_LOG_DP_LEVEL', >>>> when enabled 'rte_log()' is used with PMD logtype. >>>> >>>> >>>> In (ii), need to re-compile code when you need to increase the log >>>> verbosity, and it leaks to production code as mentioned above. >>>> >>>> For (i), developer compiles once enabling debug, later can fine >>>> grain log level dynamically. This is more DPDK developer focused approach. >>>> >>>> >>>> [1] >>>> According above, what do you think to retire 'RTE_LOG_DP', (at least >>>> within ethdev datapath), and chose (i) as preferred datapath logging? >>> >>> I agree, the current tx/rx logging is a mess. >>> Each driver is different, each driver has to have something to enable >>> it; and it really isn't useful beyond the driver developer. >>> >>> Using tracing seems like a much better option. Could we agree on a >>> common set of trace points for drivers and fix all drivers to use the same >> thing. >>> Probably will cause some upset among driver developers: >>> "where did my nice printf's go, now I have to learn tracing" >>> but DPDK has a good facility here, lets use it. >>> >>> My proposal would be: >>> - agree on common set of trace points >>> - apply to all drivers >>> - remove RTE_LOG_DP() >>> - remove per driver RX/TX options >>> - side effect, more uses of RTE_LOGTYPE_PMD go away. >> >> Here is an example of using tracepoints instead. >> Compile tested for example only. >> >> Note: using tracepoints it is possible to keep some of the tracepoints even if >> fastpath is not enabled. Things like running out of Tx or Mbuf is not something >> that is perf critical; but would be good for application to see. > > Thank you for the example. > > I sent another patch converting data path logs (mana) to trace points. > Hi Long, Thanks for the effort, you were quick on this while discussion is going on. Although tracepoint is a good feature, I am not sure if it can fully replace the logging. I think usage is slightly different, trace is missing custom human readable message, which can be very helpful for end user. And overall, it is a high level decision to switch logging to trace, it is inconsistent to switch only single driver, perhaps techboard (cc'ed) can discuss this. Until such consensus reached, I think driver should continue with logging. And for the logging, I suggest option (i) above, I was hoping more comments but since it is missing I hope this can be discussed in techboard for a conclusion.