net/iavf: fix Tx path
PATCH 1/1 net/iavf: fix Tx path
Fix the Tx path and Tx descriptor usage in order to make the Tx offload flags and Tx data descriptor consistent.
--- drivers/net/iavf/iavf_rxtx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/net/iavf/iavf_rxtx.c +5 -3
@@ -2538,9 +2538,11 @@ iavf_build_data_desc_cmd_offset_fields(volatile uint64_t *qw1, offset |= (m->l2_len >>1 ) <<IAVF_TX_DESC_LENGTH_MACLEN_SHIFT ;/* Enable L3 checksum offloading inner */ -if (m->ol_flags & (RTE_MBUF_F_TX_IP_CKSUM |RTE_MBUF_F_TX_IPV4 )) { - command |=IAVF_TX_DESC_CMD_IIPT_IPV4_CSUM ; - offset |= (m->l3_len >>2 ) <<IAVF_TX_DESC_LENGTH_IPLEN_SHIFT ; +if (m->ol_flags &RTE_MBUF_F_TX_IP_CKSUM ) { +if (m->ol_flags &RTE_MBUF_F_TX_IPV4 ) { + command |=IAVF_TX_DESC_CMD_IIPT_IPV4_CSUM ; + offset |= (m->l3_len >>2 ) <<IAVF_TX_DESC_LENGTH_IPLEN_SHIFT ; + } }else if (m->ol_flags &RTE_MBUF_F_TX_IPV4 ) { command |=IAVF_TX_DESC_CMD_IIPT_IPV4 ; offset |= (m->l3_len >>2 ) <<IAVF_TX_DESC_LENGTH_IPLEN_SHIFT ;
Signature · 1 line
2.25.1
Quoted 11 lines
-----Original Message-----
From: Ke Zhang <[email protected]>
Sent: Thursday, August 4, 2022 3:33 PM
To: Li, Xiaoyun <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; [email protected]
Cc: Zhang, Ke1X <[email protected]>; [email protected]
Subject: [PATCH] net/iavf: fix Tx path
Quoted 2 lines
Fix the Tx path and Tx descriptor usage in order to make the Tx offload flags and Tx data descriptor consistent.
Seems all the changes are about fix Tx l3 checksum offload, the title and commit log can be more specific.
Quoted 36 lines
Fixes 1e728b01120c ("net/iavf: rework Tx path")Signed-off-by Ke Zhang <[email protected]>--- drivers/net/iavf/iavf_rxtx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)drivers/net/iavf/iavf_rxtx.c index renamed from drivers/net/iavf/iavf_rxtx.c +0
-0
109ba756f8..dfd021889e100644drivers/net/iavf/iavf_rxtx.c +0
-3@@ -2538,9 +2538,11 @@ iavf_build_data_desc_cmd_offset_fields(volatileuint64_t *qw1, offset |= (m->l2_len >> 1) << IAVF_TX_DESC_LENGTH_MACLEN_SHIFT;/* Enable L3 checksum offloading inner */ -if (m->ol_flags & (RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_IPV4)) { - command |=IAVF_TX_DESC_CMD_IIPT_IPV4_CSUM ; - offset |= (m->l3_len >> 2) <<
IAVF_TX_DESC_LENGTH_IPLEN_SHIFT;drivers/net/iavf/iavf_rxtx.c +4
-0+if (m->ol_flags &RTE_MBUF_F_TX_IP_CKSUM ) { +if (m->ol_flags &RTE_MBUF_F_TX_IPV4 ) { + command |=IAVF_TX_DESC_CMD_IIPT_IPV4_CSUM ; + offset |= (m->l3_len >> 2) <<
IAVF_TX_DESC_LENGTH_IPLEN_SHIFT;drivers/net/iavf/iavf_rxtx.c +1
-0+ } }else if (m->ol_flags &RTE_MBUF_F_TX_IPV4 ) { command |=IAVF_TX_DESC_CMD_IIPT_IPV4 ; offset |= (m->l3_len >> 2) <<
IAVF_TX_DESC_LENGTH_IPLEN_SHIFT;
--
2.25.1
PATCH v2 1/1 net/iavf: fix Tx L3 checksum offload flag
In reply to Ke ZhangWhen ol_flag is only RTE_MBUF_F_TX_IPV4, the Tx L3 checksum offload is still configured to IIPT in the command field of Tx data descriptor.
This patch is to fix the issue to make the Tx L3 checksum offload flags and Tx data descriptor consistent.
---
v2: Update the commit log
---
--- drivers/net/iavf/iavf_rxtx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/net/iavf/iavf_rxtx.c +5 -3
@@ -2538,9 +2538,11 @@ iavf_build_data_desc_cmd_offset_fields(volatile uint64_t *qw1, offset |= (m->l2_len >>1 ) <<IAVF_TX_DESC_LENGTH_MACLEN_SHIFT ;/* Enable L3 checksum offloading inner */ -if (m->ol_flags & (RTE_MBUF_F_TX_IP_CKSUM |RTE_MBUF_F_TX_IPV4 )) { - command |=IAVF_TX_DESC_CMD_IIPT_IPV4_CSUM ; - offset |= (m->l3_len >>2 ) <<IAVF_TX_DESC_LENGTH_IPLEN_SHIFT ; +if (m->ol_flags &RTE_MBUF_F_TX_IP_CKSUM ) { +if (m->ol_flags &RTE_MBUF_F_TX_IPV4 ) { + command |=IAVF_TX_DESC_CMD_IIPT_IPV4_CSUM ; + offset |= (m->l3_len >>2 ) <<IAVF_TX_DESC_LENGTH_IPLEN_SHIFT ; + } }else if (m->ol_flags &RTE_MBUF_F_TX_IPV4 ) { command |=IAVF_TX_DESC_CMD_IIPT_IPV4 ; offset |= (m->l3_len >>2 ) <<IAVF_TX_DESC_LENGTH_IPLEN_SHIFT ;
Signature · 1 line
2.25.1
RE: [PATCH v2] net/iavf: fix Tx L3 checksum offload flag
Quoted 13 lines
-----Original Message-----
From: Ke Zhang <[email protected]>
Sent: Wednesday, August 10, 2022 5:57 PM
To: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; [email protected]
Cc: Zhang, Ke1X <[email protected]>; [email protected]
Subject: [PATCH v2] net/iavf: fix Tx L3 checksum offload flagWhen
ol_flagis onlyRTE_MBUF_F_TX_IPV4, the Tx L3 checksum offload is still configured to IIPT in the command field of Tx data descriptor.
Quoted 7 lines
This patch is to fix the issue to make the Tx L3 checksum offload flags and Tx data descriptor consistent.
Fixes 1e728b01120c ("net/iavf: rework Tx path")Signed-off-by Ke Zhang <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi