Hi,

For odp4vpp plugin we need a new API function which, given user area
pointer, will return a pointer to ODP packet buffer. It is needed when
packets processed by VPP are sent back to ODP and only a pointer to VLIB
buffer data (stored inside user area) is known.

I have tried to store the ODP buffer pointer in VLIB data but reading it
for every packet lowers performance by 800kpps.

For odp-dpdk implementation it can look like:
/** @internal Inline function @param uarea @return */
static inline odp_packet_t _odp_packet_from_user_area(void *uarea)
{
       return (odp_packet_t)((uintptr_t)uarea - _odp_packet_inline.udata);
}

Please let me know what you think.

Thanks,
Michal

Reply via email to