net/iavf: enable Rx timestamp on flex descriptor
[dpdk.git] / drivers / net / iavf / iavf_rxtx_vec_sse.c
index d4f4d70..717a227 100644 (file)
@@ -159,7 +159,7 @@ desc_to_olflags_v(struct iavf_rx_queue *rxq, __m128i descs[4],
        l3_l4e = _mm_shuffle_epi8(l3_l4e_flags, l3_l4e);
        /* then we shift left 1 bit */
        l3_l4e = _mm_slli_epi32(l3_l4e, 1);
-       /* we need to mask out the reduntant bits */
+       /* we need to mask out the redundant bits */
        l3_l4e = _mm_and_si128(l3_l4e, cksum_mask);
 
        vlan0 = _mm_or_si128(vlan0, rss);
@@ -363,10 +363,12 @@ static inline void
 flex_desc_to_ptype_v(__m128i descs[4], struct rte_mbuf **rx_pkts,
                     const uint32_t *type_table)
 {
-       const __m128i ptype_mask = _mm_set_epi16(0, IAVF_RX_FLEX_DESC_PTYPE_M,
-                                                0, IAVF_RX_FLEX_DESC_PTYPE_M,
-                                                0, IAVF_RX_FLEX_DESC_PTYPE_M,
-                                                0, IAVF_RX_FLEX_DESC_PTYPE_M);
+       const __m128i ptype_mask =
+                       _mm_set_epi16(IAVF_RX_FLEX_DESC_PTYPE_M, 0x0,
+                               IAVF_RX_FLEX_DESC_PTYPE_M, 0x0,
+                               IAVF_RX_FLEX_DESC_PTYPE_M, 0x0,
+                               IAVF_RX_FLEX_DESC_PTYPE_M, 0x0);
+
        __m128i ptype_01 = _mm_unpacklo_epi32(descs[0], descs[1]);
        __m128i ptype_23 = _mm_unpacklo_epi32(descs[2], descs[3]);
        __m128i ptype_all = _mm_unpacklo_epi64(ptype_01, ptype_23);
@@ -611,7 +613,7 @@ _recv_raw_pkts_vec(struct iavf_rx_queue *rxq, struct rte_mbuf **rx_pkts,
                _mm_storeu_si128((void *)&rx_pkts[pos]->rx_descriptor_fields1,
                                 pkt_mb1);
                desc_to_ptype_v(descs, &rx_pkts[pos], ptype_tbl);
-               /* C.4 calc avaialbe number of desc */
+               /* C.4 calc available number of desc */
                var = __builtin_popcountll(_mm_cvtsi128_si64(staterr));
                nb_pkts_recd += var;
                if (likely(var != IAVF_VPMD_DESCS_PER_LOOP))
@@ -1118,9 +1120,6 @@ iavf_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
        uint64_t rs = IAVF_TX_DESC_CMD_RS | flags;
        int i;
 
-       /* cross rx_thresh boundary is not allowed */
-       nb_pkts = RTE_MIN(nb_pkts, txq->rs_thresh);
-
        if (txq->nb_free < txq->free_thresh)
                iavf_tx_free_bufs(txq);
 
@@ -1187,6 +1186,7 @@ iavf_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
        while (nb_pkts) {
                uint16_t ret, num;
 
+               /* cross rs_thresh boundary is not allowed */
                num = (uint16_t)RTE_MIN(nb_pkts, txq->rs_thresh);
                ret = iavf_xmit_fixed_burst_vec(tx_queue, &tx_pkts[nb_tx], num);
                nb_tx += ret;