DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ankur Dwivedi <adwivedi@marvell.com>
To: Ferruh Yigit <ferruh.yigit@amd.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "thomas@monjalon.net" <thomas@monjalon.net>,
	"david.marchand@redhat.com" <david.marchand@redhat.com>,
	"mdr@ashroe.eu" <mdr@ashroe.eu>,
	"orika@nvidia.com" <orika@nvidia.com>,
	"chas3@att.com" <chas3@att.com>,
	"humin29@huawei.com" <humin29@huawei.com>,
	"linville@tuxdriver.com" <linville@tuxdriver.com>,
	"ciara.loftus@intel.com" <ciara.loftus@intel.com>,
	"qi.z.zhang@intel.com" <qi.z.zhang@intel.com>,
	"mw@semihalf.com" <mw@semihalf.com>,
	"mk@semihalf.com" <mk@semihalf.com>,
	"shaibran@amazon.com" <shaibran@amazon.com>,
	"evgenys@amazon.com" <evgenys@amazon.com>,
	"igorch@amazon.com" <igorch@amazon.com>,
	"chandu@amd.com" <chandu@amd.com>,
	Igor Russkikh <irusskikh@marvell.com>,
	"shepard.siegel@atomicrules.com" <shepard.siegel@atomicrules.com>,
	"ed.czeck@atomicrules.com" <ed.czeck@atomicrules.com>,
	"john.miller@atomicrules.com" <john.miller@atomicrules.com>,
	"ajit.khaparde@broadcom.com" <ajit.khaparde@broadcom.com>,
	"somnath.kotur@broadcom.com" <somnath.kotur@broadcom.com>,
	Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	"Maciej Czekaj [C]" <mczekaj@marvell.com>,
	Shijith Thotton <sthotton@marvell.com>,
	Srisivasubramanian Srinivasan <srinivasan@marvell.com>,
	Harman Kalra <hkalra@marvell.com>,
	"rahul.lakkireddy@chelsio.com" <rahul.lakkireddy@chelsio.com>,
	"johndale@cisco.com" <johndale@cisco.com>,
	"hyonkim@cisco.com" <hyonkim@cisco.com>,
	"liudongdong3@huawei.com" <liudongdong3@huawei.com>,
	"yisen.zhuang@huawei.com" <yisen.zhuang@huawei.com>,
	"xuanziyang2@huawei.com" <xuanziyang2@huawei.com>,
	"cloud.wangxiaoyun@huawei.com" <cloud.wangxiaoyun@huawei.com>,
	"zhouguoyang@huawei.com" <zhouguoyang@huawei.com>,
	"simei.su@intel.com" <simei.su@intel.com>,
	"wenjun1.wu@intel.com" <wenjun1.wu@intel.com>,
	"qiming.yang@intel.com" <qiming.yang@intel.com>,
	"Yuying.Zhang@intel.com" <Yuying.Zhang@intel.com>,
	"beilei.xing@intel.com" <beilei.xing@intel.com>,
	"xiao.w.wang@intel.com" <xiao.w.wang@intel.com>,
	"jingjing.wu@intel.com" <jingjing.wu@intel.com>,
	"junfeng.guo@intel.com" <junfeng.guo@intel.com>,
	"rosen.xu@intel.com" <rosen.xu@intel.com>,
	Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar Kokkilagadda <kirankumark@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Satha Koteswara Rao Kottidi <skoteshwar@marvell.com>,
	Liron Himi <lironh@marvell.com>,
	"zr@semihalf.com" <zr@semihalf.com>,
	Radha Chintakuntla <radhac@marvell.com>,
	Veerasenareddy Burru <vburru@marvell.com>,
	Sathesh B Edara <sedara@marvell.com>,
	"matan@nvidia.com" <matan@nvidia.com>,
	"viacheslavo@nvidia.com" <viacheslavo@nvidia.com>,
	"longli@microsoft.com" <longli@microsoft.com>,
	"spinler@cesnet.cz" <spinler@cesnet.cz>,
	"chaoyong.he@corigine.com" <chaoyong.he@corigine.com>,
	"niklas.soderlund@corigine.com" <niklas.soderlund@corigine.com>,
	"hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>,
	"sachin.saxena@oss.nxp.com" <sachin.saxena@oss.nxp.com>,
	"g.singh@nxp.com" <g.singh@nxp.com>,
	"apeksha.gupta@nxp.com" <apeksha.gupta@nxp.com>,
	"sachin.saxena@nxp.com" <sachin.saxena@nxp.com>,
	"aboyer@pensando.io" <aboyer@pensando.io>,
	Rasesh Mody <rmody@marvell.com>,
	Shahed Shaikh <shshaikh@marvell.com>,
	Devendra Singh Rawat <dsinghrawat@marvell.com>,
	"andrew.rybchenko@oktetlabs.ru" <andrew.rybchenko@oktetlabs.ru>,
	"jiawenwu@trustnetic.com" <jiawenwu@trustnetic.com>,
	"jianwang@trustnetic.com" <jianwang@trustnetic.com>,
	"jbehrens@vmware.com" <jbehrens@vmware.com>,
	"maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
	"chenbo.xia@intel.com" <chenbo.xia@intel.com>,
	"steven.webster@windriver.com" <steven.webster@windriver.com>,
	"matt.peters@windriver.com" <matt.peters@windriver.com>,
	"bruce.richardson@intel.com" <bruce.richardson@intel.com>,
	"mtetsuyah@gmail.com" <mtetsuyah@gmail.com>,
	"grive@u256.net" <grive@u256.net>,
	"jasvinder.singh@intel.com" <jasvinder.singh@intel.com>,
	"cristian.dumitrescu@intel.com" <cristian.dumitrescu@intel.com>,
	"jgrajcia@cisco.com" <jgrajcia@cisco.com>,
	"mb@smartsharesystems.com" <mb@smartsharesystems.com>
