DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/iavf: fix outer udp checksum offload
@ 2022-11-18  7:03 Zhichao Zeng
  2022-12-02  9:46 ` Xu, Ke1
  2022-12-13  1:45 ` [PATCH v2] " Zhichao Zeng
  0 siblings, 2 replies; 5+ messages in thread
From: Zhichao Zeng @ 2022-11-18  7:03 UTC (permalink / raw)
  To: dev
  Cc: qi.z.zhang, yidingx.zhou, Zhichao Zeng, Jingjing Wu, Beilei Xing,
	Peng Zhang

Currently, when dealing with UDP tunnel pkts checksum offloading,
the outer-udp checksum will be offloaded by default. So the
'csum set outer-udp hw/sw' command does not work.

This patch enables the 'csum set outer-udp hw/sw' command by adding
judgment on the outer-udp chekcusm offload flag.

Fixes: f7c8c36fdeb7 ("net/iavf: enable inner and outer Tx checksum offload")

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index cf87a6beda..c12fb96cfd 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2454,7 +2454,8 @@ iavf_fill_ctx_desc_tunnelling_field(volatile uint64_t *qw0,
 		 * Shall be set only if L4TUNT = 01b and EIPT is not zero
 		 */
 		if (!(eip_typ & IAVF_TX_CTX_EXT_IP_NONE) &&
-		    (eip_typ & IAVF_TXD_CTX_UDP_TUNNELING))
+		    (eip_typ & IAVF_TXD_CTX_UDP_TUNNELING) &&
+			(m->ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM))
 			eip_typ |= IAVF_TXD_CTX_QW0_L4T_CS_MASK;
 	}
 
-- 
2.25.1


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

* RE: [PATCH] net/iavf: fix outer udp checksum offload
  2022-11-18  7:03 [PATCH] net/iavf: fix outer udp checksum offload Zhichao Zeng
@ 2022-12-02  9:46 ` Xu, Ke1
  2022-12-13  1:45 ` [PATCH v2] " Zhichao Zeng
  1 sibling, 0 replies; 5+ messages in thread
From: Xu, Ke1 @ 2022-12-02  9:46 UTC (permalink / raw)
  To: Zeng, ZhichaoX, dev
  Cc: Zhang, Qi Z, Zhou, YidingX, Zeng, ZhichaoX, Wu, Jingjing, Xing,
	Beilei, Peng Zhang


> -----Original Message-----
> From: Zhichao Zeng <zhichaox.zeng@intel.com>
> Sent: Friday, November 18, 2022 3:03 PM
> To: dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Zhou, YidingX
> <yidingx.zhou@intel.com>; Zeng, ZhichaoX <zhichaox.zeng@intel.com>; Wu,
> Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Peng
> Zhang <peng1x.zhang@intel.com>
> Subject: [PATCH] net/iavf: fix outer udp checksum offload
> 
> Currently, when dealing with UDP tunnel pkts checksum offloading, the
> outer-udp checksum will be offloaded by default. So the 'csum set outer-udp
> hw/sw' command does not work.
> 
> This patch enables the 'csum set outer-udp hw/sw' command by adding
> judgment on the outer-udp chekcusm offload flag.
> 
> Fixes: f7c8c36fdeb7 ("net/iavf: enable inner and outer Tx checksum offload")
> 
> Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>

Tested and passed. Verified applying only outer IP checksum without outer UDP checksum.
Outer UDP checksum will be errors as this feature is to ignore this checksum error.
Inner checksum is not influenced.
Outer IP checksum is not influenced.

Regards,
Tested-by: Ke Xu <ke1.xu@intel.com>

> ---
>  drivers/net/iavf/iavf_rxtx.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 


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

* [PATCH v2] net/iavf: fix outer udp checksum offload
  2022-11-18  7:03 [PATCH] net/iavf: fix outer udp checksum offload Zhichao Zeng
  2022-12-02  9:46 ` Xu, Ke1
@ 2022-12-13  1:45 ` Zhichao Zeng
  2022-12-14  1:50   ` Xu, Ke1
  1 sibling, 1 reply; 5+ messages in thread
From: Zhichao Zeng @ 2022-12-13  1:45 UTC (permalink / raw)
  To: dev
  Cc: yidingx.zhou, ke1.xu, qi.z.zhang, Zhichao Zeng, Jingjing Wu,
	Beilei Xing, Radu Nicolau

Currently, when dealing with UDP tunnel pkts checksum offloading,
the outer-udp checksum will be offloaded by default. So the
'csum set outer-udp hw/sw' command does not work.

This patch fixes judgment of the EIPT flag and enables the
'csum set outer-udp hw/sw' command by adding judgment for the
outer-udp checksum offload flag.

Fixes: 0c550022fb82 ("net/iavf: fix Tx descriptors for IPsec")

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index cf87a6beda..8d49967538 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2453,8 +2453,11 @@ iavf_fill_ctx_desc_tunnelling_field(volatile uint64_t *qw0,
 		 * Calculate the tunneling UDP checksum.
 		 * Shall be set only if L4TUNT = 01b and EIPT is not zero
 		 */
-		if (!(eip_typ & IAVF_TX_CTX_EXT_IP_NONE) &&
-		    (eip_typ & IAVF_TXD_CTX_UDP_TUNNELING))
+		if ((eip_typ & (IAVF_TX_CTX_EXT_IP_IPV6 |
+					IAVF_TX_CTX_EXT_IP_IPV4 |
+					IAVF_TX_CTX_EXT_IP_IPV4_NO_CSUM)) &&
+				(eip_typ & IAVF_TXD_CTX_UDP_TUNNELING) &&
+				(m->ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM))
 			eip_typ |= IAVF_TXD_CTX_QW0_L4T_CS_MASK;
 	}
 
-- 
2.25.1


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

* RE: [PATCH v2] net/iavf: fix outer udp checksum offload
  2022-12-13  1:45 ` [PATCH v2] " Zhichao Zeng
