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

Reply via email to