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 0977B42A13; Fri, 28 Apr 2023 12:24:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8BF804113C; Fri, 28 Apr 2023 12:24:49 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2062.outbound.protection.outlook.com [40.107.94.62]) by mails.dpdk.org (Postfix) with ESMTP id 406BD4021D; Fri, 28 Apr 2023 12:24:48 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bspPFekD8nB1yi5UPWMWvi3ePCwjp2C4MkXDWyM8UzK/YCRnchMFfsqjPd8cKixa7k1LIRPjOmtz5daxnQC7EX42qdSofK2SC6zetkMlHE8uEO26GhIMhdD5zGTUAkAbWcvPpa+Bz+SV3yMnjlfp/VtS1OogV+Vc8DMQnvGMSuAZJA0n5wW7EhOvZrmRFYhI2KhTAk0bRUjwt7QkKwLnKctQyvY4BfRixBgK8dcx2rtthbzy4OlqMVsdNlhksUnwusz+djD8cZgXS6aKiNTCxi0I+TuoWNbdw9XzJzCHlBgU7sofMeR3gUeguynJUvbriryYQP4Ed7pSglR+/GeopQ== 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=PTLid38ZvvS0kSq1NIQOTtz6DYn8lMfGQ97SyDqi9C0=; b=dqFn47gPyo8XvQjvofa2r6Doq+AnWyAG1thvymJ2nKA7Zw0ydjsZl741pSlfzryPjRQANgMup+nQ6KfssV6UPwzIhq41nOBKWIrE8ulmEgCzGKaEFh8i6iiBZni5zNjfX1C9x7NsysBAUMwDZ9T88JGQwuKMXIWi/iHaG8h6NZXKWU0JUms/WA4C7YlYdRTq9TWHEh+rloU3KiE+Rpt91DzuLG1CpwlSf61z1JeFAFSYaLL8lfL5gEBJFQ1MGWb+DbO/aT6XxwUrsschcpwtCaEblTNWfgoqPeCwz7KuUE1Ecy6hcubzscvQyYb4rdBONlVTBhB2ncbUIpXyAoA1tQ== 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=PTLid38ZvvS0kSq1NIQOTtz6DYn8lMfGQ97SyDqi9C0=; b=XnKr8dC/QN0ZLb2PddIAOMTgh7FIisbbmGZ7UwP379AKTmUOlXInPh27Gjbykwcsx6KDWDy4zZkRvy3mUyGfOVkCiVxqHeRe5jRpnDydyXvCt6iaMymTbe00UQ1QXMDbv+cQ/nqm1IJLhwxlqWd/Vb09wAgVhUFrAVu3GfL4vnY= 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 CY8PR12MB8194.namprd12.prod.outlook.com (2603:10b6:930:76::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.22; Fri, 28 Apr 2023 10:24:46 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::e818:77ea:75b5:f8cc]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::e818:77ea:75b5:f8cc%5]) with mapi id 15.20.6340.024; Fri, 28 Apr 2023 10:24:45 +0000 Message-ID: <144653ea-f3ca-d3d7-60f7-49331dfc5b6d@amd.com> Date: Fri, 28 Apr 2023 11:23:22 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH] net/mana: use RTE_LOG_DP for logs on datapath 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 In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0687.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:37b::13) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CY8PR12MB8194:EE_ X-MS-Office365-Filtering-Correlation-Id: f3c83168-6cbc-45e6-ac24-08db47d2c98a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WdgX3eqw+PMdY2+A90mFUM3r23uCMF45dREZObjKBuBr5zR/acK0dT1Cu0JzYgkEIcZC/v/Hpodo+frN2NV7I1hsc9nnFi/pwt3BsqULBv/cJzHPPocFiHQHNQFCAjrTdMpsRtielC1WRT76JKi8A/B8V1IMOFHtVePpkgzLLasPL2EzxWSUEX5ZoSuiC5R4QUDr99/3QLxfYi1xkddHNxxfwMg82xjpebho1nowsZ+JKQCFx4KXfM7WXPDAHBKnL65aZuDMd1HzcPiko7TgvW/lsLrVr4MnP9l659LnOgKUBzhtPdolbfMKXcFhV8XkPWcDUj4mEQPAs06nnLkygWmr1VZ/ULjNxrRvLN0IqLbivvGXBatd1Ucs4awR91uAbtPtkWAM3O7A8okY4Uq/GST89zZheIjO9h6fWG6B5Jy/aG1shMLTw+oPV5Ctj2NG0PIQo65yF7Tld1/gC2Zr15GE2i9Gl2yjb7mOt4mmsnnIbFuE+TaiSI233cD7yAusT/mRa4ZtW8Mmqrjj/34TvYyAOWOEUxr20cRpXAPykatpCZY6BVqQbdKPPlEIk2nWwJkZN4ypn4zIDtSIkdLHl3BryidLUkAw/eSKrCAFKD4PecWyECcIJmojJwE4aAN9s3nFeQJYhvn0ZsZVElOTl8ODPflUL6bGXDa2h/1eiL07/uwWM+iJuuKBIpZEDWLR 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:(13230028)(4636009)(376002)(346002)(136003)(366004)(39860400002)(396003)(451199021)(6666004)(38100700002)(45080400002)(31686004)(83380400001)(6486002)(54906003)(110136005)(478600001)(186003)(66946007)(2616005)(66556008)(66476007)(316002)(4326008)(41300700001)(7416002)(6506007)(6512007)(26005)(86362001)(53546011)(36756003)(8936002)(44832011)(8676002)(31696002)(5660300002)(2906002)(23180200003)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UjR3Zi9NZXR1dzJwTW1VbUNaODhKSnF5L2JXM3BWdVZvNzJYSVF6QmgvSUQ2?= =?utf-8?B?dU1iZFI5ZnFkTlIrOGhVWmI3dU5xK3FXWE5TVFZNV1lBeThjN1RFTlhOWWNj?= =?utf-8?B?NWZwaSs0bUROUW5yYVlqMDViam9wU2FvcTNJRmlGcHRtWTk0SGhoNEJsWnR2?= =?utf-8?B?Qkl2YVJNVzE5Mk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YbVRoZnE0cUps?= =?utf-8?B?aGxpK1E1enhGeUZONm9VTmlpVWh4N2M3RDdDTWdqQ09EZmk3cmV4YmJwZXpY?= =?utf-8?B?VUMvdy8vY3JhY0M0cXNTZVVWYjVpUDJOaW9uMzNJWjNRRGVkaDRKOFNCd2Jj?= =?utf-8?Q?k2R0Eew7OGWlwhb/hfV33927I?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: f3c83168-6cbc-45e6-ac24-08db47d2c98a X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2023 10:24:45.6335 (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: nxxpNhHEWi8SGAlTLFs5UpLoEskLCgyBvIpsb1lAhm12gYlOzjMFGE7lcNnX3oFL X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB8194 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 4/28/2023 2:29 AM, Long Li wrote: > > >> -----Original Message----- >> From: Ferruh Yigit >> Sent: Friday, March 3, 2023 5:15 PM >> 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 >> Subject: Re: [PATCH] net/mana: use RTE_LOG_DP for logs on datapath >> >> 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. > > HI Ferruh, > > Have we reached a decision on how to implement data path logs? > Hi Long, I am not aware of a result on the matter, let me continue with this patch to not block it more.