From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 03D6E2BE1 for ; Fri, 30 Jun 2017 12:13:55 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2017 03:13:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,286,1496127600"; d="scan'208";a="987159851" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by orsmga003.jf.intel.com with ESMTP; 30 Jun 2017 03:13:52 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.115]) by IRSMSX154.ger.corp.intel.com ([169.254.12.76]) with mapi id 14.03.0319.002; Fri, 30 Jun 2017 11:13:52 +0100 From: "Ananyev, Konstantin" To: Jerin Jacob , "Kurakin, Ilia" CC: "dev@dpdk.org" , "Wiles, Keith" , "Galanov, Dmitry" Thread-Topic: [dpdk-dev] [PATCH] ether: add support for vtune task tracing Thread-Index: AQHS70elXjevAufhNUOrmztDNYzViaI8szOAgACAlKA= Date: Fri, 30 Jun 2017 10:13:51 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772583FB1845F@IRSMSX109.ger.corp.intel.com> References: <1497892689-27494-1-git-send-email-ilia.kurakin@intel.com> <1498569361-5011-1-git-send-email-ilia.kurakin@intel.com> <20170630033045.GA5296@jerin> In-Reply-To: <20170630033045.GA5296@jerin> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] ether: add support for vtune task tracing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 10:13:56 -0000 > -----Original Message----- > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > Sent: Friday, June 30, 2017 4:31 AM > To: Kurakin, Ilia > Cc: dev@dpdk.org; Ananyev, Konstantin ; Wil= es, Keith ; Galanov, Dmitry > > Subject: Re: [dpdk-dev] [PATCH] ether: add support for vtune task tracing >=20 > -----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 > > Subject: [dpdk-dev] [PATCH] ether: add support for vtune task tracing > > X-Mailer: git-send-email 2.7.4 > > > > From: Ilia Kurakin > > > > diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethde= v.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 =3D (*dev->rx_pkt_burst)(dev->data->rx_queues[queue_id]= , > > rx_pkts, nb_pkts); > > > > +#ifdef RTE_ETHDEV_TRACE_WASTED_RX_ITERATIONS >=20 > If we give the generic name like above then the solution should be generi= c > and it should not be tightly coupled with itt. >=20 > Different architectures may have different profiling tools like x86 has > itt or it is possible to have generic perf based plugin in future. >=20 > Considering the above points, IMO, we can not add code in > rte_eth_rx_burst() for each profiling variants.=20 + 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_R= X_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_bu= rst(): rx_burst_profle(...) or so. Then user can either replace rx_burst() with rx_burst_profile() by conditio= nal compilation, or just call rx_burst_profile() directly. Konstantin >=20 >=20 > > + /* See rte_eth_itt.h to find comments on code below. */ > > + if (unlikely(nb_rx =3D=3D 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] =3D 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] =3D 0; > > + } > > + } > > +#endif > > + > > #ifdef RTE_ETHDEV_RXTX_CALLBACKS > > struct rte_eth_rxtx_callback *cb =3D 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. > >