[PATCH v7 1/6] eal: trace: add trace point emit for blob

Sunil Kumar Kori skori at marvell.com
Mon Jan 30 09:40:29 CET 2023


> -----Original Message-----
> From: Morten Brørup <mb at smartsharesystems.com>
> Sent: Monday, January 30, 2023 1:45 PM
> To: Sunil Kumar Kori <skori at marvell.com>; Ankur Dwivedi
> <adwivedi at marvell.com>; dev at dpdk.org
> Cc: thomas at monjalon.net; david.marchand at redhat.com; mdr at ashroe.eu;
> orika at nvidia.com; ferruh.yigit at amd.com; chas3 at att.com;
> humin29 at huawei.com; linville at tuxdriver.com; ciara.loftus at intel.com;
> qi.z.zhang at intel.com; mw at semihalf.com; mk at semihalf.com;
> shaibran at amazon.com; evgenys at amazon.com; igorch at amazon.com;
> chandu at amd.com; Igor Russkikh <irusskikh at marvell.com>;
> shepard.siegel at atomicrules.com; ed.czeck at atomicrules.com;
> john.miller at atomicrules.com; ajit.khaparde at broadcom.com;
> somnath.kotur at broadcom.com; Jerin Jacob Kollanukkaran
> <jerinj at marvell.com>; Maciej Czekaj [C] <mczekaj at marvell.com>; Shijith
> Thotton <sthotton at marvell.com>; Srisivasubramanian Srinivasan
> <srinivasan at marvell.com>; Harman Kalra <hkalra at marvell.com>;
> rahul.lakkireddy at chelsio.com; johndale at cisco.com; hyonkim at cisco.com;
> liudongdong3 at huawei.com; yisen.zhuang at huawei.com;
> xuanziyang2 at huawei.com; cloud.wangxiaoyun at huawei.com;
> zhouguoyang at huawei.com; simei.su at intel.com; wenjun1.wu at intel.com;
> qiming.yang at intel.com; Yuying.Zhang at intel.com; beilei.xing at intel.com;
> xiao.w.wang at intel.com; jingjing.wu at intel.com; junfeng.guo at intel.com;
> rosen.xu at intel.com; Nithin Kumar Dabilpuram
> <ndabilpuram at marvell.com>; Kiran Kumar Kokkilagadda
> <kirankumark at marvell.com>; Satha Koteswara Rao Kottidi
> <skoteshwar at marvell.com>; Liron Himi <lironh at marvell.com>;
> zr at semihalf.com; Radha Chintakuntla <radhac at marvell.com>;
> Veerasenareddy Burru <vburru at marvell.com>; Sathesh B Edara
> <sedara at marvell.com>; matan at nvidia.com; viacheslavo at nvidia.com;
> longli at microsoft.com; spinler at cesnet.cz; chaoyong.he at corigine.com;
> niklas.soderlund at corigine.com; hemant.agrawal at nxp.com;
> sachin.saxena at oss.nxp.com; g.singh at nxp.com; apeksha.gupta at nxp.com;
> sachin.saxena at nxp.com; aboyer at pensando.io; Rasesh Mody
> <rmody at marvell.com>; Shahed Shaikh <shshaikh at marvell.com>; Devendra
> Singh Rawat <dsinghrawat at marvell.com>; andrew.rybchenko at oktetlabs.ru;
> jiawenwu at trustnetic.com; jianwang at trustnetic.com;
> jbehrens at vmware.com; maxime.coquelin at redhat.com;
> chenbo.xia at intel.com; steven.webster at windriver.com;
> matt.peters at windriver.com; bruce.richardson at intel.com;
> mtetsuyah at gmail.com; grive at u256.net; jasvinder.singh at intel.com;
> cristian.dumitrescu at intel.com; jgrajcia at cisco.com; Ankur Dwivedi
> <adwivedi at marvell.com>
> Subject: [EXT] RE: [PATCH v7 1/6] eal: trace: add trace point emit for blob
> 
> External Email
> 
> ----------------------------------------------------------------------
> > From: Sunil Kumar Kori [mailto:skori at marvell.com]
> > Sent: Monday, 30 January 2023 08.31
> >
> > > From: Ankur Dwivedi <adwivedi at marvell.com>
> > > Sent: Monday, January 23, 2023 2:32 PM
> > >
> 
> [...]
> 
> > > +RTE_TRACE_POINT(
> > > +	rte_eal_trace_generic_blob,
> > > +	RTE_TRACE_POINT_ARGS(void *in, uint8_t len),
> > > +	rte_trace_point_emit_blob(in, len);
> > > +)
> > > +
> >
> > As per documentation rte_eal_trace_generic_blob() will emit 64 bytes
> > only i.e. input array cannot be other than uint8_t.
> > So will it not be better to make it more readable like
> > RTE_TRACE_POINT_ARGS(uint8_t *in, uint8_t len) instead of using void
> > *in.
> 
> No. Using uint8_t* would cause type conversion problems. The advantage of
> using void* is that it is has no type - which is exactly the purpose of a BLOB
> (which is short for Binary Large OBject). We want to be able to pass a pointer
> to e.g. a structure. Using void* makes that directly available.
> 
> I didn't notice before, but the const qualifier is missing. It should be:
> 
> RTE_TRACE_POINT_ARGS(const void *in, uint8_t len),
> 

Makes sense. Ack.

> >
> > Rest is fine. Already acked above.
> >
> > >  #define RTE_EAL_TRACE_GENERIC_FUNC
> > > rte_eal_trace_generic_func(__func__)
> > >
> > >  /* Interrupt */
> >
> > [snipped]
> >
> > > 2.25.1
> >



More information about the dev mailing list