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 0187941B9D; Wed, 1 Feb 2023 11:50:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D29C6406A2; Wed, 1 Feb 2023 11:50:52 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2048.outbound.protection.outlook.com [40.107.243.48]) by mails.dpdk.org (Postfix) with ESMTP id DDCF94021F for ; Wed, 1 Feb 2023 11:50:50 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nhB4koJUEz5ryj/1/7Qbo80K+HUFcN9foKCDgHcOzMuZ4pu5ukWcyOMaY+eySY0ZxCh6SwXq4xCJrvFCNptwob+fPnfCiJYJR4po5SqcSs5C+N+HAQYp0a+UPbrlgp0vRuoqmu0TTirV1BFv3dd61YwwOp36kEU6n3lYOgJGSxrl2/dReup0ZmuzOSwkeOIr581GH3zNR8KLucZCJJGLQ4Nl6jA1zSZrlWyTn8baDTOBjYsas9AuFAp9uIzhBDubsAi7e7qqKE5bI/PMbgViD8cXW7/JOUA+A5I0NWk/V6nzU1duKgrMewazPX+Lbfxm1YVDXrlPbyHRm5n9jJXeaw== 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=NX5MUbki15jOS3Ze9/43GpnakR3WED+2x1xjdnicyOk=; b=X2+p+SAAoiC3rec/0DOW1PNoxepF4YHkdPdRInZtSuVDEOQTHlMdrOwIbskLiX1WQxUxeSN5eYoYu8fVv1/AsgUIbPI6iu55UFQkELVngGu9iQoCRPWViHthZeDLftPTojeyK3ySpcQDXLwWmiTMeWrtERduFKEh/yoxrECqAB/RWS2t20SeOSrzXphx+CJXCJaarzY2vkkXEQdlBc5kutcTn4UtfN8YKFNBYV5K8sDuLxIG14c69QTUOUzjUsh7gnTIbcrcgIpCP29CrKokmzngM4PEAzCYp5O+j22CvkKnLfgiHnUGu0+376ZpChE0Ve+M0d4vPXD15SBYCne4Jg== 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=NX5MUbki15jOS3Ze9/43GpnakR3WED+2x1xjdnicyOk=; b=hKM2t31w199Jx/t+MY+FYHOLPyTfq1MflM77r4OxBFk/2S/q5bGyyWL8x2TZ2aJvgNxvI5zmd2RShfZKwHVKUCvji7N9khyojYMLoN3shoqMFhdv92T/0Fqt7ht6iRQXgxWb7nCVgMuEPb5r9k8nrDL10grYiJGz7O3YN/USrb0= 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 DS0PR12MB8018.namprd12.prod.outlook.com (2603:10b6:8:149::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.36; Wed, 1 Feb 2023 10:50:46 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a%8]) with mapi id 15.20.6064.024; Wed, 1 Feb 2023 10:50:46 +0000 Message-ID: <10dc17b4-9725-b277-1e98-4a9c7530a875@amd.com> Date: Wed, 1 Feb 2023 10:50:29 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Content-Language: en-US To: Jerin Jacob Cc: Ankur Dwivedi , "dev@dpdk.org" , David Marchand , Jerin Jacob Kollanukkaran , Andrew Rybchenko , "thomas@monjalon.net" , "mdr@ashroe.eu" , "orika@nvidia.com" , "chas3@att.com" , "humin29@huawei.com" , "linville@tuxdriver.com" , "ciara.loftus@intel.com" , "qi.z.zhang@intel.com" , "mw@semihalf.com" , "mk@semihalf.com" , "shaibran@amazon.com" , "evgenys@amazon.com" , "igorch@amazon.com" , "chandu@amd.com" , Igor Russkikh , "shepard.siegel@atomicrules.com" , "ed.czeck@atomicrules.com" , "john.miller@atomicrules.com" , "ajit.khaparde@broadcom.com" , "somnath.kotur@broadcom.com" , "Maciej Czekaj [C]" , Shijith Thotton , Srisivasubramanian Srinivasan , Harman Kalra , "rahul.lakkireddy@chelsio.com" , "johndale@cisco.com" , "hyonkim@cisco.com" , "liudongdong3@huawei.com" , "yisen.zhuang@huawei.com" , "xuanziyang2@huawei.com" , "cloud.wangxiaoyun@huawei.com" , "zhouguoyang@huawei.com" , "simei.su@intel.com" , "wenjun1.wu@intel.com" , "qiming.yang@intel.com" , "Yuying.Zhang@intel.com" , "beilei.xing@intel.com" , "xiao.w.wang@intel.com" , "jingjing.wu@intel.com" , "junfeng.guo@intel.com" , "rosen.xu@intel.com" , Nithin Kumar Dabilpuram , Kiran Kumar Kokkilagadda , Sunil Kumar Kori , Satha Koteswara Rao Kottidi , Liron Himi , "zr@semihalf.com" , Radha Chintakuntla , Veerasenareddy Burru , Sathesh B Edara , "matan@nvidia.com" , "viacheslavo@nvidia.com" , "longli@microsoft.com" , "spinler@cesnet.cz" , "chaoyong.he@corigine.com" , "niklas.soderlund@corigine.com" , "hemant.agrawal@nxp.com" , "sachin.saxena@oss.nxp.com" , "g.singh@nxp.com" , "apeksha.gupta@nxp.com" , "sachin.saxena@nxp.com" , "aboyer@pensando.io" , Rasesh Mody , Shahed Shaikh , Devendra Singh Rawat , "jiawenwu@trustnetic.com" , "jianwang@trustnetic.com" , "jbehrens@vmware.com" , "maxime.coquelin@redhat.com" , "chenbo.xia@intel.com" , "steven.webster@windriver.com" , "matt.peters@windriver.com" , "bruce.richardson@intel.com" , "mtetsuyah@gmail.com" , "grive@u256.net" , "jasvinder.singh@intel.com" , "cristian.dumitrescu@intel.com" , "jgrajcia@cisco.com" , "mb@smartsharesystems.com" References: <20230112112140.807233-1-adwivedi@marvell.com> <20230120084059.2926575-1-adwivedi@marvell.com> <20230120084059.2926575-3-adwivedi@marvell.com> <614e22c6-8485-0e8d-742e-b3d100f96468@amd.com> <91a635b5-3fe5-b47d-d8ba-44f9b1614bf9@amd.com> <654437f5-2ee7-9d9e-adc9-20c6d4563242@amd.com> From: Ferruh Yigit Subject: Re: [EXT] Re: [PATCH v6 2/6] ethdev: add trace points for ethdev (part one) In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0205.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:318::19) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DS0PR12MB8018:EE_ X-MS-Office365-Filtering-Correlation-Id: 0b9d6882-45eb-420c-c030-08db04422bcf X-LD-Processed: 3dd8961f-e488-4e60-8e11-a82d994e183d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vkwCbGDzIWlPqX1svDTI+IRfvuu3zaRNg+R17NW7FwGHJwucbkhPoL9FWN5rIJgUrhy7sxfbc+wCmhrooOQRZIkzrWtBGQwOZUCI3vfdDrCN1dcEqmc5t9/8urTzOs+Uy2OGXw9rHe/iESzz/dt36D45kQs1+B7vWE74cCFDwPWOoiQLzbfFlhxlEweHsGH79itlW80478Ww3A2955mgxOEAdsRlJWRgaFmc6pHX/dQH7sDr0zfRtBtS8zg+sn8O33cCcicCqZhTIUVS803wzcYzcNUBe8XRzpbaGQ3+puLBWlGgXiWlw1OUPP1fF2ZduC7jnSveSbV5ImLryrL3SiMZ/SYnqefZGARTZ7+o4sCL86MQ9Zli6uEUOMmOqzzPLIGfQ9/N8MoDfB2RzC8m0xtFCbhPfJK9vfr3Lc8c3oryOMt0B63MvKwpf0l0kMzqDezjs58fZle4cM0qj6T/5zBFMPLZjjZ0lyBRDP3eOaX33vI7ppA5zEG3zPbTWVtAqnlf61TOAbq5zI57jNULfGL2mTl49FhAqbEV/H/bot1AKm8LXFtwGgzWH5GgOkqNR23gM+baN0cybu2yp+R4Kn2VsONRhU5Ni99A79Lko34elCsPecBIWnwFmKNNqTHLrx+ZeSrDeBmU1Z1/++PVjWWgrjK2SHGFrz3/Nj0eprrhTXp5DqR7wAxYW9fzwLtnGTXceoFE10AYtPWQUsjiUoQr20fn+eQN+yZ33g6IweI= 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)(346002)(136003)(396003)(376002)(366004)(39860400002)(451199018)(31686004)(36756003)(54906003)(66476007)(7366002)(7406005)(4326008)(6916009)(66946007)(8676002)(8936002)(7336002)(5660300002)(316002)(38100700002)(86362001)(31696002)(66556008)(53546011)(26005)(186003)(6666004)(6512007)(6506007)(41300700001)(44832011)(2906002)(7416002)(6486002)(478600001)(2616005)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RFgyOW5LQ3R5eC9BaVp4RHh5bFRGcm9rbzZ6UmxrNVVpVGk5bnc3ZjQ2UUZi?= =?utf-8?B?Y21UT2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TdQdExpc25SNHFGbXNYL2xrbGxQNHFp?= =?utf-8?B?aU5rbHZMTlEzV0tvQkh3TzNaU3h4SEdZRTZTK2xnb3BkZjkwVnZ4RTZ1cVZU?= =?utf-8?B?Ukh4WFlkUG11aXl6VGFmc2N4eWM0RUZrbDVoTkJJSEpJU0NhUjhLWVM3eDd3?= =?utf-8?B?OU5yUkFJa05Lcmp6NDlNaHdnSjhoU1hpYXZSekxwYVB5MktCUEdlMytEaXo0?= =?utf-8?B?cVdndTQvTFJzck54TkZ1eWJ6TlFlL3FyRjZzTHlJZjZ4NHFyb005WTM2QUtx?= =?utf-8?Q?Len9QY1uWJj7uA6/vrI4oI5kA?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0b9d6882-45eb-420c-c030-08db04422bcf X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2023 10:50:45.7578 (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: HcLQrVV3SyOq3G7d1pHDqyIzru/BFaLsOWOM4aKh7f/m+k+5EXPDiVXa1ke8wBS5 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8018 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 2/1/2023 8:31 AM, Jerin Jacob wrote: > On Wed, Feb 1, 2023 at 3:50 AM Ferruh Yigit wrote: >> >> On 1/31/2023 6:46 PM, Jerin Jacob wrote: >>> On Wed, Feb 1, 2023 at 12:09 AM Ferruh Yigit wrote: >>>> >>>> On 1/30/2023 4:01 PM, Ankur Dwivedi wrote: >>>> >>>> <...> >>>> >>>>>>> diff --git a/lib/ethdev/meson.build b/lib/ethdev/meson.build index >>>>>>> 39250b5da1..f5c0865023 100644 >>>>>>> --- a/lib/ethdev/meson.build >>>>>>> +++ b/lib/ethdev/meson.build >>>>>>> @@ -24,6 +24,7 @@ headers = files( >>>>>>> 'rte_ethdev.h', >>>>>>> 'rte_ethdev_trace.h', >>>>>>> 'rte_ethdev_trace_fp.h', >>>>>>> + 'rte_ethdev_trace_fp_burst.h', >>>>>> >>>>>> Why these trace headers are public? >>>>>> Aren't trace points only used by the APIs, so I expect them to be internal, so >>>>>> applications shouldn't need them. Why they are expsed to user. >>>>> 'rte_ethdev_trace.h' can be made as internal. Not sure about 'rte_ethdev_trace_fp.h' and 'rte_ethdev_trace_fp_burst.h' as the tracepoints in fast path may be called from public inline functions. >>>> >>>> Trace calls used by inline functions needs to be public, in this case at >>>> least 'rte_ethdev_trace_fp_burst.h' needs to be public. >>>> >>>> Can you please at least move all trace points that are called by inline >>>> functions to the same file, 'rte_ethdev_trace_fp_burst.h', to reduce >>>> number of the header files to make public? Feel free to rename header if >>>> required. >>>> >>>> Meanwhile not sure about adding new header as dependency to end user. >>>> @Jerin, @Andrew, what do you think >>> >>> rte_ethdev_trace_fp_burst.h will be installed through ninja install >>> and application does not need to directly include this. So this scheme >>> is OK. Right? I dont see any downside. >>> >> >> Right. It is installed automatically with above meson change, and it is >> included by 'rte_ethdev.h', so user doesn't need to include it >> explicitly. Overall there is no functional problem here. >> >> Only this header file needs to be included (directly or indirectly) by >> every application that use ethdev. I would much prefer to have an >> internal header but not able to because of technical reasons (inline >> functions). >> After lots of effort we did to hide as much ethdev internals as we can, >> now we are exposing some new trace stuff to user. >> >> As we can't prevent header to be public, I am just questioning below >> options to reduce exposure of this header, hoping that it may lead a >> better solution. > > Yes. All non-inline function can goto internal header file. I think, > it make sense > to have separated header file _fp functions using inline functions to avoid > cluttering main 'rte_ethdev.h' file. > >> disable trace calls in inline functions on compile time, possibly >> with existing 'RTE_ETHDEV_DEBUG_*' macro > > Disabling trace calls to inline functions, already possible with > "enable_trace_fp" > build option. So it will be possible to wrap around that to virtually to > disable > With "enable_trace_fp" build option "rte_ethdev_trace_fp.h" dependency is still there, but wrapping with DEBUG macro can prevent it for non-debug use cases. Anyway, "rte_ethdev_trace_fp.h" dependency is already there before this patch, so OK to not change it, and I am OK to move forward by making all trace points and trace related header internal as much as possible. >> >>> >>>> 1) to move these trace points to 'rte_ethdev_core.h' >>>> OR >>>> 2) disable trace calls in inline functions on compile time, possibly >>>> with existing 'RTE_ETHDEV_DEBUG_*' macro >>