DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: Jerin Jacob <jerin.jacob@caviumnetworks.com>,
	"Kurakin, Ilia" <ilia.kurakin@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Wiles, Keith" <keith.wiles@intel.com>,
	"Galanov, Dmitry" <dmitry.galanov@intel.com>
Subject: Re: [dpdk-dev] [PATCH] ether: add support for vtune task tracing
Date: Fri, 30 Jun 2017 10:13:51 +0000	[thread overview]
Message-ID: <2601191342CEEE43887BDE71AB9772583FB1845F@IRSMSX109.ger.corp.intel.com> (raw)
In-Reply-To: <20170630033045.GA5296@jerin>



> -----Original Message-----
> From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
> Sent: Friday, June 30, 2017 4:31 AM
> To: Kurakin, Ilia <ilia.kurakin@intel.com>
> Cc: dev@dpdk.org; Ananyev, Konstantin <konstantin.ananyev@intel.com>; Wiles, Keith <keith.wiles@intel.com>; Galanov, Dmitry
> <dmitry.galanov@intel.com>
> Subject: Re: [dpdk-dev] [PATCH] ether: add support for vtune task tracing
> 
> -----Original Message-----
> > Date: Tue, 27 Jun 2017 16:16:01 +0300
> > From: ilia.kurakin@intel.com
> > To: dev@dpdk.org
> > CC: konstantin.ananyev@intel.com, keith.wiles@intel.com,
> >  dmitry.galanov@intel.com, Ilia Kurakin <ilia.kurakin@intel.com>
> > Subject: [dpdk-dev] [PATCH] ether: add support for vtune task tracing
> > X-Mailer: git-send-email 2.7.4
> >
> > From: Ilia Kurakin <ilia.kurakin@intel.com>
> >
> > diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
> > index f6e6c74..ee7cc42 100644
> > --- a/lib/librte_ether/rte_ethdev.h
> > +++ b/lib/librte_ether/rte_ethdev.h
> > @@ -186,6 +186,10 @@ extern "C" {
> >  #include "rte_eth_ctrl.h"
> >  #include "rte_dev_info.h"
> >
> > +#ifdef RTE_ETHDEV_TRACE_WASTED_RX_ITERATIONS
> > +#include "rte_eth_itt.h"
> > +#endif
> > +
> >  struct rte_mbuf;
> >
> >  /**
> > @@ -2710,6 +2714,25 @@ rte_eth_rx_burst(uint8_t port_id, uint16_t queue_id,
> >  	int16_t nb_rx = (*dev->rx_pkt_burst)(dev->data->rx_queues[queue_id],
> >  			rx_pkts, nb_pkts);
> >
> > +#ifdef RTE_ETHDEV_TRACE_WASTED_RX_ITERATIONS
> 
> If we give the generic name like above then the solution should be generic
> and it should not be tightly coupled with itt.
> 
> Different architectures may have different profiling tools like x86 has
> itt or it is possible to have generic perf based plugin in future.
> 
> Considering the above points, IMO, we can not add code in
> rte_eth_rx_burst() for each profiling variants. 

+ 1

>I think, this code can
> go in lib/librte_ether/rte_ethdev_profile.c and based on specific
> conditional compilation flag(something like RTE_ETHDEV_TRACE_ITT_WASTED_RX_ITERATIONS)
> it can register a rx callback.
> or any other scheme without directly modifying rte_eth_rx_burst() for
> itt based profiling.

Or might be even better to have some wrapper function/macro on top of rx_burst():
rx_burst_profle(...) or so.
Then user can either replace rx_burst() with rx_burst_profile() by conditional compilation,
or just call rx_burst_profile() directly.

Konstantin

> 
> 
> > +	/* See rte_eth_itt.h to find comments on code below. */
> > +	if (unlikely(nb_rx == 0)) {
> > +		if (!itt_aux_data[port_id].queue_is_wasting_iters[queue_id]) {
> > +			__itt_task_begin(
> > +				itt_aux_data[port_id].wasted_iter_domains[queue_id],
> > +				__itt_null, __itt_null,
> > +				itt_aux_data[port_id].wasted_iter_handles[queue_id]);
> > +			itt_aux_data[port_id].queue_is_wasting_iters[queue_id] = 1;
> > +		}
> > +	} else {
> > +		if (unlikely(itt_aux_data[port_id].queue_is_wasting_iters[queue_id])) {
> > +			__itt_task_end(
> > +				itt_aux_data[port_id].wasted_iter_domains[queue_id]);
> > +			itt_aux_data[port_id].queue_is_wasting_iters[queue_id] = 0;
> > +		}
> > +	}
> > +#endif
> > +
> >  #ifdef RTE_ETHDEV_RXTX_CALLBACKS
> >  	struct rte_eth_rxtx_callback *cb = dev->post_rx_burst_cbs[queue_id];
> >
> > --
> > 2.7.4
> >
> >
> > --------------------------------------------------------------------
> > Joint Stock Company Intel A/O
> > Registered legal address: Krylatsky Hills Business Park,
> > 17 Krylatskaya Str., Bldg 4, Moscow 121614,
> > Russian Federation
> >
> > This e-mail and any attachments may contain confidential material for
> > the sole use of the intended recipient(s). Any review or distribution
> > by others is strictly prohibited. If you are not the intended
> > recipient, please contact the sender and delete all copies.
> >

  reply	other threads:[~2017-06-30 10:13 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-19 17:18 ilia.kurakin
2017-06-22  9:42 ` Ananyev, Konstantin
2017-06-22 12:12   ` Kurakin, Ilia
2017-06-22 16:46     ` Galanov, Dmitry
2017-06-27 13:16 ` ilia.kurakin
2017-06-30  3:30   ` Jerin Jacob
2017-06-30 10:13     ` Ananyev, Konstantin [this message]
2017-07-06 16:42   ` [dpdk-dev] [PATCH v2] " ilia.kurakin
2017-07-10 12:30     ` Jerin Jacob
2017-07-11 17:24     ` [dpdk-dev] [PATCH v3] The patch adds tracing of loop iterations that yielded no packets in a DPDK application. It is using ITT task API: https://software.intel.com/en-us/node/544206 ilia.kurakin
2017-07-11 17:48     ` [dpdk-dev] [PATCH v3] ether: add support for vtune task tracing ilia.kurakin
2017-07-14  5:45       ` Jerin Jacob
2017-07-17 17:15       ` [dpdk-dev] [PATCH v4] " ilia.kurakin
2017-07-19  8:54         ` [dpdk-dev] [PATCH v5] " ilia.kurakin
2017-07-24  9:27           ` Jerin Jacob
2017-07-24 12:33             ` Kurakin, Ilia
2017-09-22 10:19             ` Thomas Monjalon
2017-07-24 17:06           ` [dpdk-dev] [PATCH v6] " ilia.kurakin
2017-09-08 12:57             ` [dpdk-dev] [PATCH v7] " ilia.kurakin
2017-09-22 10:42               ` Thomas Monjalon
2017-09-22 14:52               ` [dpdk-dev] [PATCH v8] " ilia.kurakin
2017-09-22 17:04                 ` Thomas Monjalon

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=2601191342CEEE43887BDE71AB9772583FB1845F@IRSMSX109.ger.corp.intel.com \
    --to=konstantin.ananyev@intel.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.galanov@intel.com \
    --cc=ilia.kurakin@intel.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=keith.wiles@intel.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).