net/iavf: fix outer udp checksum offload
Checks
Commit Message
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(-)
Comments
> -----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(-)
>
@@ -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;
}