net/cpfl: fix datapath function configuration
PATCH 1/1 net/cpfl: fix datapath function configuration
Vector datapath is not support any advanced features for now, so disable vector path if TX checksum offload or RX scatter is enabled.
--- drivers/net/cpfl/cpfl_rxtx_vec_common.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/net/cpfl/cpfl_rxtx_vec_common.h +5 -1
@@ -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)
Signature · 1 line
2.34.1
PATCH v2 1/1 net/cpfl: fix datapath function configuration
Vector datapath is not support any advanced features for now, so disable vector path if TX checksum offload or RX scatter is enabled.
---
v2: disable vector path for scatter cases.
--- drivers/net/cpfl/cpfl_rxtx_vec_common.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/net/cpfl/cpfl_rxtx_vec_common.h +8 -1
@@ -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);
Signature · 1 line
2.34.1
PATCH v3 1/1 net/cpfl: fix datapath function configuration
In reply to Wenjun WuVector datapath does not support any advanced features for now, so disable vector path if TX checksum offload or RX scatter is enabled.
---
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(-)
drivers/net/cpfl/cpfl_rxtx_vec_common.h +8 -1
@@ -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);
Signature · 1 line
2.34.1
Quoted 54 lines
-----Original Message-----
From: Wu, Wenjun1 <[email protected]>
Sent: Tuesday, September 26, 2023 2:05 PM
To: [email protected]; Zhang, Yuying <[email protected]>; Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: Wu, Wenjun1 <[email protected]>
Subject: [PATCH v3] net/cpfl: fix datapath function configurationVector 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 queuemodel")
Signed-off-by Wenjun Wu <[email protected]>---
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(-)drivers/net/cpfl/cpfl_rxtx_vec_common.h +5
-1@@ -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)drivers/net/cpfl/cpfl_rxtx_vec_common.h +3
-1struct 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); --
Quoted 1 line
2.34.1
Zhang, Qi Z
AppliedQuoted 56 lines
-----Original Message-----
From: Xing, Beilei <[email protected]>
Sent: Tuesday, September 26, 2023 2:00 PM
To: Wu, Wenjun1 <[email protected]>; [email protected]; Zhang, Yuying <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: RE: [PATCH v3] net/cpfl: fix datapath function configurationQuoted 45 lines
-----Original Message-----
From: Wu, Wenjun1 <[email protected]>
Sent: Tuesday, September 26, 2023 2:05 PM
To: [email protected]; Zhang, Yuying <[email protected]>; Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: Wu, Wenjun1 <[email protected]>
Subject: [PATCH v3] net/cpfl: fix datapath function configurationVector 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 queuemodel")
Signed-off-by Wenjun Wu <[email protected]>---
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(-)drivers/net/cpfl/cpfl_rxtx_vec_common.h +5
-1@@ -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)drivers/net/cpfl/cpfl_rxtx_vec_common.h +0
-0struct cpfl_rx_queue *cpfl_rxq;int i, default_ret, splitq_ret, ret =CPFL_SCALAR_PATH ;
Quoted 10 lines
Quoted 8 lines
drivers/net/cpfl/cpfl_rxtx_vec_common.h +3
-1+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 <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi