net/iavf: fix Tx L4 checksum
authorWenzhuo Lu <wenzhuo.lu@intel.com>
Tue, 27 Apr 2021 02:24:28 +0000 (10:24 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Tue, 27 Apr 2021 03:24:36 +0000 (05:24 +0200)
Leverage the behavior of the scalar path, preparing
packets is necessary for vector paths which support 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

index 3f3cf63..232516c 100644 (file)
@@ -2587,6 +2587,7 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
                                            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) {
@@ -2595,12 +2596,12 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
                                            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];