net: add rte prefix to IP defines
[dpdk.git] / drivers / net / ena / ena_ethdev.c
index a55b4a7..47a263a 100644 (file)
@@ -1808,14 +1808,15 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
                ENA_ADMIN_FEATURE_OFFLOAD_DESC_TSO_IPV4_MASK) != 0;
        adapter->offloads.tx_csum_supported = (get_feat_ctx.offload.tx &
                ENA_ADMIN_FEATURE_OFFLOAD_DESC_TX_L4_IPV4_CSUM_PART_MASK) != 0;
-       adapter->offloads.tx_csum_supported =
+       adapter->offloads.rx_csum_supported =
                (get_feat_ctx.offload.rx_supported &
                ENA_ADMIN_FEATURE_OFFLOAD_DESC_RX_L4_IPV4_CSUM_MASK) != 0;
 
        /* Copy MAC address and point DPDK to it */
-       eth_dev->data->mac_addrs = (struct ether_addr *)adapter->mac_addr;
-       ether_addr_copy((struct ether_addr *)get_feat_ctx.dev_attr.mac_addr,
-                       (struct ether_addr *)adapter->mac_addr);
+       eth_dev->data->mac_addrs = (struct rte_ether_addr *)adapter->mac_addr;
+       rte_ether_addr_copy((struct rte_ether_addr *)
+                       get_feat_ctx.dev_attr.mac_addr,
+                       (struct rte_ether_addr *)adapter->mac_addr);
 
        /*
         * Pass the information to the rte_eth_dev_close() that it should also
@@ -2136,7 +2137,7 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
        uint32_t i;
        struct rte_mbuf *m;
        struct ena_ring *tx_ring = (struct ena_ring *)(tx_queue);
-       struct ipv4_hdr *ip_hdr;
+       struct rte_ipv4_hdr *ip_hdr;
        uint64_t ol_flags;
        uint16_t frag_field;
 
@@ -2151,13 +2152,13 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
                 * length of the ethernet header.
                 */
                if (unlikely(m->l2_len == 0))
-                       m->l2_len = sizeof(struct ether_hdr);
+                       m->l2_len = sizeof(struct rte_ether_hdr);
 
-               ip_hdr = rte_pktmbuf_mtod_offset(m, struct ipv4_hdr *,
+               ip_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv4_hdr *,
                                                 m->l2_len);
                frag_field = rte_be_to_cpu_16(ip_hdr->fragment_offset);
 
-               if ((frag_field & IPV4_HDR_DF_FLAG) != 0) {
+               if ((frag_field & RTE_IPV4_HDR_DF_FLAG) != 0) {
                        m->packet_type |= RTE_PTYPE_L4_NONFRAG;
 
                        /* If IPv4 header has DF flag enabled and TSO support is