net/txgbe: add queue stats mapping
[dpdk.git] / drivers / net / dpaa / dpaa_rxtx.c
index 6eadbfa..e2459d9 100644 (file)
@@ -125,6 +125,9 @@ static inline void dpaa_eth_packet_info(struct rte_mbuf *m, void *fd_virt_addr)
 
        DPAA_DP_LOG(DEBUG, " Parsing mbuf: %p with annotations: %p", m, annot);
 
+       m->ol_flags = PKT_RX_RSS_HASH | PKT_RX_IP_CKSUM_GOOD |
+               PKT_RX_L4_CKSUM_GOOD;
+
        switch (prs) {
        case DPAA_PKT_TYPE_IPV4:
                m->packet_type = RTE_PTYPE_L2_ETHER |
@@ -199,6 +202,16 @@ static inline void dpaa_eth_packet_info(struct rte_mbuf *m, void *fd_virt_addr)
                m->packet_type = RTE_PTYPE_L2_ETHER |
                        RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_SCTP;
                break;
+       case DPAA_PKT_TYPE_IPV4_CSUM_ERR:
+       case DPAA_PKT_TYPE_IPV6_CSUM_ERR:
+               m->ol_flags = PKT_RX_RSS_HASH | PKT_RX_IP_CKSUM_BAD;
+               break;
+       case DPAA_PKT_TYPE_IPV4_TCP_CSUM_ERR:
+       case DPAA_PKT_TYPE_IPV6_TCP_CSUM_ERR:
+       case DPAA_PKT_TYPE_IPV4_UDP_CSUM_ERR:
+       case DPAA_PKT_TYPE_IPV6_UDP_CSUM_ERR:
+               m->ol_flags = PKT_RX_RSS_HASH | PKT_RX_L4_CKSUM_BAD;
+               break;
        case DPAA_PKT_TYPE_NONE:
                m->packet_type = 0;
                break;
@@ -213,10 +226,6 @@ static inline void dpaa_eth_packet_info(struct rte_mbuf *m, void *fd_virt_addr)
 
        /* Set the hash values */
        m->hash.rss = (uint32_t)(annot->hash);
-       /* All packets with Bad checksum are dropped by interface (and
-        * corresponding notification issued to RX error queues).
-        */
-       m->ol_flags = PKT_RX_RSS_HASH | PKT_RX_IP_CKSUM_GOOD;
 
        /* Check if Vlan is present */
        if (prs & DPAA_PARSE_VLAN_MASK)
@@ -640,7 +649,7 @@ dpaa_rx_cb_parallel(void *event,
        ev->queue_id = fq->ev.queue_id;
        ev->priority = fq->ev.priority;
        ev->impl_opaque = (uint8_t)DPAA_INVALID_MBUF_SEQN;
-       mbuf->seqn = DPAA_INVALID_MBUF_SEQN;
+       *dpaa_seqn(mbuf) = DPAA_INVALID_MBUF_SEQN;
        *bufs = mbuf;
 
        return qman_cb_dqrr_consume;
@@ -674,7 +683,7 @@ dpaa_rx_cb_atomic(void *event,
        DPAA_PER_LCORE_DQRR_HELD |= 1 << index;
        DPAA_PER_LCORE_DQRR_MBUF(index) = mbuf;
        ev->impl_opaque = index + 1;
-       mbuf->seqn = (uint32_t)index + 1;
+       *dpaa_seqn(mbuf) = (uint32_t)index + 1;
        *bufs = mbuf;
 
        return qman_cb_dqrr_defer;
@@ -1069,7 +1078,7 @@ dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
                        if (dpaa_svr_family == SVR_LS1043A_FAMILY &&
                                        (mbuf->data_off & 0x7F) != 0x0)
                                realloc_mbuf = 1;
-                       seqn = mbuf->seqn;
+                       seqn = *dpaa_seqn(mbuf);
                        if (seqn != DPAA_INVALID_MBUF_SEQN) {
                                index = seqn - 1;
                                if (DPAA_PER_LCORE_DQRR_HELD & (1 << index)) {