[PATCH v3] net/cpfl: fix datapath function configuration

Xing, Beilei beilei.xing at intel.com
Tue Sep 26 08:00:25 CEST 2023



> -----Original Message-----
> From: Wu, Wenjun1 <wenjun1.wu at intel.com>
> Sent: Tuesday, September 26, 2023 2:05 PM
> To: dev at dpdk.org; Zhang, Yuying <yuying.zhang at intel.com>; Xing, Beilei
> <beilei.xing at intel.com>; Zhang, Qi Z <qi.z.zhang at intel.com>
> Cc: Wu, Wenjun1 <wenjun1.wu at intel.com>
> Subject: [PATCH v3] net/cpfl: fix datapath function configuration
> 
> Vector datapath does not support any advanced features for now, so disable
> vector path if TX checksum offload or RX scatter is enabled.
> 
> Fixes: 2f39845891e6 ("net/cpfl: add AVX512 data path for single queue
> model")
> 
> Signed-off-by: Wenjun Wu <wenjun1.wu at intel.com>
> 
> ---
> v3: fix log typo.
> v2: disable vector path for scatter cases.
> ---
>  drivers/net/cpfl/cpfl_rxtx_vec_common.h | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/cpfl/cpfl_rxtx_vec_common.h
> b/drivers/net/cpfl/cpfl_rxtx_vec_common.h
> index d8e9191196..479e1ddcb9 100644
> --- a/drivers/net/cpfl/cpfl_rxtx_vec_common.h
> +++ b/drivers/net/cpfl/cpfl_rxtx_vec_common.h
> @@ -25,7 +25,11 @@
>  		RTE_ETH_RX_OFFLOAD_TIMESTAMP)
>  #define CPFL_TX_NO_VECTOR_FLAGS (		\
>  		RTE_ETH_TX_OFFLOAD_TCP_TSO |	\
> -		RTE_ETH_TX_OFFLOAD_MULTI_SEGS)
> +		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |	\
> +		RTE_ETH_TX_OFFLOAD_IPV4_CKSUM |		\
> +		RTE_ETH_TX_OFFLOAD_SCTP_CKSUM |		\
> +		RTE_ETH_TX_OFFLOAD_UDP_CKSUM |	\
> +		RTE_ETH_TX_OFFLOAD_TCP_CKSUM)
> 
>  static inline int
>  cpfl_rx_vec_queue_default(struct idpf_rx_queue *rxq) @@ -81,6 +85,9 @@
> cpfl_rx_vec_dev_check_default(struct rte_eth_dev *dev)
>  	struct cpfl_rx_queue *cpfl_rxq;
>  	int i, default_ret, splitq_ret, ret = CPFL_SCALAR_PATH;
> 
> +	if (dev->data->scattered_rx)
> +		return CPFL_SCALAR_PATH;
> +
>  	for (i = 0; i < dev->data->nb_rx_queues; i++) {
>  		cpfl_rxq = dev->data->rx_queues[i];
>  		default_ret = cpfl_rx_vec_queue_default(&cpfl_rxq->base);
> --
> 2.34.1

Acked-by: Beilei Xing <beilei.xing at intel.com>


More information about the dev mailing list