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 F077E41DCB for ; Sat, 4 Mar 2023 02:15:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD7894161A; Sat, 4 Mar 2023 02:15:35 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2040.outbound.protection.outlook.com [40.107.92.40]) by mails.dpdk.org (Postfix) with ESMTP id 3FE51400D7; Sat, 4 Mar 2023 02:15:33 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GlJ0ZBs26c/Fr4JgOivmnNJa5c6FHXl2mYH6APfGPxgobIHfBruillva/PW/5CMtou4fRGJLwDf8J7fxVWO3z8VYj4y2Iiq9yAJl+gKYq+ywF3L5rZd2E7uXrtBBHERFCCoFjyojms7KnfxD70KcBQZ/WA9yh8UebjYrM1kH9Jnj1EqCDc4HZWhdvtDdWz83Q+C5ndL0zhTnxJHBLXjqwqp1tMiPflGVjk2XK4y4j6BxUge+bCQLUuGNXjuICltw4IcIHuL7UCuOTpqkOmj1Xqv5wz+PxSONIK47qoyjbas680KVVVKUGcs7TJhVpOdLwviMZav9iMYRi2q3ZzH19Q== 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=vUuGYcVI3K4+NjBFyePrEBjKMKr6z+lb51drUgDFGGA=; b=MsNQWO6yTlQPfLQNEr7xJZ26WVWGHin4id7WY8woUK+ukba4CBJwVi+CH7VYJhPp/AfSKEzRdDxAHsXxgI621dNpeisJwH368zx0ept2ujfQ/zzJUfJBvVDqmiMKifRHFjfZ09x2M2Q2KnNbjmclICkIGpEb9Jtizh28ZrUk9LiUo7y4UOknJlYzf3+RuqeuFh0Ynpsprl4nSXFgHfofcYYCefKFJuruvzyjQtoY85q2Vk342V7YtPkfWUcuVlLQKb7lcos37SN7WD/I6wwDl+6q0jhYsYHSZ7yBLGgDwSICwjWMYBJt9h9iadZxMIHFHSpx+w0mUHE3PsdCf3VUrg== 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=vUuGYcVI3K4+NjBFyePrEBjKMKr6z+lb51drUgDFGGA=; b=wi34r5x5ZBM2RyQSn8OXJ75OUSlYNxzu5KddJP44C9jJtD0yOKyQaCgf8j4IgtAR2YFz5R45YBuP6q434K6D4wfJHtQiMynu9wBmOAIY/7W0Q5EOFHpz0EPl5RKJp/QeghUaBFxFi1vUKNidrQyg5AOjLoL0e4qP9vdMXNQtfn4= 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 PH8PR12MB7423.namprd12.prod.outlook.com (2603:10b6:510:229::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.18; Sat, 4 Mar 2023 01:15:29 +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; Sat, 4 Mar 2023 01:15:28 +0000 Message-ID: Date: Sat, 4 Mar 2023 01:15:21 +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: LO2P265CA0257.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8a::29) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|PH8PR12MB7423:EE_ X-MS-Office365-Filtering-Correlation-Id: 82a68b64-2388-4680-b2a6-08db1c4df0ff X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yeI/ASeN+FaCZE8mu7KMLJ95X0rZclE/yPdTIf329GJbZmuUKR6UOMLEZwBsEv8tJEqKnZUCdKaCJG1VsHHZaTHo6a0b0kNuMGlcz6h+FgVKb8IIDkshyA7rYxv43LWak9yAsfPK/a1PrHdYTUmNodvRSrKDqpCwU7bJacWNz64iGALAhLVzmw6NuZOjv3JPHbuwxV+MsAsOdYlMPbeZGeOYbOi1xr46qgqBX2Wn+s2xvz+e2D2ZO6KQRWoGovrO1GmQHLsjTM7FBoox1cna5RrECIqtd4Yz9LbCeBQYpbOSjLD/wZitKEtBnATDc5uctZKgIabnUdCEE/FkFoJphEWl7EVnG0Af+Xtd3x18k2Oo1mB0Yfi8LXD6eyjMNs7EHGH8/budo4SEJcMylURmhRnILOrebIUV3u7WaE7FgxqaNHdDh4nj3NnKp3VD5UdBtordvad6ScbkgLmRyMwgnqBBhiO7hQ391uOJWBiIEIgy91kWkCcMqeCyQrpvzVdlxeSLlD6tsQPBvX2tYCGY4Ob9TUC1FSyf845H5u7nzHLF9aNp3E3sWG2k2e9yN1a7rKHGGdzhdcQAi+hT5ALkNycxX1sua/XGuUAz/JfeuarL+DAio9f31x5xfC/BxlNCGPtn1fHeQkHV09QecmC0OxMsQ+qYyLyAcwH09lZ/BO+X0Mg0KuzPTNEg0oAbvclLihDu0KJKXj6UZSz8ueRCL7NefWLbrgldfrWARsG0BAc= 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)(39860400002)(346002)(396003)(376002)(366004)(136003)(451199018)(31686004)(2906002)(41300700001)(316002)(478600001)(44832011)(5660300002)(83380400001)(36756003)(7416002)(8936002)(66556008)(4326008)(66946007)(38100700002)(110136005)(31696002)(54906003)(86362001)(8676002)(66476007)(2616005)(6486002)(6666004)(186003)(53546011)(26005)(6512007)(6506007)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dXFjbGhlWjZiMnJmbVRSVDhJREcxcUtwTDRvUlliOVV6YTRkUFc2S1E1bzFH?= =?utf-8?B?U2FqZXVWcnQwa2J4M093MGR3WXYwejdNbzVmQU50YmpuY1RkWnhqVkZkaFp3?= =?utf-8?B?TVdwZVVpVkRTak42MHJEVE1XZitGcy8yd3B0clhLa3JnM0dUd1FZUUMybzRo?= =?utf-8?B?MTFhNkhuK1BYdDljV1JFMzJWcVhTUitYb1l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FsN29Ga3dPd2hGRHBXdWxRVU9uR0tZTFVBRU0wdE5HNFdDeUxIcFMz?= =?utf-8?B?TmE2Q3NZblJ3Ni9wVUIvZS9FcmNEOFE2SzBGbndNdzhobno3NmxnT2ZXcHNH?= =?utf-8?Q?t6p4bznnT7hrqzl9njrWR2eIc?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 82a68b64-2388-4680-b2a6-08db1c4df0ff X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2023 01:15:28.7061 (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: e971I1Ek+Cq/gK9qTxs+jt/1Hj9nCKoN7TLVP2UhgA/7/vMS9Vl5G11V74gtNlYN X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7423 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On 3/3/2023 7:04 PM, Long Li wrote: >> Subject: Re: [PATCH] net/mana: use RTE_LOG_DP for logs on datapath >> >> 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. > > Hi Ferruh, > > Are you suggesting that MANA should use 'RTE_ETHDEV_DEBUG_RX/TX'? > > I'm happy to implement the logging in this way. > Yes, that looks to me better balance for compile time / runtime config for drive developers. But it prevents product code / end user to get data path logs, although I believe this is OK I am not sure how useful datapath logs in production code, that is why I am looking for more comment for a decision. Let's wait for next techboard meeting, in case this is discussed there, before making new implementation.