net/iavf: fix l4 checksum error

Message ID 1619490268-21835-1-git-send-email-wenzhuo.lu@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series net/iavf: fix l4 checksum error |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-abi-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/github-robot success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

Wenzhuo Lu April 27, 2021, 2:24 a.m. UTC
  leverage the behavior of the scalar path, preparing
packets is necessary for the checksum offload.

Fixes: 059f18ae2aec ("net/iavf: add offload path for Tx AVX512")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Qi Zhang April 27, 2021, 3:26 a.m. UTC | #1
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Wenzhuo Lu
> Sent: 2021年4月27日 10:24
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>
> Subject: [dpdk-dev] [PATCH] net/iavf: fix l4 checksum error
> 
> leverage the behavior of the scalar path, preparing packets is necessary for
> the checksum offload.
> 
> Fixes: 059f18ae2aec ("net/iavf: add offload path for Tx AVX512")
> 
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  

Patch

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 0ba19dbf..87f7eeb 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2585,6 +2585,7 @@ 
 					    iavf_xmit_pkts_vec_avx2 :
 					    iavf_xmit_pkts_vec;
 		}
+		dev->tx_pkt_prepare = NULL;
 #ifdef CC_AVX512_SUPPORT
 		if (use_avx512) {
 			if (check_ret == IAVF_VECTOR_PATH) {
@@ -2593,12 +2594,12 @@ 
 					    dev->data->port_id);
 			} else {
 				dev->tx_pkt_burst = iavf_xmit_pkts_vec_avx512_offload;
+				dev->tx_pkt_prepare = iavf_prep_pkts;
 				PMD_DRV_LOG(DEBUG, "Using AVX512 OFFLOAD Vector Tx (port %d).",
 					    dev->data->port_id);
 			}
 		}
 #endif
-		dev->tx_pkt_prepare = NULL;
 
 		for (i = 0; i < dev->data->nb_tx_queues; i++) {
 			txq = dev->data->tx_queues[i];