mbuf: add rte prefix to offload flags
[dpdk.git] / drivers / net / octeontx2 / otx2_rx.c
index ac40704..5a7d220 100644 (file)
@@ -92,7 +92,7 @@ static __rte_always_inline uint64_t
 nix_vlan_update(const uint64_t w2, uint64_t ol_flags, uint8x16_t *f)
 {
        if (w2 & BIT_ULL(21) /* vtag0_gone */) {
-               ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
+               ol_flags |= RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_RX_VLAN_STRIPPED;
                *f = vsetq_lane_u16((uint16_t)(w2 >> 32), *f, 5);
        }
 
@@ -103,7 +103,7 @@ static __rte_always_inline uint64_t
 nix_qinq_update(const uint64_t w2, uint64_t ol_flags, struct rte_mbuf *mbuf)
 {
        if (w2 & BIT_ULL(23) /* vtag1_gone */) {
-               ol_flags |= PKT_RX_QINQ | PKT_RX_QINQ_STRIPPED;
+               ol_flags |= RTE_MBUF_F_RX_QINQ | RTE_MBUF_F_RX_QINQ_STRIPPED;
                mbuf->vlan_tci_outer = (uint16_t)(w2 >> 48);
        }
 
@@ -205,10 +205,10 @@ nix_recv_pkts_vector(void *rx_queue, struct rte_mbuf **rx_pkts,
                        f1 = vsetq_lane_u32(cq1_w0, f1, 3);
                        f2 = vsetq_lane_u32(cq2_w0, f2, 3);
                        f3 = vsetq_lane_u32(cq3_w0, f3, 3);
-                       ol_flags0 = PKT_RX_RSS_HASH;
-                       ol_flags1 = PKT_RX_RSS_HASH;
-                       ol_flags2 = PKT_RX_RSS_HASH;
-                       ol_flags3 = PKT_RX_RSS_HASH;
+                       ol_flags0 = RTE_MBUF_F_RX_RSS_HASH;
+                       ol_flags1 = RTE_MBUF_F_RX_RSS_HASH;
+                       ol_flags2 = RTE_MBUF_F_RX_RSS_HASH;
+                       ol_flags3 = RTE_MBUF_F_RX_RSS_HASH;
                } else {
                        ol_flags0 = 0; ol_flags1 = 0;
                        ol_flags2 = 0; ol_flags3 = 0;
@@ -279,6 +279,12 @@ nix_recv_pkts_vector(void *rx_queue, struct rte_mbuf **rx_pkts,
                vst1q_u64((uint64_t *)mbuf2->rearm_data, rearm2);
                vst1q_u64((uint64_t *)mbuf3->rearm_data, rearm3);
 
+               /* Update that no more segments */
+               mbuf0->next = NULL;
+               mbuf1->next = NULL;
+               mbuf2->next = NULL;
+               mbuf3->next = NULL;
+
                /* Store the mbufs to rx_pkts */
                vst1q_u64((uint64_t *)&rx_pkts[packets], mbuf01);
                vst1q_u64((uint64_t *)&rx_pkts[packets + 2], mbuf23);
@@ -303,7 +309,7 @@ nix_recv_pkts_vector(void *rx_queue, struct rte_mbuf **rx_pkts,
        rxq->head = head;
        rxq->available -= packets;
 
-       rte_cio_wmb();
+       rte_io_wmb();
        /* Free all the CQs that we've processed */
        otx2_write64((rxq->wdata | packets), rxq->cq_door);