@ 2022-12-14  1:50   ` Xu, Ke1
  2022-12-26  2:34     ` Zhang, Qi Z
  0 siblings, 1 reply; 5+ messages in thread
From: Xu, Ke1 @ 2022-12-14  1:50 UTC (permalink / raw)
  To: Zeng, ZhichaoX, dev
  Cc: Zhou, YidingX, Zhang, Qi Z, Wu, Jingjing, Xing, Beilei, Nicolau, Radu



> -----Original Message-----
> From: Zeng, ZhichaoX <zhichaox.zeng@intel.com>
> Sent: Tuesday, December 13, 2022 9:45 AM
> To: dev@dpdk.org
> Cc: Zhou, YidingX <yidingx.zhou@intel.com>; Xu, Ke1 <ke1.xu@intel.com>;
> Zhang, Qi Z <qi.z.zhang@intel.com>; Zeng, ZhichaoX
> <zhichaox.zeng@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Xing,
> Beilei <beilei.xing@intel.com>; Nicolau, Radu <radu.nicolau@intel.com>
> Subject: [PATCH v2] net/iavf: fix outer udp checksum offload
> 
> Currently, when dealing with UDP tunnel pkts checksum offloading, the
> outer-udp checksum will be offloaded by default. So the 'csum set outer-udp
> hw/sw' command does not work.
> 
> This patch fixes judgment of the EIPT flag and enables the 'csum set outer-
> udp hw/sw' command by adding judgment for the outer-udp checksum
> offload flag.
> 
> Fixes: 0c550022fb82 ("net/iavf: fix Tx descriptors for IPsec")
> 
> Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>

Verified and passed.

Verified applying only outer IP checksum without outer UDP checksum. Outer UDP checksum will be errors as this feature is to ignore this checksum error. Inner checksum is not influenced. Outer IP checksum is not influenced.

Verified applying all checksum HW offload.

> ---
>  drivers/net/iavf/iavf_rxtx.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 


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

* RE: [PATCH v2] net/iavf: fix outer udp checksum offload
  2022-12-14  1:50   ` Xu, Ke1
@ 2022-12-26  2:34     ` Zhang, Qi Z
  0 siblings, 0 replies; 5+ messages in thread
From: Zhang, Qi Z @ 2022-12-26  2:34 UTC (permalink / raw)
  To: Xu, Ke1, Zeng, ZhichaoX, dev
  Cc: Zhou, YidingX, Wu, Jingjing, Xing, Beilei, Nicolau, Radu



> -----Original Message-----
> From: Xu, Ke1 <ke1.xu@intel.com>
> Sent: Wednesday, December 14, 2022 9:51 AM
> To: Zeng, ZhichaoX <zhichaox.zeng@intel.com>; dev@dpdk.org
> Cc: Zhou, YidingX <yidingx.zhou@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Nicolau, Radu <radu.nicolau@intel.com>
> Subject: RE: [PATCH v2] net/iavf: fix outer udp checksum offload
> 
> 
> 
> > -----Original Message-----
> > From: Zeng, ZhichaoX <zhichaox.zeng@intel.com>
> > Sent: Tuesday, December 13, 2022 9:45 AM
> > To: dev@dpdk.org
> > Cc: Zhou, YidingX <yidingx.zhou@intel.com>; Xu, Ke1
> > <ke1.xu@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Zeng, ZhichaoX
> > <zhichaox.zeng@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Xing,
> > Beilei <beilei.xing@intel.com>; Nicolau, Radu <radu.nicolau@intel.com>
> > Subject: [PATCH v2] net/iavf: fix outer udp checksum offload
> >
> > Currently, when dealing with UDP tunnel pkts checksum offloading, the
> > outer-udp checksum will be offloaded by default. So the 'csum set
> > outer-udp hw/sw' command does not work.
> >
> > This patch fixes judgment of the EIPT flag and enables the 'csum set
> > outer- udp hw/sw' command by adding judgment for the outer-udp
> > checksum offload flag.
> >
> > Fixes: 0c550022fb82 ("net/iavf: fix Tx descriptors for IPsec")
> >
> > Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
> 
> Verified and passed.
> 
> Verified applying only outer IP checksum without outer UDP checksum. Outer
> UDP checksum will be errors as this feature is to ignore this checksum error.
> Inner checksum is not influenced. Outer IP checksum is not influenced.
> 
> Verified applying all checksum HW offload.
> 
> > ---
> >  drivers/net/iavf/iavf_rxtx.c | 7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> >

Applied to dpdk-next-net-intel.

Thanks
Qi


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

end of thread, other threads:[~2022-12-26  2:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-18  7:03 [PATCH] net/iavf: fix outer udp checksum offload Zhichao Zeng
2022-12-02  9:46 ` Xu, Ke1
2022-12-13  1:45 ` [PATCH v2] " Zhichao Zeng
2022-12-14  1:50   ` Xu, Ke1
2022-12-26  2:34     ` 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).