[dpdk-dev] [PATCH v3] net/iavf: enable AVX2 for iavf

Zhang, Qi Z qi.z.zhang at intel.com
Thu Sep 19 14:55:31 CEST 2019


minor capture inline

> -----Original Message-----
> From: Rong, Leyi
> Sent: Thursday, September 19, 2019 4:45 PM
> To: Lu, Wenzhuo <wenzhuo.lu at intel.com>; Zhang, Qi Z
> <qi.z.zhang at intel.com>; Ye, Xiaolong <xiaolong.ye at intel.com>
> Cc: dev at dpdk.org; Rong, Leyi <leyi.rong at intel.com>
> Subject: [PATCH v3] net/iavf: enable AVX2 for iavf
> 
> This patch enables AVX data path for iavf PMD.
> 
> Signed-off-by: Leyi Rong <leyi.rong at intel.com>
> 
> ---
> v3:
> - Adds release note.
> 
> v2:
> - fix build error on aarch64.
> ---

<...>
> diff --git a/drivers/net/iavf/iavf_rxtx_vec_common.h
> b/drivers/net/iavf/iavf_rxtx_vec_common.h
> index db509d71f..fff0555d2 100644
> --- a/drivers/net/iavf/iavf_rxtx_vec_common.h
> +++ b/drivers/net/iavf/iavf_rxtx_vec_common.h
> @@ -207,4 +207,76 @@ iavf_rxq_vec_setup_default(struct iavf_rx_queue
> *rxq)
>  	rxq->mbuf_initializer = *(uint64_t *)p;
>  	return 0;
>  }
> +
> +static inline int
> +iavf_rx_vec_queue_default(struct iavf_rx_queue *rxq) {
> +	if (!rxq)
> +		return -1;
> +
> +	if (!rte_is_power_of_2(rxq->nb_rx_desc))
> +		return -1;
> +
> +	if (rxq->rx_free_thresh < IAVF_VPMD_RX_MAX_BURST)
> +		return -1;
> +
> +	if (rxq->nb_rx_desc % rxq->rx_free_thresh)
> +		return -1;
> +
> +	return 0;
> +}
> +
> +#define IAVF_NO_VECTOR_FLAGS (				 \
> +		DEV_TX_OFFLOAD_MULTI_SEGS |		 \
> +		DEV_TX_OFFLOAD_VLAN_INSERT |		 \
> +		DEV_TX_OFFLOAD_SCTP_CKSUM |		 \
> +		DEV_TX_OFFLOAD_UDP_CKSUM |		 \
> +		DEV_TX_OFFLOAD_TCP_CKSUM)

This macro looks redundant, it is already defined in ice_rxtx.h

<...>



More information about the dev mailing list