[dpdk-dev] [PATCH v3 1/4] ethdev: add the API for getting burst mode information
Wang, Haiyue
haiyue.wang at intel.com
Tue Oct 15 03:02:09 CEST 2019
Hi,
> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Tuesday, October 15, 2019 00:39
> To: Wang, Haiyue <haiyue.wang at intel.com>; dev at dpdk.org; Ye, Xiaolong <xiaolong.ye at intel.com>
> Cc: Kinsella, Ray <ray.kinsella at intel.com>; Iremonger, Bernard <bernard.iremonger at intel.com>; Sun,
> Chenmin <chenmin.sun at intel.com>
> Subject: Re: [PATCH v3 1/4] ethdev: add the API for getting burst mode information
>
> On 10/14/2019 4:35 PM, Haiyue Wang wrote:
> > Some PMDs have more than one RX/TX burst paths, add the ethdev API
> > that allows an application to retrieve the mode information about
> > Rx/Tx packet burst such as Scalar or Vector, and Vector technology
> > like AVX2.
> >
> > Signed-off-by: Haiyue Wang <haiyue.wang at intel.com>
> > Acked-by: Bernard Iremonger <bernard.iremonger at intel.com>
>
> As far as I can see Bernard has ack only on testpmd patch, 4/4, not for reset of
> the patchset, can you please confirm this offline?
>
I checked it, yes, will remove other three ACKs, sorry for not so strict.
> > Reviewed-by: Xiaolong Ye <xiaolong.ye at intel.com>
>
> <...>
>
> > +const char *
> > +rte_eth_burst_mode_option_name(uint64_t option)
> > +{
> > + switch (option) {
> > + case RTE_ETH_BURST_SCALAR: return "Scalar";
> > + case RTE_ETH_BURST_VECTOR: return "Vector";
> > +
> > + case RTE_ETH_BURST_ALTIVEC: return "AltiVec";
> > + case RTE_ETH_BURST_NEON: return "Neon";
> > + case RTE_ETH_BURST_SSE: return "SSE";
> > + case RTE_ETH_BURST_AVX2: return "AVX2";
> > + case RTE_ETH_BURST_AVX512: return "AVX512";
> > +
> > + case RTE_ETH_BURST_SCATTERED: return "Scattered";
> > + case RTE_ETH_BURST_BULK_ALLOC: return "Bulk Alloc";
> > + case RTE_ETH_BURST_SIMPLE: return "Simple";
> > +
> > + case RTE_ETH_BURST_PER_QUEUE: return "Per Queue";
> > + }
> > +
> > + return "";
> > +}
>
> Hi Haiyue,
>
> The string representation of a vector mode is a data, and I think better to keep
> it separately as an array instead of keeping this information in the function
> and make the function use that data.
> So that when new type are added it won't require to update the function itself.
>
> 'rte_rx_offload_names' and 'rte_eth_dev_rx_offload_name()' is the good sample of
> what I mentioned above.
>
+1, will update it.
> Thanks,
> ferruh
More information about the dev
mailing list