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 5DF0F41C41; Wed, 8 Feb 2023 16:06:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4A4C24282D; Wed, 8 Feb 2023 16:06:12 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2061.outbound.protection.outlook.com [40.107.244.61]) by mails.dpdk.org (Postfix) with ESMTP id 0B0EA40141 for ; Wed, 8 Feb 2023 16:06:11 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dc2PftL4j+eEcoCtRCB2PMzNnahbs6mlKM8PJ14FXD8ZDO08hLWKIKRQu2rw0GzfYYAHcUl2ci8nOxd+ypDZkAVnTjPn0LTN5Omft3D8EqZcLVFoHXblWIU39780l3/6M4K+xzlAaENKLF/PMYv+gdgCI4VN79uiZO4F1wKnB6+XAC9qxLbMd+Uwi72CsbXQmtitAm1W9XdpkUCFK387poDo+RvgCLXV+uJaQGnbPMiYyoMPMCoc9Oa3g1pUKP7dhQcsiLr+04XpQRbRt/dVChJ5RxiNjwKlybFK56B8JwB0Zpdi/4zgzTYZ8CAZAOtQBHjav+5G75Ssn+WcxOdA1w== 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=j/qJFyrIryXVqY8uiXVqbfw1Edi2lgrlaGqm3scJ9rY=; b=NQuJ63i9JPPgGy6CKXJAmPwduhZrEF0I4YQUfUSMn89jPN4X3UKRUbwvT4WK5p4t1xoGp8wGiiAyHP4XN8xHZVcwuDy9oDzFeIhM6E4zXnhuesFrPBs9b6zu382Zek7Eh92/D2UCRMGJbKU1v8g09akGu7QUuC8AhvjWxVBqmuFrnDaGpjNJ84LVzgXc9FiqPfFNDhFnBM/P8ghl8xBlvI94xUv01bxKO/CPEgB+4frR7nyWj9y3RzI1kP7ErQ8XL1xwidiv6DujRx0XRIvS4LA909xmwMzpUngibXZYwDanSAaDZVOcV+HlTxdQja9H64U/6J1hGpWeAi7lR2R2gA== 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=j/qJFyrIryXVqY8uiXVqbfw1Edi2lgrlaGqm3scJ9rY=; b=W2CG2Uwrtik5cppbM2tNZwHssgqQvJisuSqS+d82Rbx/+i+VOgu3NL20dB+PZecp2YG+0GyR5SnLuD2IbYwZUh4kStyzWmL+uAVRwsv5t0aXrOAM4G4nNuwwy382mFisTunA6/Vxtb+4BjEtQ0cWknBZS/nzsZYFoTV3SQZuHtQ= 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 CH2PR12MB4970.namprd12.prod.outlook.com (2603:10b6:610:67::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17; Wed, 8 Feb 2023 15:06:08 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3614:22ed:ed5:5b48]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3614:22ed:ed5:5b48%6]) with mapi id 15.20.6086.017; Wed, 8 Feb 2023 15:06:08 +0000 Message-ID: <0810a789-44c1-684b-a726-bcb233b56e67@amd.com> Date: Wed, 8 Feb 2023 15:05:51 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [EXT] Re: [PATCH v9 3/6] ethdev: add trace points for ethdev (part two) Content-Language: en-US To: Ankur Dwivedi , "dev@dpdk.org" Cc: "thomas@monjalon.net" , "david.marchand@redhat.com" , "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" , Jerin Jacob Kollanukkaran , "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 , "andrew.rybchenko@oktetlabs.ru" , "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: <20230206115810.308574-1-adwivedi@marvell.com> <20230207063254.401538-1-adwivedi@marvell.com> <20230207063254.401538-4-adwivedi@marvell.com> <1a9fd27f-ebbe-157c-0577-9c4ae5bbc798@amd.com> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0508.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:272::10) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CH2PR12MB4970:EE_ X-MS-Office365-Filtering-Correlation-Id: f27c9bb8-705c-4921-cd9b-08db09e60179 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: uXg2BWzTYpfyl1mCBvFWDEVP8WE85Jf2N2vCNk2dsaPhKSZmNhvVTXkHqB1dDX/WaZWblY1oOISK8t+GKVqNybmi4F4oAagIRES6xyUX3gt3Vkfo10iWPjDDM2UaHqEREsh+THtmO3lgU4OHAPhw2yfguEMUL5sixgBMCGLOrJHsVoAZeL/QW06YnMIkw0MjU0OGsiCU6K7cXkOZ50zAmQUwBAZ1FL4B+qnl5v71nA6vtAsV14FKv14/WsfsPDX0B9KyZJTC9YDXtIzwtaxcvUgviIeVaRCRRO9LBYtgByelBaWQMA/DQ4bmH34BJ12wOI7cdCAqIQjgc9NkklqlE1gF06nQ+LtwwCUUeO/5vwaYKcXMV5b2S8JnZVTLxClwfBLyl2dRdz4OA5g9SA3GQpvWnCLAwbpFtBLEgwEv54Kx0Bdsn+GxWt32rd/Y76uVx1R/xXVjYpPmz0Ybb+ECpIjnT4fNrKNCXwsBKwPj5AecK2nD1seQTuiODTTfVbJUZYzyqHPfuVuthd1EQd0ZiuY+UBenXLHDpp5VgxU9tYDUscrpnbDTfQvJbeExalKZGPYryMpklw4/wRXLCYcOFaLApk+mX7K1pwM+YyfBc4tBzFXiOyXVawyd/ktqJbHscsd1E3G6xajaKi8nE4L8syp9HynwfF7HMe3kXzDaIY7wdO2se0iTq9W3owEiqaX7agtLubMNrun5BWSNSKWnL6XWUKMz/VHh6yIS/S2Wvls= 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)(396003)(136003)(366004)(376002)(346002)(451199018)(6486002)(7336002)(26005)(6512007)(186003)(5660300002)(7366002)(7406005)(7416002)(31696002)(8936002)(6666004)(53546011)(4326008)(316002)(66946007)(66556008)(8676002)(41300700001)(6506007)(110136005)(2906002)(54906003)(83380400001)(478600001)(86362001)(66476007)(36756003)(44832011)(2616005)(31686004)(38100700002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VXAvcmRlNTFaaWxkdDR2bmF5UENYTnhwaG8rNm5aNUcyeU9PMzFaaUs0SFpj?= =?utf-8?B?YjBuZHB3UHc4SWk4bFNsRU1GaUVZYVZsS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A2UEJITkV2enVjN1hRczRIRitBYVc2WjF3VTRndTY0OVZPTUdn?= =?utf-8?B?bGRJOW5jMjNkNGJwaTBjR1NjMjR2WUkrT0pVWmIzR0ZjaHBIdEpDbk9tQXFu?= =?utf-8?B?Z001M1NzL0NrdGFCK2ZJT3Y3eW4rZklnYXNGVEN3eCtHYzVld2RidXBFR3c0?= =?utf-8?B?WHowUWRLSzZnaFVJdEc2di9wUmNtMVpmMFlTU2lUOVdzU1lLU3Z3TWtDVzFV?= =?utf-8?Q?PZN/6ZeGZ2nbVQRF7FIOqatRR?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: f27c9bb8-705c-4921-cd9b-08db09e60179 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2023 15:06:07.8986 (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: 35OnMWnBJtYzG8WUe7Y7eOtuF1Ws1FjxwAwKB1Xvb763MiYj40j7mHj4s8eC6GF0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4970 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/8/2023 2:15 PM, Ankur Dwivedi wrote: >> Subject: Re: [EXT] Re: [PATCH v9 3/6] ethdev: add trace points for ethdev (part >> two) >> >> On 2/8/2023 11:00 AM, Ferruh Yigit wrote: >>> On 2/8/2023 10:42 AM, Ankur Dwivedi wrote: >>>>>> +RTE_TRACE_POINT( >>>>>> + rte_ethdev_trace_set_mc_addr_list, >>>>>> + RTE_TRACE_POINT_ARGS(uint16_t port_id, >>>>>> + const struct rte_ether_addr *mc_addr_set, uint32_t >>>>> nb_mc_addr, >>>>>> + int ret), >>>>>> + rte_trace_point_emit_u16(port_id); >>>>>> + rte_trace_point_emit_ptr(mc_addr_set); >>>>> What about recording this as blob? >>>>> But 'mc_addr_set' is array of addresses, so length needs to be >>>>> 'RTE_ETHER_ADDR_LEN * nb_mc_addr'. >>>> The mc_addr_set pointer can be NULL in rte_eth_dev_set_mc_addr_list. >>>> In that case the blob function will give seg fault. Hence I think blob cannot >> be used here. >>> Does it make sense to make 'rte_trace_point_emit_blob()' accept NULL >>> and fill all array with 0 in that case to cover this kind of cases? >> >> >> btw, 'rte_trace_point_emit_blob()' already checks for NULL, so expect it won't >> give segmentation fault, but won't record the value. > The blob function will be called as rte_trace_point_emit_blob(mc_addr_set->addr_bytes, len). > If mc_addr_set is NULL then it will result in a segmentation fault. > Of course trying to access the field 'mc_addr_set->addr_bytes' will cause problem for null pointer, why not: rte_trace_point_emit_blob(mc_addr_set, len); >> Not sure if not recording the value cause problem later when parsing the trace >> file. > Wont recording the value is not a issue as the value will not be copied in trace memory in rte_trace_point_emit_blob() (lib/eal/include/rte_trace_point.h). >