net/sfc: add Rx datapath method to get pushed buffers count
[dpdk.git] / drivers / net / cnxk / cn10k_tx.c
index 05bc163..0e1276c 100644 (file)
@@ -16,7 +16,7 @@
                    !((flags) & NIX_TX_OFFLOAD_L3_L4_CSUM_F))                  \
                        return 0;                                              \
                return cn10k_nix_xmit_pkts(tx_queue, tx_pkts, pkts, cmd,       \
-                                          flags);                             \
+                                          0, flags);                          \
        }
 
 NIX_TX_FASTPATH_MODES
@@ -67,15 +67,23 @@ cn10k_eth_set_tx_function(struct rte_eth_dev *eth_dev)
 #undef T
        };
 
-       if (dev->scalar_ena ||
-           (dev->tx_offload_flags &
-            (NIX_TX_OFFLOAD_TSTAMP_F | NIX_TX_OFFLOAD_TSO_F)))
+       const eth_tx_burst_t nix_eth_tx_vec_burst_mseg[2][2][2][2][2][2] = {
+#define T(name, f5, f4, f3, f2, f1, f0, sz, flags)                             \
+       [f5][f4][f3][f2][f1][f0] = cn10k_nix_xmit_pkts_vec_mseg_##name,
+
+               NIX_TX_FASTPATH_MODES
+#undef T
+       };
+
+       if (dev->scalar_ena) {
                pick_tx_func(eth_dev, nix_eth_tx_burst);
-       else
+               if (dev->tx_offloads & DEV_TX_OFFLOAD_MULTI_SEGS)
+                       pick_tx_func(eth_dev, nix_eth_tx_burst_mseg);
+       } else {
                pick_tx_func(eth_dev, nix_eth_tx_vec_burst);
-
-       if (dev->tx_offloads & DEV_TX_OFFLOAD_MULTI_SEGS)
-               pick_tx_func(eth_dev, nix_eth_tx_burst_mseg);
+               if (dev->tx_offloads & DEV_TX_OFFLOAD_MULTI_SEGS)
+                       pick_tx_func(eth_dev, nix_eth_tx_vec_burst_mseg);
+       }
 
        rte_mb();
 }