[dpdk-dev] [PATCH v3 3/3] net/iavf: enable AVX512 for TX

Lu, Wenzhuo wenzhuo.lu at intel.com
Tue Sep 22 03:34:09 CEST 2020


Hi Morten,

> -----Original Message-----
> From: Morten Brørup <mb at smartsharesystems.com>
> Sent: Tuesday, September 22, 2020 3:11 AM
> To: Lu, Wenzhuo <wenzhuo.lu at intel.com>; dev at dpdk.org
> Cc: Richardson, Bruce <bruce.richardson at intel.com>; Rong, Leyi
> <leyi.rong at intel.com>
> Subject: RE: [dpdk-dev] [PATCH v3 3/3] net/iavf: enable AVX512 for TX
> 
> > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Wenzhuo Lu
> > Sent: Monday, September 21, 2020 10:14 AM
> >
> > To enhance the per-core performance, this patch adds some AVX512
> > instructions to the data path to handle the TX descriptors.
> >
> > Signed-off-by: Wenzhuo Lu <wenzhuo.lu at intel.com>
> > Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> > Signed-off-by: Leyi Rong <leyi.rong at intel.com>
> 
> [...]
> 
> > +static inline void
> > +iavf_vtx(volatile struct iavf_tx_desc *txdp,
> > +	 struct rte_mbuf **pkt, uint16_t nb_pkts,  uint64_t flags) {
> > +	const uint64_t hi_qw_tmpl = (IAVF_TX_DESC_DTYPE_DATA |
> > +			((uint64_t)flags  << IAVF_TXD_QW1_CMD_SHIFT));
> > +
> > +	/* if unaligned on 32-bit boundary, do one to align */
> > +	if (((uintptr_t)txdp & 0x1F) != 0 && nb_pkts != 0) {
> > +		iavf_vtx1(txdp, *pkt, flags);
> > +		nb_pkts--, txdp++, pkt++;
> > +	}
> > +
> > +	/* do two at a time while possible, in bursts */
> 
> It looks like four at a time, not two.
Sorry for the mistake, will correct it.

> 
> > +	for (; nb_pkts > 3; txdp += 4, pkt += 4, nb_pkts -= 4) {


More information about the dev mailing list