DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1] net/cpfl: fix datapath function configuration
@ 2023-09-19  8:32 Wenjun Wu
  2023-09-19  8:49 ` [PATCH v2] " Wenjun Wu
  2023-09-26  6:04 ` [PATCH v3] " Wenjun Wu
  0 siblings, 2 replies; 5+ messages in thread
From: Wenjun Wu @ 2023-09-19  8:32 UTC (permalink / raw)
  To: dev, yuying.zhang, beilei.xing, qi.z.zhang; +Cc: Wenjun Wu

Vector datapath is 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@intel.com>
---
 drivers/net/cpfl/cpfl_rxtx_vec_common.h | 6 +++++-
 1 file changed, 5 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..9d48620cee 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)
-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] net/cpfl: fix datapath function configuration
  2023-09-19  8:32 [PATCH v1] net/cpfl: fix datapath function configuration Wenjun Wu
@ 2023-09-19  8:49 ` Wenjun Wu
  2023-09-26  6:04 ` [PATCH v3] " Wenjun Wu
  1 sibling, 0 replies; 5+ messages in thread
From: Wenjun Wu @ 2023-09-19  8:49 UTC (permalink / raw)
  To: dev, yuying.zhang, beilei.xing, qi.z.zhang; +Cc: Wenjun Wu

Vector datapath is 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@intel.com>

---
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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH v3] net/cpfl: fix datapath function configuration
  2023-09-26  6:04 ` [PATCH v3] " Wenjun Wu
@ 2023-09-26  6:00   ` Xing, Beilei
  2023-09-26  6:04     ` Zhang, Qi Z
  0 siblings, 1 reply; 5+ messages in thread
From: Xing, Beilei @ 2023-09-26  6:00 UTC (permalink / raw)
  To: Wu, Wenjun1, dev, Zhang, Yuying, Zhang, Qi Z



> -----Original Message-----
> From: Wu, Wenjun1 <wenjun1.wu@intel.com>
> Sent: Tuesday, September 26, 2023 2:05 PM
> To: dev@dpdk.org; Zhang, Yuying <yuying.zhang@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: Wu, Wenjun1 <wenjun1.wu@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@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@intel.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH v3] net/cpfl: fix datapath function configuration
  2023-09-26  6:00   ` Xing, Beilei
@ 2023-09-26  6:04     ` Zhang, Qi Z
  0 siblings, 0 replies; 5+ messages in thread
From: Zhang, Qi Z @ 2023-09-26  6:04 UTC (permalink / raw)
  To: Xing, Beilei, Wu, Wenjun1, dev, Zhang, Yuying



> -----Original Message-----
> From: Xing, Beilei <beilei.xing@intel.com>
> Sent: Tuesday, September 26, 2023 2:00 PM
> To: Wu, Wenjun1 <wenjun1.wu@intel.com>; dev@dpdk.org; Zhang, Yuying
> <yuying.zhang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: RE: [PATCH v3] net/cpfl: fix datapath function configuration
> 
> 
> 
> > -----Original Message-----
> > From: Wu, Wenjun1 <wenjun1.wu@intel.com>
> > Sent: Tuesday, September 26, 2023 2:05 PM
> > To: dev@dpdk.org; Zhang, Yuying <yuying.zhang@intel.com>; Xing, Beilei
> > <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> > Cc: Wu, Wenjun1 <wenjun1.wu@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@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@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v3] net/cpfl: fix datapath function configuration
  2023-09-19  8:32 [PATCH v1] net/cpfl: fix datapath function configuration Wenjun Wu
  2023-09-19  8:49 ` [PATCH v2] " Wenjun Wu
@ 2023-09-26  6:04 ` Wenjun Wu
  2023-09-26  6:00   ` Xing, Beilei
  1 sibling, 1 reply; 5+ messages in thread
From: Wenjun Wu @ 2023-09-26  6:04 UTC (permalink / raw)
  To: dev, yuying.zhang, beilei.xing, qi.z.zhang; +Cc: Wenjun Wu

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@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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-09-26  6:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-19  8:32 [PATCH v1] net/cpfl: fix datapath function configuration Wenjun Wu
2023-09-19  8:49 ` [PATCH v2] " Wenjun Wu
2023-09-26  6:04 ` [PATCH v3] " Wenjun Wu
2023-09-26  6:00   ` Xing, Beilei
2023-09-26  6:04     ` Zhang, Qi Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).