Subject: RE: [EXT] Re: [PATCH v9 3/6] ethdev: add trace points for ethdev (part two)
Date: Wed, 8 Feb 2023 10:42:33 +0000	[thread overview]
Message-ID: <CO3PR18MB50057EB5D93AA6C1D2108DC1DDD89@CO3PR18MB5005.namprd18.prod.outlook.com> (raw)
In-Reply-To: <f2907fe2-fa55-66fb-4f89-cfd3e353684f@amd.com>

>Subject: [EXT] Re: [PATCH v9 3/6] ethdev: add trace points for ethdev (part
>two)
>
>External Email
>
>----------------------------------------------------------------------
>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 <adwivedi@marvell.com>
>> Date:
>> 2/7/2023, 6:32 AM
>>
>> To:
>> <dev@dpdk.org>
>> CC:
>>
>>
>> Adds trace points for remaining ethdev functions.
>>
>> Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
>> Acked-by: Sunil Kumar Kori <skori@marvell.com>
>
><...>
>
>> +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?

Ok.
>
>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.

Ok.
>
><...>
>
>> +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?

Ok.
>
>> +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.
>
><...>
>
>> +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'
Ok.
>
>> +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'
Ok.
>
>> +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'

Ok.
>
>> +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'

Ok.
>
>> +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'

Ok.
>
>> +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'

Ok.
>
><...>
>
>> +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'

Ok.
>
><...>
>
>> +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?

Ok.
>
><...>
>
>> +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'

Ok.
>
>> +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'

Ok.
>
>> +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'
Ok.
>
>> +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'

