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 25EAE41C35; Wed, 8 Feb 2023 02:21:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 039BB410EE; Wed, 8 Feb 2023 02:21:20 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2063.outbound.protection.outlook.com [40.107.244.63]) by mails.dpdk.org (Postfix) with ESMTP id B73C840DDB for ; Wed, 8 Feb 2023 02:21:18 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hdj1O7J1GQ+z7JUZuwqqHlQZpOVlOiIJaXbgwWxwZgPp69VVDjsd1Opzi8QCdg9phcirfoaPqeR0M9AQrhSYwqOKd+V9V9s60IFUGvazaLRqSgWSx1trk+9TZD3vKVytEA883VWk2fnNY2XKlMHTS6bbnwj5sdiOdNVanAVGM6zTvuJXbtG+ANiDlthx4mek4n2/F9Y1mPeDWDmaqFlSVpyeLgVSU0iNLIRreyn2x8cRlaRc0w815bhhNGaRQaXbMsPV++U5KpupnXv4igzNMk57DrVTmmahVRKyU7Hv1gR88XZU7OCXVWGedbM0SxyEUG+ulbP79iJgel+5uA1hBw== 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=ViJtUhy64TG8axxNjWxxPaJnzSJg8IkWHoZisjQ8TK4=; b=VgIhMjb4Ch/nOyBGMy3KdZHwpSft7EkhBDK6pvfL27ODie4O8gJSIOneFyL6O+BRRUgZAkD+1Bdpcqo3r9cf9azc3HMg6026vnz679Yrd3iiAZDpmsdSHAFV7LPyzEF4Xac+xG01agq0HI6SQk3cDk6vNvBvqE81/hSPhlmcJWjqbn2so0IZR9KgKGcQNHuS0J6kyX77Rncx7iSbCzfGyPN/lZVfKKG5MWV4/dZcOJiQiyt8G6EPv7JvOQ5Mx1k44tWZ10x828lBAc6BXoqcue31AhSlKjFrpYeOmrmxFmOszQkEtmbXbjb70R4YkmIYY95xTIO6G7z6DHhYdb50RA== 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=ViJtUhy64TG8axxNjWxxPaJnzSJg8IkWHoZisjQ8TK4=; b=UQKrHPrf09WMbRXhkQzcy65EdQI4dcXrsHlDBagfv/PVp0pXP5W32Ug6B1ogvgIY2upN7ijGaS7wE1O0juUDskDt2ngCCq7j7Lsjm/6OYBsGw4DKlqdmb6bCbB/dOX1n3cvFN0IjQ9fsP87P4EIpwZtA994oLhFz58PeMEL3mv4= 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 CY8PR12MB8266.namprd12.prod.outlook.com (2603:10b6:930:79::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.35; Wed, 8 Feb 2023 01:21:13 +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.034; Wed, 8 Feb 2023 01:21:13 +0000 Message-ID: Date: Wed, 8 Feb 2023 01:20:58 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 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, irusskikh@marvell.com, shepard.siegel@atomicrules.com, ed.czeck@atomicrules.com, john.miller@atomicrules.com, ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com, jerinj@marvell.com, mczekaj@marvell.com, sthotton@marvell.com, srinivasan@marvell.com, hkalra@marvell.com, 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, ndabilpuram@marvell.com, kirankumark@marvell.com, skori@marvell.com, skoteshwar@marvell.com, lironh@marvell.com, zr@semihalf.com, radhac@marvell.com, vburru@marvell.com, sedara@marvell.com, 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, rmody@marvell.com, shshaikh@marvell.com, dsinghrawat@marvell.com, 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> From: Ferruh Yigit Subject: Re: [PATCH v9 3/6] ethdev: add trace points for ethdev (part two) In-Reply-To: <20230207063254.401538-4-adwivedi@marvell.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0532.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:2c5::14) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CY8PR12MB8266:EE_ X-MS-Office365-Filtering-Correlation-Id: 4d914af9-b9b5-4091-d4fd-08db0972c44a 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: 9qi0FS+N1doHFydBwrG5kq/h/3gPRylfUsu/3kxcaObIrv/gFFo8QS0J463JD4Re3awaKCk4v0FS5OZm7DbmNKZoVNHmBquNFoCiENwz22LYVTeHkv37zxN7Cd38agNx/atK0r8FiW3Wwoxy5ig4O2GFN2bbP8Q/mZcZP6+MKzQEflld8bLr6gYqSRdoSy0mV8P4avSQ4UnXBzqy6LxdeJGN3967fnBt+7wQpwtGwmdEBDmjqWfi9cGkvzaXDCj7JYud9nZZ6ZH7HDTY7HxH2MMFV+df+BU6pg5lOifasjcB+qUOsrKaij7V0hc0ovDc9bFiQT34q+RY3YLMTLhTb9ljjTZvRIOLbEiK1xoU/TmSEwhZbAoU9eezJmnLoQ9OzMg8zMwYazsW4dUDMQ9lGgd+wyhCOt0lvrVF9X9PKUpQvxlLm2Ay1YuDZHwr0VNOSvQ2pUSVIZaCyHaGw4R1MhNCDZCxcdPSsAyi28iwGs8T+0x0Kb5andJvTtvoTVJREVvQ/K2SXaGJP6U2R7Wh8efNaafhKthpng51OvxLYU1NvuZmIcHabOhG5iPpWqOj+ZjfQ8hoNckc/glZQHf8esjDSUXZv9Prv7UJifX3kthBWxXdDZ1JqsF+BIxMLyQSVhx7SWZ1n3JBcBSftoDmkhrthrNSbgKSjWNzxzggqZ14tjJTcw7suK0XXPGMCIzxMg7sh/C8mCc16OZanwjUq5qvq7vdcnT2oTUoeaYy4Axt11nDgTCxHzyK0MA0oXT2 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)(366004)(39860400002)(346002)(136003)(376002)(396003)(451199018)(36756003)(31696002)(86362001)(8676002)(316002)(6486002)(66556008)(478600001)(4326008)(66946007)(66476007)(38100700002)(5660300002)(2906002)(8936002)(7406005)(7336002)(41300700001)(30864003)(7366002)(7416002)(186003)(6512007)(6506007)(26005)(53546011)(6666004)(83380400001)(44832011)(2616005)(31686004)(21314003)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bWF5dzJwY0VzZ3FQRGgrZXliWXpLVEZpb3JBUVJBUmhaeE1LYWdvak56c2hl?= =?utf-8?B?WjNxd0t5M2MvRFZZLzh2RjJhcU80OTFEcmZlUXlKaHdidURjZitxWDg0Tmd1?= =?utf-8?B?Rk9XUytYbjBPUjVKbkNDd3dDelRuWk5lOHU0RmtQYnZtOWZHMTlOckxRSnda?= =?utf-8?B?UXV6YTNicllrckdNaXo4MDBhVGhvWjhacTNqM1RNeGxucDZlZnEyenJLcEdw?= =?utf-8?B?MkRFa08rQ0QrRk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m1LaHNZaTAySCtZbjRlaW1NZmxJcyswK01LWGlkbGcrc0c3VFBpV1Bwb2JC?= =?utf-8?Q?iPJcpYK+ZUo+477LqPYJihiAa?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d914af9-b9b5-4091-d4fd-08db0972c44a X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2023 01:21:13.2229 (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: nmC6jH7tmZTrNX146FVhpup0ywtlb/RcMO3Pw5Av9DlQ52LyEAXg2/UJdCtFNs1/ X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB8266 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/7/2023 6:32 AM, Ankur Dwivedi wrote: > Subject: > [PATCH v9 3/6] ethdev: add trace points for ethdev (part two) > From: > Ankur Dwivedi > Date: > 2/7/2023, 6:32 AM > > To: > > CC: > > > Adds trace points for remaining ethdev functions. > > Signed-off-by: Ankur Dwivedi > Acked-by: Sunil Kumar Kori <...> > +RTE_TRACE_POINT( > + rte_ethdev_trace_priority_flow_ctrl_queue_configure, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, > + const struct rte_eth_pfc_queue_conf *pfc_queue_conf, int ret), > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_ptr(pfc_queue_conf); > + rte_trace_point_emit_int(pfc_queue_conf->mode); > + rte_trace_point_emit_u16(pfc_queue_conf->rx_pause.tx_qid); > + rte_trace_point_emit_u16(pfc_queue_conf->tx_pause.rx_qid); > + rte_trace_point_emit_int(ret); > +) > + Recording a pointer value of a struct may not be so useful but at least it helps to identify different instances used by calls, and this is done by multiple trace, that is OK. But for this case some values of the struct is already recorded, so is there a need to record pointer value of struct too? Like in 'rte_ethdev_trace_rss_hash_update()', 'rss_conf' pointer value is not recorded but some of its fields are, or 'rte_eth_trace_rx_queue_info_get()', I think this makes sense. What do you think as general rule, if some fields of struct is recorded, don't record its pointer value, else at least record structs pointer value? This applies a few trace points, I have commented some of them but I may missed some, can you please check all? <...> > +RTE_TRACE_POINT( > + rte_ethdev_trace_callback_register, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, enum rte_eth_event_type event, > + rte_eth_dev_cb_fn cb_fn, const void *cb_arg, uint16_t next_port, > + uint16_t last_port), > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_int(event); > + rte_trace_point_emit_ptr(cb_fn); > + rte_trace_point_emit_ptr(cb_arg); > + rte_trace_point_emit_u16(next_port); > + rte_trace_point_emit_u16(last_port); > +) 'next_port' and 'last_port' are internal variables, and 'next_port' is increased in while loop, so its final value is always "last_port + 1" if "port_id == RTE_ETH_ALL". And if "port_id != RTE_ETH_ALL", next_port = last_port = port_id 'next_port' and 'last_port' derived from 'port_id', hence as 'port_id' is already recorded, I think 'next_port' and 'last_port' can be dropped. <...> > +RTE_TRACE_POINT( > + rte_eth_trace_get_monitor_addr, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, > + const struct rte_power_monitor_cond *pmc, int ret), > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_u16(queue_id); > + rte_trace_point_emit_ptr(pmc); > + rte_trace_point_emit_ptr(pmc->addr); > + rte_trace_point_emit_u8(pmc->size); > + rte_trace_point_emit_int(ret); > +) > + Another sample of what mentioned above, if 'pmc' fields are recorded, can we drop recording 'pmc' pointer value? > +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'. <...> > +RTE_TRACE_POINT( > + rte_eth_trace_timesync_write_time, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, const struct timespec *time, > + int ret), > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_ptr(time); > + rte_trace_point_emit_size_t(time->tv_sec); > + rte_trace_point_emit_long(time->tv_nsec); > + rte_trace_point_emit_int(ret); > +) > + ditto for 'time' > +RTE_TRACE_POINT( > + rte_eth_trace_read_clock, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, const uint64_t *clk, int ret), > + uint64_t clk_v = *clk; > + > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_ptr(clk); > + rte_trace_point_emit_u64(clk_v); > + rte_trace_point_emit_int(ret); > +) > + ditto for 'clk' > +RTE_TRACE_POINT( > + rte_ethdev_trace_get_reg_info, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, > + const struct rte_dev_reg_info *info, int ret), > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_ptr(info); > + rte_trace_point_emit_ptr(info->data); > + rte_trace_point_emit_u32(info->offset); > + rte_trace_point_emit_u32(info->length); > + rte_trace_point_emit_u32(info->width); > + rte_trace_point_emit_u32(info->version); > + rte_trace_point_emit_int(ret); > +) > + ditto for 'info' > +RTE_TRACE_POINT( > + rte_ethdev_trace_get_eeprom_length, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret), > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_int(ret); > +) > + > +RTE_TRACE_POINT( > + rte_ethdev_trace_get_eeprom, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, > + const struct rte_dev_eeprom_info *info, int ret), > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_ptr(info); > + rte_trace_point_emit_ptr(info->data); > + rte_trace_point_emit_u32(info->offset); > + rte_trace_point_emit_u32(info->length); > + rte_trace_point_emit_u32(info->magic); > + rte_trace_point_emit_int(ret); > +) > + ditto for 'info' > +RTE_TRACE_POINT( > + rte_ethdev_trace_set_eeprom, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, > + const struct rte_dev_eeprom_info *info, int ret), > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_ptr(info->data); > + rte_trace_point_emit_u32(info->offset); > + rte_trace_point_emit_u32(info->length); > + rte_trace_point_emit_u32(info->magic); > + rte_trace_point_emit_int(ret); > +) > + > +RTE_TRACE_POINT( > + rte_ethdev_trace_get_module_info, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, > + const struct rte_eth_dev_module_info *modinfo, int ret), > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_ptr(modinfo); > + rte_trace_point_emit_u32(modinfo->type); > + rte_trace_point_emit_u32(modinfo->eeprom_len); > + rte_trace_point_emit_int(ret); > +) > + ditto for 'modinfo' > +RTE_TRACE_POINT( > + rte_ethdev_trace_get_module_eeprom, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, > + const struct rte_dev_eeprom_info *info, int ret), > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_ptr(info); > + rte_trace_point_emit_int(ret); > +) > + > +RTE_TRACE_POINT( > + rte_ethdev_trace_get_dcb_info, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, > + const struct rte_eth_dcb_info *dcb_info, int ret), > + uint8_t num_user_priorities = RTE_ETH_DCB_NUM_USER_PRIORITIES; > + uint8_t num_tcs = RTE_ETH_DCB_NUM_TCS; > + > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_ptr(dcb_info); > + rte_trace_point_emit_u8(dcb_info->nb_tcs); > + rte_trace_point_emit_blob(dcb_info->prio_tc, num_user_priorities); > + rte_trace_point_emit_blob(dcb_info->tc_bws, num_tcs); > + rte_trace_point_emit_int(ret); > +) > + ditto for 'dcb_info' <...> > +RTE_TRACE_POINT( > + rte_eth_trace_rx_metadata_negotiate, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, const uint64_t *features, > + uint64_t features_val, int ret), > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_ptr(features); > + rte_trace_point_emit_u64(features_val); > + rte_trace_point_emit_int(ret); > +) > + ditto for 'features' <...> > +RTE_TRACE_POINT( > + rte_eth_trace_ip_reassembly_conf_get, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, > + const struct rte_eth_ip_reassembly_params *conf, int ret), > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_ptr(conf); > + rte_trace_point_emit_int(ret); > +) > + > +RTE_TRACE_POINT( > + rte_eth_trace_ip_reassembly_conf_set, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, > + const struct rte_eth_ip_reassembly_params *conf, int ret), > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_ptr(conf); > + rte_trace_point_emit_u32(conf->timeout_ms); > + rte_trace_point_emit_u16(conf->max_frags); > + rte_trace_point_emit_u16(conf->flags); > + rte_trace_point_emit_int(ret); > +) > + Can you please align recorded fields for conf_get and conf_set? <...> > +RTE_TRACE_POINT( > + rte_eth_trace_cman_info_get, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, > + const struct rte_eth_cman_info *info, int ret), > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_ptr(info); > + rte_trace_point_emit_u64(info->modes_supported); > + rte_trace_point_emit_u64(info->objs_supported); > + rte_trace_point_emit_int(ret); > +) > + ditto for 'info' > +RTE_TRACE_POINT( > + rte_eth_trace_cman_config_init, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, > + const struct rte_eth_cman_config *config, int ret), > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_ptr(config); > + rte_trace_point_emit_int(config->obj); > + rte_trace_point_emit_int(config->mode); > + rte_trace_point_emit_int(ret); > +) > + ditto for 'config' > +RTE_TRACE_POINT( > + rte_eth_trace_cman_config_set, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, > + const struct rte_eth_cman_config *config, int ret), > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_ptr(config); > + rte_trace_point_emit_int(config->obj); > + rte_trace_point_emit_int(config->mode); > + rte_trace_point_emit_int(ret); > +) > + ditto for 'config' > +RTE_TRACE_POINT( > + rte_eth_trace_cman_config_get, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, > + const struct rte_eth_cman_config *config, int ret), > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_ptr(config); > + rte_trace_point_emit_int(config->obj); > + rte_trace_point_emit_int(config->mode); > + rte_trace_point_emit_int(ret); > +) > + ditto for 'config' <...> > +/* Called in loop in examples/ptpclient */ > +RTE_TRACE_POINT_FP( > + rte_eth_trace_timesync_read_rx_timestamp, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, const struct timespec *timestamp, > + uint32_t flags, int ret), > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_ptr(timestamp); > + rte_trace_point_emit_size_t(timestamp->tv_sec); > + rte_trace_point_emit_long(timestamp->tv_nsec); > + rte_trace_point_emit_u32(flags); > + rte_trace_point_emit_int(ret); > +) > + ditto for 'timestamp' > +/* Called in loop in examples/ptpclient */ > +RTE_TRACE_POINT_FP( > + rte_eth_trace_timesync_read_tx_timestamp, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, const struct timespec *timestamp, > + int ret), > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_ptr(timestamp); > + rte_trace_point_emit_size_t(timestamp->tv_sec); > + rte_trace_point_emit_long(timestamp->tv_nsec); > + rte_trace_point_emit_int(ret); > +) > + ditto for 'timestamp' > +/* Called in loop in examples/ptpclient */ > +RTE_TRACE_POINT_FP( > + rte_eth_trace_timesync_read_time, > + RTE_TRACE_POINT_ARGS(uint16_t port_id, const struct timespec *time, > + int ret), > + rte_trace_point_emit_u16(port_id); > + rte_trace_point_emit_ptr(time); > + rte_trace_point_emit_size_t(time->tv_sec); > + rte_trace_point_emit_long(time->tv_nsec); > + rte_trace_point_emit_int(ret); > +) > + ditto for 'time' <...> > @@ -4141,6 +4196,7 @@ rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id, > struct rte_eth_pfc_conf *pfc_conf) > { > struct rte_eth_dev *dev; > + int ret; > > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev = &rte_eth_devices[port_id]; > @@ -4158,9 +4214,15 @@ rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id, > } > > /* High water, low water validation are device specific */ > - if (*dev->dev_ops->priority_flow_ctrl_set) > - return eth_err(port_id, (*dev->dev_ops->priority_flow_ctrl_set) > - (dev, pfc_conf)); > + if (*dev->dev_ops->priority_flow_ctrl_set) { > + ret = eth_err(port_id, (*dev->dev_ops->priority_flow_ctrl_set) > + (dev, pfc_conf)); > + > + rte_ethdev_trace_priority_flow_ctrl_set(port_id, pfc_conf, ret); > + > + return ret; > + } > + > return -ENOTSUP; > } > > @@ -4219,6 +4281,7 @@ rte_eth_dev_priority_flow_ctrl_queue_info_get(uint16_t port_id, > struct rte_eth_pfc_queue_info *pfc_queue_info) > { > struct rte_eth_dev *dev; > + int ret; > > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev = &rte_eth_devices[port_id]; > @@ -4229,9 +4292,15 @@ rte_eth_dev_priority_flow_ctrl_queue_info_get(uint16_t port_id, > return -EINVAL; > } > > - if (*dev->dev_ops->priority_flow_ctrl_queue_info_get) > - return eth_err(port_id, (*dev->dev_ops->priority_flow_ctrl_queue_info_get) > + if (*dev->dev_ops->priority_flow_ctrl_queue_info_get) { > + ret = eth_err(port_id, (*dev->dev_ops->priority_flow_ctrl_queue_info_get) > (dev, pfc_queue_info)); > + > + rte_ethdev_trace_priority_flow_ctrl_queue_info_get(port_id, > + pfc_queue_info, ret); > + > + return ret; > + } > return -ENOTSUP; > } > > @@ -4300,10 +4369,17 @@ rte_eth_dev_priority_flow_ctrl_queue_configure(uint16_t port_id, > return ret; > } > > - if (*dev->dev_ops->priority_flow_ctrl_queue_config) > - return eth_err(port_id, > - (*dev->dev_ops->priority_flow_ctrl_queue_config)( > - dev, pfc_queue_conf)); > + if (*dev->dev_ops->priority_flow_ctrl_queue_config) { > + ret = eth_err(port_id, > + (*dev->dev_ops->priority_flow_ctrl_queue_config)( > + dev, pfc_queue_conf)); > + > + rte_ethdev_trace_priority_flow_ctrl_queue_configure(port_id, > + pfc_queue_conf, ret); > + > + return ret; > + } > + Not really related with this patch, but dev_ops check logic is reverse (unconventional) in these functions. Most of the time what we have is: ``` if (*dev->dev_ops->xxx == NULL) return -ENOTSUP; rest_of_the_function; ``` But after change these functions become: ``` if (*dev->dev_ops->xxx) { do_whatever_action_needs; ... return ret; } return -ENOTSUP; ``` Since it is updating these lines, can you please fix this check too? This seems valid for: rte_eth_dev_priority_flow_ctrl_set rte_eth_dev_priority_flow_ctrl_queue_info_get rte_eth_dev_priority_flow_ctrl_queue_configure