[PATCH v7 1/6] eal: trace: add trace point emit for blob
Morten Brørup
mb at smartsharesystems.com
Mon Jan 30 09:15:07 CET 2023
> 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),
>
> 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