Ok.
>
><...>
>
>> +/* 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'

Ok.
>
>> +/* 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'

Ok.
>
>> +/* 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'

Ok.
>
><...>
>
>> @@ -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?

Ok.
>
>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

  reply	other threads:[~2023-02-08 10:45 UTC|newest]

Thread overview: 172+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-04 13:44 [PATCH 0/6] add trace points in ethdev library Ankur Dwivedi
2022-08-04 13:44 ` [PATCH 1/6] ethdev: add trace points Ankur Dwivedi
2022-09-12 11:00   ` Andrew Rybchenko
2022-09-13  6:48     ` [EXT] " Ankur Dwivedi
2022-09-13  7:18       ` Andrew Rybchenko
2022-09-26 15:03         ` Andrew Rybchenko
2022-09-28  4:02           ` Jerin Jacob
2022-08-04 13:44 ` [PATCH 2/6] ethdev: add trace points for flow Ankur Dwivedi
2022-08-04 13:44 ` [PATCH 3/6] ethdev: add trace points for mtr Ankur Dwivedi
2022-08-04 13:44 ` [PATCH 4/6] ethdev: add trace points for tm Ankur Dwivedi
2022-08-04 13:44 ` [PATCH 5/6] ethdev: add trace points for driver Ankur Dwivedi
2022-08-04 13:44 ` [PATCH 6/6] devtools: add trace function check in checkpatch Ankur Dwivedi
2022-09-29 10:29 ` [PATCH v2 0/4] add trace points in ethdev library Ankur Dwivedi
2022-09-29 10:29   ` [PATCH v2 1/4] ethdev: add trace points Ankur Dwivedi
2022-10-06  7:09     ` Andrew Rybchenko
2022-10-06  7:24       ` [EXT] " Ankur Dwivedi
2022-10-06  7:27         ` Andrew Rybchenko
2022-10-06  7:43           ` Ankur Dwivedi
2022-10-06  7:50             ` Andrew Rybchenko
2022-10-06  7:57               ` David Marchand
2022-10-12  9:49                 ` Jerin Jacob
2022-10-12  9:56                   ` David Marchand
2022-09-29 10:29   ` [PATCH v2 2/4] ethdev: add trace points for flow Ankur Dwivedi
2022-09-29 10:29   ` [PATCH v2 3/4] ethdev: add trace points for mtr Ankur Dwivedi
2022-09-29 10:29   ` [PATCH v2 4/4] ethdev: add trace points for tm Ankur Dwivedi
2022-10-06  7:10   ` [PATCH v2 0/4] add trace points in ethdev library Andrew Rybchenko
2022-10-06  7:26     ` [EXT] " Ankur Dwivedi
2022-10-06  7:28       ` Andrew Rybchenko
2022-10-06  7:47         ` Ankur Dwivedi
2022-10-06 12:55           ` Ankur Dwivedi
2022-10-06 15:18   ` [PATCH v3 " Ankur Dwivedi
2022-10-06 15:18     ` [PATCH v3 1/4] ethdev: add trace points Ankur Dwivedi
2022-10-06 16:03       ` Morten Brørup
2022-10-07 16:23       ` Ankur Dwivedi
2022-10-10  6:39         ` Ankur Dwivedi
2022-12-12 18:34           ` Ferruh Yigit
2022-12-12 18:38       ` Ferruh Yigit
2022-12-14 10:34         ` David Marchand
2022-12-14 11:04           ` Ferruh Yigit
2022-12-13 20:06       ` Ferruh Yigit
2022-12-14 10:40         ` Jerin Jacob
2022-12-14 12:10           ` Ferruh Yigit
2022-12-15  6:49             ` Jerin Jacob
2023-01-12  9:10               ` Thomas Monjalon
2023-01-12  9:43                 ` trace point symbols Morten Brørup
2023-01-13 11:22                   ` Jerin Jacob
2022-12-14 13:52         ` [EXT] Re: [PATCH v3 1/4] ethdev: add trace points Ankur Dwivedi
2022-10-06 15:18     ` [PATCH v3 2/4] ethdev: add trace points for flow Ankur Dwivedi
2022-10-06 15:18     ` [PATCH v3 3/4] ethdev: add trace points for mtr Ankur Dwivedi
2022-10-06 15:18     ` [PATCH v3 4/4] ethdev: add trace points for tm Ankur Dwivedi
2022-12-22  6:32     ` [PATCH v4 0/6] add trace points in ethdev library Ankur Dwivedi
2022-12-22  6:33       ` [PATCH v4 1/6] eal: trace: add trace point emit for array Ankur Dwivedi
2022-12-22  9:06         ` Sunil Kumar Kori
2022-12-22 10:32         ` Morten Brørup
2022-12-22 15:18           ` Ankur Dwivedi
2022-12-22  6:33       ` [PATCH v4 2/6] ethdev: add trace points for ethdev Ankur Dwivedi
2022-12-22 10:50         ` Morten Brørup
2022-12-22  6:33       ` [PATCH v4 3/6] ethdev: add trace points for remaining functions Ankur Dwivedi
2022-12-22  6:33       ` [PATCH v4 4/6] ethdev: add trace points for flow Ankur Dwivedi
2022-12-22  6:33       ` [PATCH v4 5/6] ethdev: add trace points for mtr Ankur Dwivedi
2022-12-22  6:33       ` [PATCH v4 6/6] ethdev: add trace points for tm Ankur Dwivedi
2023-01-12 11:21       ` [PATCH v5 0/6] add trace points in ethdev library Ankur Dwivedi
2023-01-12 11:21         ` [PATCH v5 1/6] eal: trace: add trace point emit for blob Ankur Dwivedi
2023-01-12 12:38           ` Morten Brørup
2023-01-12 13:22             ` Ankur Dwivedi
2023-01-12 16:29           ` Sunil Kumar Kori
2023-01-12 16:43             ` Sunil Kumar Kori
2023-01-12 11:21         ` [PATCH v5 2/6] ethdev: add trace points for ethdev Ankur Dwivedi
2023-01-12 16:34           ` Sunil Kumar Kori
2023-01-12 11:21         ` [PATCH v5 3/6] ethdev: add trace points for remaining functions Ankur Dwivedi
2023-01-12 16:38           ` Sunil Kumar Kori
2023-01-13  6:31             ` Ankur Dwivedi
2023-01-13  8:11               ` Sunil Kumar Kori
2023-01-12 11:21         ` [PATCH v5 4/6] ethdev: add trace points for flow Ankur Dwivedi
2023-01-12 11:21         ` [PATCH v5 5/6] ethdev: add trace points for mtr Ankur Dwivedi
2023-01-12 11:21         ` [PATCH v5 6/6] ethdev: add trace points for tm Ankur Dwivedi
2023-01-12 17:03         ` [PATCH v5 0/6] add trace points in ethdev library Ferruh Yigit
2023-01-13  6:32           ` [EXT] " Ankur Dwivedi
2023-01-20  8:40         ` [PATCH v6 " Ankur Dwivedi
2023-01-20  8:40           ` [PATCH v6 1/6] eal: trace: add trace point emit for blob Ankur Dwivedi
2023-01-20 10:11             ` Morten Brørup
2023-01-23 17:27             ` Ferruh Yigit
2023-01-25 15:02               ` [EXT] " Ankur Dwivedi
2023-01-25 16:09                 ` Ferruh Yigit
2023-01-30 13:35                   ` Ankur Dwivedi
2023-01-20  8:40           ` [PATCH v6 2/6] ethdev: add trace points for ethdev (part one) Ankur Dwivedi
2023-01-23 17:28             ` Ferruh Yigit
2023-01-30 16:01               ` [EXT] " Ankur Dwivedi
2023-01-31 18:38                 ` Ferruh Yigit
2023-01-31 18:46                   ` Jerin Jacob
2023-01-31 22:20                     ` Ferruh Yigit
2023-02-01  8:31                       ` Jerin Jacob
2023-02-01 10:50                         ` Ferruh Yigit
2023-02-01 15:42                   ` Ankur Dwivedi
2023-02-02  8:56                     ` Ferruh Yigit
2023-02-02 10:20                       ` Ankur Dwivedi
2023-02-02 12:52                         ` Ferruh Yigit
2023-02-02 13:40                           ` Ankur Dwivedi
2023-02-02 13:44                             ` Ferruh Yigit
2023-02-02 13:53                               ` Ankur Dwivedi
2023-01-20  8:40           ` [PATCH v6 3/6] ethdev: add trace points for ethdev (part two) Ankur Dwivedi
2023-01-20  8:40           ` [PATCH v6 4/6] ethdev: add trace points for flow Ankur Dwivedi
2023-01-20  8:40           ` [PATCH v6 5/6] ethdev: add trace points for mtr Ankur Dwivedi
2023-01-20  8:40           ` [PATCH v6 6/6] ethdev: add trace points for tm Ankur Dwivedi
2023-01-23  9:02           ` [PATCH v7 0/6] add trace points in ethdev library Ankur Dwivedi
2023-01-23  9:02             ` [PATCH v7 1/6] eal: trace: add trace point emit for blob Ankur Dwivedi
2023-01-23 13:01               ` Jerin Jacob
2023-01-23 13:08                 ` Morten Brørup
2023-01-23 13:39                   ` Ankur Dwivedi
2023-01-30  7:30               ` Sunil Kumar Kori
2023-01-30  8:15                 ` Morten Brørup
2023-01-30  8:40                   ` Sunil Kumar Kori
2023-01-23  9:02             ` [PATCH v7 2/6] ethdev: add trace points for ethdev (part one) Ankur Dwivedi
2023-01-30  8:45               ` Sunil Kumar Kori
2023-01-23  9:02             ` [PATCH v7 3/6] ethdev: add trace points for ethdev (part two) Ankur Dwivedi
2023-01-30  8:47               ` Sunil Kumar Kori
2023-01-23  9:02             ` [PATCH v7 4/6] ethdev: add trace points for flow Ankur Dwivedi
2023-02-02 13:52               ` Ori Kam
2023-02-02 13:56                 ` Ori Kam
2023-02-02 15:45                   ` Ankur Dwivedi
2023-01-23  9:02             ` [PATCH v7 5/6] ethdev: add trace points for mtr Ankur Dwivedi
2023-01-30  8:50               ` Sunil Kumar Kori
2023-01-23  9:02             ` [PATCH v7 6/6] ethdev: add trace points for tm Ankur Dwivedi
2023-02-06 11:58             ` [PATCH v8 0/6] add trace points in ethdev library Ankur Dwivedi
2023-02-06 11:58               ` [PATCH v8 1/6] eal: trace: add trace point emit for blob Ankur Dwivedi
2023-02-06 14:48                 ` David Marchand
2023-02-07  5:08                   ` [EXT] " Ankur Dwivedi
2023-02-06 11:58               ` [PATCH v8 2/6] ethdev: add trace points for ethdev (part one) Ankur Dwivedi
2023-02-06 11:58               ` [PATCH v8 3/6] ethdev: add trace points for ethdev (part two) Ankur Dwivedi
2023-02-06 11:58               ` [PATCH v8 4/6] ethdev: add trace points for flow Ankur Dwivedi
2023-02-06 11:58               ` [PATCH v8 5/6] ethdev: add trace points for mtr Ankur Dwivedi
2023-02-06 11:58               ` [PATCH v8 6/6] ethdev: add trace points for tm Ankur Dwivedi
2023-02-07  6:32               ` [PATCH v9 0/6] add trace points in ethdev library Ankur Dwivedi
2023-02-07  6:32                 ` [PATCH v9 1/6] eal: trace: add trace point emit for blob Ankur Dwivedi
2023-02-08  1:16                   ` Ferruh Yigit
2023-02-07  6:32                 ` [PATCH v9 2/6] ethdev: add trace points for ethdev (part one) Ankur Dwivedi
2023-02-08  1:16                   ` Ferruh Yigit
2023-02-08 10:30                     ` [EXT] " Ankur Dwivedi
2023-02-07  6:32                 ` [PATCH v9 3/6] ethdev: add trace points for ethdev (part two) Ankur Dwivedi
2023-02-08  1:20                   ` Ferruh Yigit
2023-02-08 10:42                     ` Ankur Dwivedi [this message]
2023-02-08 11:00                       ` [EXT] " Ferruh Yigit
2023-02-08 11:04                         ` Ferruh Yigit
2023-02-08 14:15                           ` Ankur Dwivedi
2023-02-08 15:05                             ` Ferruh Yigit
2023-02-08 15:11                               ` Ankur Dwivedi
2023-02-07  6:32                 ` [PATCH v9 4/6] ethdev: add trace points for flow Ankur Dwivedi
2023-02-07  6:32                 ` [PATCH v9 5/6] ethdev: add trace points for mtr Ankur Dwivedi
2023-02-07  6:32                 ` [PATCH v9 6/6] ethdev: add trace points for tm Ankur Dwivedi
2023-02-08 13:28                 ` [PATCH v10 0/6] add trace points in ethdev library Ankur Dwivedi
2023-02-08 13:28                   ` [PATCH v10 1/6] eal: trace: add trace point emit for blob Ankur Dwivedi
2023-02-08 13:28                   ` [PATCH v10 2/6] ethdev: add trace points for ethdev (part one) Ankur Dwivedi
2023-02-08 13:28                   ` [PATCH v10 3/6] ethdev: add trace points for ethdev (part two) Ankur Dwivedi
2023-02-08 13:28                   ` [PATCH v10 4/6] ethdev: add trace points for flow Ankur Dwivedi
2023-02-08 16:15                     ` Ori Kam
2023-02-08 13:28                   ` [PATCH v10 5/6] ethdev: add trace points for mtr Ankur Dwivedi
2023-02-08 13:28                   ` [PATCH v10 6/6] ethdev: add trace points for tm Ankur Dwivedi
2023-03-15  7:14                     ` Yuan, DukaiX
2023-03-16  9:58                       ` Ankur Dwivedi
2023-02-08 17:12                   ` [PATCH v11 0/6] add trace points in ethdev library Ankur Dwivedi
2023-02-08 17:12                     ` [PATCH v11 1/6] eal: trace: add trace point emit for blob Ankur Dwivedi
2023-02-08 17:12                     ` [PATCH v11 2/6] ethdev: add trace points for ethdev (part one) Ankur Dwivedi
2023-02-17  7:32                       ` Li, WeiyuanX
2023-02-08 17:12                     ` [PATCH v11 3/6] ethdev: add trace points for ethdev (part two) Ankur Dwivedi
2023-02-08 20:09                       ` Ferruh Yigit
2023-02-08 17:12                     ` [PATCH v11 4/6] ethdev: add trace points for flow Ankur Dwivedi
2023-02-08 17:12                     ` [PATCH v11 5/6] ethdev: add trace points for mtr Ankur Dwivedi
2023-02-08 17:12                     ` [PATCH v11 6/6] ethdev: add trace points for tm Ankur Dwivedi
2023-02-08 20:09                     ` [PATCH v11 0/6] add trace points in ethdev library Ferruh Yigit
2023-02-26 18:34                     ` Ali Alnubani
2023-02-27  9:38                       ` Ankur Dwivedi
2023-01-23 17:30           ` [PATCH v6 " Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CO3PR18MB50057EB5D93AA6C1D2108DC1DDD89@CO3PR18MB5005.namprd18.prod.outlook.com \
    --to=adwivedi@marvell.com \
    --cc=Yuying.Zhang@intel.com \
    --cc=aboyer@pensando.io \
    --cc=ajit.khaparde@broadcom.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=apeksha.gupta@nxp.com \
    --cc=beilei.xing@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=chandu@amd.com \
    --cc=chaoyong.he@corigine.com \
    --cc=chas3@att.com \
    --cc=chenbo.xia@intel.com \
    --cc=ciara.loftus@intel.com \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=dsinghrawat@marvell.com \
    --cc=ed.czeck@atomicrules.com \
    --cc=evgenys@amazon.com \
    --cc=ferruh.yigit@amd.com \
    --cc=g.singh@nxp.com \
    --cc=grive@u256.net \
    --cc=hemant.agrawal@nxp.com \
    --cc=hkalra@marvell.com \
    --cc=humin29@huawei.com \
    --cc=hyonkim@cisco.com \
    --cc=igorch@amazon.com \
    --cc=irusskikh@marvell.com \
    --cc=jasvinder.singh@intel.com \
    --cc=jbehrens@vmware.com \
    --cc=jerinj@marvell.com \
    --cc=jgrajcia@cisco.com \
    --cc=jianwang@trustnetic.com \
    --cc=jiawenwu@trustnetic.com \
    --cc=jingjing.wu@intel.com \
    --cc=john.miller@atomicrules.com \
    --cc=johndale@cisco.com \
    --cc=junfeng.guo@intel.com \
    --cc=kirankumark@marvell.com \
    --cc=linville@tuxdriver.com \
    --cc=lironh@marvell.com \
    --cc=liudongdong3@huawei.com \
    --cc=longli@microsoft.com \
    --cc=matan@nvidia.com \
    --cc=matt.peters@windriver.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=mb@smartsharesystems.com \
    --cc=mczekaj@marvell.com \
    --cc=mdr@ashroe.eu \
    --cc=mk@semihalf.com \
    --cc=mtetsuyah@gmail.com \
    --cc=mw@semihalf.com \
    --cc=ndabilpuram@marvell.com \
    --cc=niklas.soderlund@corigine.com \
    --cc=orika@nvidia.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=radhac@marvell.com \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=rmody@marvell.com \
    --cc=rosen.xu@intel.com \
    --cc=sachin.saxena@nxp.com \
    --cc=sachin.saxena@oss.nxp.com \
    --cc=sedara@marvell.com \
    --cc=shaibran@amazon.com \
    --cc=shepard.siegel@atomicrules.com \
    --cc=shshaikh@marvell.com \
    --cc=simei.su@intel.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=spinler@cesnet.cz \
    --cc=srinivasan@marvell.com \
    --cc=steven.webster@windriver.com \
    --cc=sthotton@marvell.com \
    --cc=thomas@monjalon.net \
    --cc=vburru@marvell.com \
    --cc=viacheslavo@nvidia.com \
    --cc=wenjun1.wu@intel.com \
    --cc=xiao.w.wang@intel.com \
    --cc=xuanziyang2@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    --cc=zhouguoyang@huawei.com \
    --cc=zr@semihalf.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).