mbuf: add prefetch helpers
[dpdk.git] / drivers / net / fm10k / fm10k_rxtx_vec.c
index 9f178db..ef256a5 100644 (file)
@@ -149,6 +149,9 @@ fm10k_desc_to_olflags_v(__m128i descs[4], struct rte_mbuf **rx_pkts)
        rx_pkts[3]->ol_flags = vol.e[3];
 }
 
+/* @note: When this function is changed, make corresponding change to
+ * fm10k_dev_supported_ptypes_get().
+ */
 static inline void
 fm10k_desc_to_pktype_v(__m128i descs[4], struct rte_mbuf **rx_pkts)
 {
@@ -484,10 +487,10 @@ fm10k_recv_raw_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
                rte_compiler_barrier();
 
                if (split_packet) {
-                       rte_prefetch0(&rx_pkts[pos]->cacheline1);
-                       rte_prefetch0(&rx_pkts[pos + 1]->cacheline1);
-                       rte_prefetch0(&rx_pkts[pos + 2]->cacheline1);
-                       rte_prefetch0(&rx_pkts[pos + 3]->cacheline1);
+                       rte_mbuf_prefetch_part2(rx_pkts[pos]);
+                       rte_mbuf_prefetch_part2(rx_pkts[pos + 1]);
+                       rte_mbuf_prefetch_part2(rx_pkts[pos + 2]);
+                       rte_mbuf_prefetch_part2(rx_pkts[pos + 3]);
                }
 
                /* D.1 pkt 3,4 convert format from desc to pktmbuf */
@@ -603,8 +606,11 @@ fm10k_reassemble_packets(struct fm10k_rx_queue *rxq,
 
                        if (!split_flags[buf_idx]) {
                                /* it's the last packet of the set */
+#ifdef RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE
                                start->hash = end->hash;
                                start->ol_flags = end->ol_flags;
+                               start->packet_type = end->packet_type;
+#endif
                                pkts[pkt_idx++] = start;
                                start = end = NULL;
                        }
@@ -688,6 +694,9 @@ fm10k_tx_vec_condition_check(struct fm10k_tx_queue *txq)
        if ((txq->txq_flags & FM10K_SIMPLE_TX_FLAG) != FM10K_SIMPLE_TX_FLAG)
                return -1;
 
+       if (txq->tx_ftag_en)
+               return -1;
+
        return 0;
 }