net: add rte prefix to ether structures
[dpdk.git] / drivers / net / dpaa / dpaa_rxtx.c
index c4471c2..7f174f7 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  *
  *   Copyright 2016 Freescale Semiconductor, Inc. All rights reserved.
- *   Copyright 2017 NXP
+ *   Copyright 2017,2019 NXP
  *
  */
 
@@ -198,7 +198,8 @@ static inline void dpaa_eth_packet_info(struct rte_mbuf *m, void *fd_virt_addr)
 
 static inline void dpaa_checksum(struct rte_mbuf *mbuf)
 {
-       struct ether_hdr *eth_hdr = rte_pktmbuf_mtod(mbuf, struct ether_hdr *);
+       struct rte_ether_hdr *eth_hdr =
+               rte_pktmbuf_mtod(mbuf, struct rte_ether_hdr *);
        char *l3_hdr = (char *)eth_hdr + mbuf->l2_len;
        struct ipv4_hdr *ipv4_hdr = (struct ipv4_hdr *)l3_hdr;
        struct ipv6_hdr *ipv6_hdr = (struct ipv6_hdr *)l3_hdr;
@@ -598,6 +599,10 @@ uint16_t dpaa_eth_queue_rx(void *q,
        int num_rx_bufs, ret;
        uint32_t vdqcr_flags = 0;
 
+       if (unlikely(rte_dpaa_bpid_info == NULL &&
+                               rte_eal_process_type() == RTE_PROC_SECONDARY))
+               rte_dpaa_bpid_info = fq->bp_array;
+
        if (likely(fq->is_static))
                return dpaa_eth_queue_portal_rx(fq, bufs, nb_bufs);