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>,
	David Marchand <david.marchand@redhat.com>,
	Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Cc: "thomas@monjalon.net" <thomas@monjalon.net>,
	"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>,
	"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>,
	"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 v6 2/6] ethdev: add trace points for ethdev (part one)
Date: Thu, 2 Feb 2023 10:20:06 +0000	[thread overview]
Message-ID: <CO3PR18MB500523B7708C6A93B4CF3180DDD69@CO3PR18MB5005.namprd18.prod.outlook.com> (raw)
In-Reply-To: <bbb9decd-0c6c-84b2-3a6c-48cbb52cd9ac@amd.com>


>-----Original Message-----
>From: Ferruh Yigit <ferruh.yigit@amd.com>
>Sent: Thursday, February 2, 2023 2:27 PM
>To: Ankur Dwivedi <adwivedi@marvell.com>; dev@dpdk.org; David
>Marchand <david.marchand@redhat.com>; Jerin Jacob Kollanukkaran
><jerinj@marvell.com>; Andrew Rybchenko
><andrew.rybchenko@oktetlabs.ru>
>Cc: 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
><irusskikh@marvell.com>; shepard.siegel@atomicrules.com;
>ed.czeck@atomicrules.com; john.miller@atomicrules.com;
>ajit.khaparde@broadcom.com; somnath.kotur@broadcom.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; 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 <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; Radha Chintakuntla
><radhac@marvell.com>; Veerasenareddy Burru <vburru@marvell.com>;
>Sathesh B Edara <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;
>Rasesh Mody <rmody@marvell.com>; Shahed Shaikh
><shshaikh@marvell.com>; Devendra Singh Rawat
><dsinghrawat@marvell.com>; 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
>Subject: Re: [EXT] Re: [PATCH v6 2/6] ethdev: add trace points for ethdev (part
>one)
>
>On 2/1/2023 3:42 PM, Ankur Dwivedi wrote:
>>
>>
>>> -----Original Message-----
>>> From: Ferruh Yigit <ferruh.yigit@amd.com>
>>> Sent: Wednesday, February 1, 2023 12:08 AM
>>> To: Ankur Dwivedi <adwivedi@marvell.com>; dev@dpdk.org; David
>>> Marchand <david.marchand@redhat.com>; Jerin Jacob Kollanukkaran
>>> <jerinj@marvell.com>; Andrew Rybchenko
>>> <andrew.rybchenko@oktetlabs.ru>
>>> Cc: 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
>>> <irusskikh@marvell.com>; shepard.siegel@atomicrules.com;
>>> ed.czeck@atomicrules.com; john.miller@atomicrules.com;
>>> ajit.khaparde@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;
>>> 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 <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; Radha Chintakuntla <radhac@marvell.com>;
>>> Veerasenareddy Burru <vburru@marvell.com>; Sathesh B Edara
>>> <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; Rasesh Mody
>>> <rmody@marvell.com>; Shahed Shaikh <shshaikh@marvell.com>;
>Devendra
>>> Singh Rawat <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
>>> Subject: Re: [EXT] Re: [PATCH v6 2/6] ethdev: add trace points for
>>> ethdev (part
>>> one)
>>>
>>> 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
>>> 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
>>>
>>> <...>
>>>
>>>>>> -	if (port_id >= RTE_MAX_ETHPORTS)
>>>>>> +	if (port_id >= RTE_MAX_ETHPORTS) {
>>>>>> +		rte_eth_trace_find_next(RTE_MAX_ETHPORTS);
>>>>>
>>>>> Is there a specific reason to trace all paths, why not just keep the last
>one?
>>>> This can be kept as the function returns with RTE_MAX_ETHPORTS here.
>>>
>>> 'RTE_MAX_ETHPORTS' more like error path, that is returned when no
>>> more valid port left, since most of the trace doesn't record error
>>> return values, I thought this can be dropped as well unless there is an
>explicit need for it.
>> Ok.
>>>
>>> <...>
>>>
>>>>>> +RTE_TRACE_POINT(
>>>>>> +	rte_eth_trace_rx_hairpin_queue_setup,
>>>>>> +	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t
>rx_queue_id,
>>>>>> +		uint16_t nb_rx_desc, const struct
>rte_eth_hairpin_conf *conf,
>>>>>> +		int ret),
>>>>>> +	uint32_t peer_count = conf->peer_count;
>>>>>> +	uint32_t tx_explicit = conf->tx_explicit;
>>>>>> +	uint32_t manual_bind = conf->manual_bind;
>>>>>> +	uint32_t use_locked_device_memory = conf-
>>>>>> use_locked_device_memory;
>>>>>> +	uint32_t use_rte_memory = conf->use_rte_memory;
>>>>>> +	uint32_t force_memory = conf->force_memory;
>>>>>> +
>>>>>> +	rte_trace_point_emit_u16(port_id);
>>>>>> +	rte_trace_point_emit_u16(rx_queue_id);
>>>>>> +	rte_trace_point_emit_u16(nb_rx_desc);
>>>>>> +	rte_trace_point_emit_ptr(conf);
>>>>>> +	rte_trace_point_emit_u32(peer_count);
>>>>>> +	rte_trace_point_emit_u32(tx_explicit);
>>>>>> +	rte_trace_point_emit_u32(manual_bind);
>>>>>> +	rte_trace_point_emit_u32(use_locked_device_memory);
>>>>>> +	rte_trace_point_emit_u32(use_rte_memory);
>>>>>> +	rte_trace_point_emit_u32(force_memory);
>>>>>> +	rte_trace_point_emit_int(ret);
>>>>>
>>>>> Do we need temporary variables like 'peer_count', why not directly
>>>>> use
>>> them:
>>>> Temporary variables are needed where the actual variable is a bitfield.
>>>> For example in struct rte_eth_hairpin_conf:
>>>> struct rte_eth_hairpin_conf {
>>>> uint32_t peer_count:16;
>>>> ....
>>>> uint32_t tx_explicit:1
>>>> ....
>>>> };
>>>>
>>>> Otherwise there is a compilation error.
>>>> ../lib/ethdev/rte_ethdev_trace.h:253:9: note: in expansion of macro
>>> ‘rte_trace_point_emit_u16’
>>>>   253 |         rte_trace_point_emit_u16(conf->peer_count);
>>>>       |         ^~~~~~~~~~~~~~~~~~~~~~~~
>>>> ../lib/eal/include/rte_trace_point.h:369:38: error: ‘sizeof’ applied
>>>> to a bit-
>>> field
>>>>   369 |         mem = RTE_PTR_ADD(mem, sizeof(in)); \
>>>>
>>>
>>> Got it, that is because of bitfields. But as I look the
>'rte_trace_point_emit_u16'
>>> macro, it is like:
>>>
>>> ```
>>> #define rte_trace_point_emit_u16(in) __rte_trace_point_emit(in,
>>> uint16_t)
>>>
>>> #define __rte_trace_point_emit(in, type) \ do { \
>>>        memcpy(mem, &(in), sizeof(in)); \
>>>        mem = RTE_PTR_ADD(mem, sizeof(in)); \ } while (0) ```
>>>
>>> Here, in '__rte_trace_point_emit' macro 'type' is not used at all, if
>>> so what is the point of passing type?
>>>
>>> If 'sizeof(type)' used, instead of 'sizeof(in)', it would be possible
>>> to use bitfields directly, what do you think?
>>
>> After using 'sizeof(type)', the following compile time error is observed.
>> In file included from ../lib/ethdev/rte_ethdev_trace_fp_burst.h:18,
>>                  from ../lib/ethdev/rte_ethdev.h:175,
>>                  from ../lib/ethdev/rte_tm.c:8:
>> ../lib/ethdev/rte_ethdev_trace.h: In function
>‘rte_eth_trace_rx_hairpin_queue_setup’:
>> ../lib/eal/include/rte_trace_point.h:378:21: error: cannot take address of
>bit-field ‘peer_count’
>>   378 |         memcpy(mem, &(in), sizeof(type)); \
>>           |                                     ^
>
>Right, you can't memcpy to bitfiled, so temporary variables are required, OK.

Yes.
>
>Still, is it OK to ignore 'type' in the '__rte_trace_point_emit()'?
>If variable (in) is uint8_t, it won't matter if 'rte_trace_point_emit_u8',
>'rte_trace_point_emit_u16' or 'rte_trace_point_emit_u32' used, they will all
>give same result, right?
Calling (in) which is uint8_t is not allowed in 'rte_trace_point_emit_u16' because there is other __rte_trace_point_emit
in lib/eal/include/rte_trace_point_register.h called during trace point register which prevents this. 

There would be compilation error because of this check in '__rte_trace_point_emit()'
RTE_BUILD_BUG_ON(sizeof(type) != sizeof(typeof(in))); 

So type can be ignored in '__rte_trace_point_emit()' in lib/eal/include/rte_trace_point.h.
>
>
>>>
>>>
>>>
>>> Also, as for the "struct rte_eth_hairpin_conf" sample, some of the
>>> bitfields are
>>> 1 bit length, does 'uint32_t' really needed for them?
>>
>> uint8_t should suffice.
>
>ack
>
>>>
>>> <...>
>>>
>>>>>> +RTE_TRACE_POINT_FP(
>>>>>> +	rte_eth_trace_find_next,
>>>>>> +	RTE_TRACE_POINT_ARGS(uint16_t port_id),
>>>>>> +	rte_trace_point_emit_u16(port_id);
>>>>>> +)
>>>>>> +
>>>>>
>>>>> Why 'rte_eth_trace_find_next' added as fast path?
>>>>> Can you please add comment for all why it is added as fast path,
>>>>> this help to evaluate/review this later.
>>>>
>>>> There were many functions for which I was not sure about whether
>>>> they
>>> should be slow path or fast path. I made the following assumption:
>>>>
>>>> For slow path I have chosen the function which do some setup,
>>>> configure or
>>> write some configuration. For an example
>>> rte_eth_trace_tx_hairpin_queue_setup,
>>> rte_eth_trace_tx_buffer_set_err_callback,
>>> rte_eth_trace_promiscuous_enable are slow path functions.
>>>>
>>>> The functions which read data are made as fastpath functions. Also
>>>> for
>>> functions for which I was not sure I made it as fastpath.
>>>>
>>>> For an example rte_ethdev_trace_owner_get,
>>> rte_eth_trace_hairpin_get_peer_port, rte_eth_trace_macaddr_get are
>>> made as fastpath.
>>>>
>>>> But there are few exceptions. Function like *_get_capability are
>>>> made as
>>> slowpath. Also rte_ethdev_trace_info_get is slowpath.
>>>>
>>>> The slowpath and fastpath functions are in separate files.
>>> rte_ethdev_trace.h (slowpath) and rte_ethdev_trace_fp.h (fastpath).
>>>>
>>>> Please let me  know if any function needs to be swapped. I will make
>>>> that
>>> change.
>>>>
>>>
>>> Got it, I think most of the trace points in the 'rte_ethdev_trace_fp.h'
>>> are for control/helper functions like:
>>> 'rte_ethdev_trace_count_avail', 'rte_ethdev_trace_get_port_by_name',
>'rte_eth_trace_promiscuous_get' ...
>>>
>>> I thought you did based on some analysis, that is why I asked to add
>>> that reasoning as code comment.
>>>
>>>
>>> I think we can generalize as:
>>>
>>> 1) Anything called by ethdev static inline functions are datapath,
>>> and must be 'RTE_TRACE_POINT_FP', like
>>> 'rte_eth_trace_call_[rt]x_callbacks',
>>> 'rte_ethdev_trace_[rt]x_burst',
>>
>> In this category the following functions come:
>> rte_eth_rx_burst
>> rte_eth_tx_burst
>> rte_eth_call_rx_callbacks (called from rte_eth_rx_burst)
>> rte_eth_call_tx_callbacks (called from rte_eth_tx_burst)
>> rte_eth_tx_buffer_count_callback (registered as error callback, called
>> from rte_eth_tx_buffer_flush) rte_eth_tx_buffer_drop_callback
>> (registered as error callback)
>
>ack
>
>>>
>>> 2) Anything that is called in endless loop in application/sample that
>>> has potential impact although it may not really be datapath
>>
>> Apart from functions in category [1], I have observed the following functions
>in ethdev library, called in some while loop in app/examples.
>> rte_eth_stats_get (called in while loop in examples/qos_sched and
>> examples/distributor) rte_eth_macaddr_get (called in while loop in
>> examples/bond and examples/ethtool) rte_eth_link_get (called in for
>> loop in examples/ip_pipeline) rte_eth_dev_get_mtu (called in for loop
>> in examples/ip_pipeline) rte_eth_link_speed_to_str (called in for loop
>> in examples/ip_pipeline) rte_eth_dev_rx_intr_enable ( called in loop
>> in examples/l3fwd-power) rte_eth_dev_rx_intr_disable ( called in loop
>> in examples/l3fwd-power) rte_eth_timesync_read_rx_timestamp (called in
>> loop in examples/ptpclient) rte_eth_timesync_read_tx_timestamp (called
>> in loop in examples/ptpclient) rte_eth_timesync_adjust_time (called in
>> loop in examples/ptpclient) rte_eth_timesync_read_time (called in loop
>> in examples/ptpclient) rte_flow_classifier_query (called in
>> examples/flow_classify) rte_mtr_create (in app/test-flow-perf loop)
>> rte_mtr_destroy (in app/test-flow-perf loop)
>> rte_mtr_meter_policy_delete ((in app/test-flow-perf loop)
>> rte_flow_create (in app/test-flow-perf) rte_flow_destroy (in
>> app/test-flow-perf)
>>
>
>Ack, and can you please add the note within the parenthesis as a comment,
>whoever visits these later knows why there trace points added as fast path
>trace point?
>
>> Apart from the above can all other functions be moved to slowpath
>tracepoints?
>
>I think yes, we can start with this.
>At least this gives us a logic to follow.
>
>And does trace point and fast path trace points needs to be in separate
>header files?

I do not think separate header files is a requirement, but it is easy  to segregate 
slowpath/fastpath if they are in separate files. What do you think ?
>Can you please put first group into a header an expose it to the user, rest (as a
>mixture) to another header and keep it internal to ethdev?
Ok.
>
>Thanks.
>
>> I think it was discussed in tech board meeting on 2022-11-30 that the
>> functions for which the slowpath or fastpath distinction is not clear, they
>should be fastpath tracepoints.
>>
>>>
>>> 3) Rest are regular trace points, RTE_TRACE_POINT.
>>>
>>>
>>> Item (2) requires some analysis and whenever you found one of them
>>> please comment the reasoning in the code where trace point is defined.
>>


  reply	other threads:[~2023-02-02 10:22 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 [this message]
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                     ` [EXT] " Ankur Dwivedi
2023-02-08 11:00                       ` 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=CO3PR18MB500523B7708C6A93B4CF3180DDD69@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).