net: add rte prefix to ether structures
[dpdk.git] / drivers / net / avp / avp_ethdev.c
index 9cc8fbc..69a70d2 100644 (file)
@@ -159,7 +159,7 @@ static const struct eth_dev_ops avp_eth_dev_ops = {
 struct avp_dev {
        uint32_t magic; /**< Memory validation marker */
        uint64_t device_id; /**< Unique system identifier */
-       struct ether_addr ethaddr; /**< Host specified MAC address */
+       struct rte_ether_addr ethaddr; /**< Host specified MAC address */
        struct rte_eth_dev_data *dev_data;
        /**< Back pointer to ethernet device data */
        volatile uint32_t flags; /**< Device operational flags */
@@ -383,7 +383,7 @@ avp_dev_translate_address(struct rte_eth_dev *eth_dev,
                        (host_phys_addr < (map->phys_addr + map->length))) {
                        /* address is within this segment */
                        offset += (host_phys_addr - map->phys_addr);
-                       addr = RTE_PTR_ADD(addr, offset);
+                       addr = RTE_PTR_ADD(addr, (uintptr_t)offset);
 
                        PMD_DRV_LOG(DEBUG, "Translating host physical 0x%" PRIx64 " to guest virtual 0x%p\n",
                                    host_phys_addr, addr);
@@ -1036,11 +1036,6 @@ eth_avp_dev_uninit(struct rte_eth_dev *eth_dev)
                return ret;
        }
 
-       if (eth_dev->data->mac_addrs != NULL) {
-               rte_free(eth_dev->data->mac_addrs);
-               eth_dev->data->mac_addrs = NULL;
-       }
-
        return 0;
 }
 
@@ -1204,7 +1199,7 @@ avp_dev_tx_queue_setup(struct rte_eth_dev *eth_dev,
 }
 
 static inline int
-_avp_cmp_ether_addr(struct ether_addr *a, struct ether_addr *b)
+_avp_cmp_ether_addr(struct rte_ether_addr *a, struct rte_ether_addr *b)
 {
        uint16_t *_a = (uint16_t *)&a->addr_bytes[0];
        uint16_t *_b = (uint16_t *)&b->addr_bytes[0];
@@ -1214,7 +1209,7 @@ _avp_cmp_ether_addr(struct ether_addr *a, struct ether_addr *b)
 static inline int
 _avp_mac_filter(struct avp_dev *avp, struct rte_mbuf *m)
 {
-       struct ether_hdr *eth = rte_pktmbuf_mtod(m, struct ether_hdr *);
+       struct rte_ether_hdr *eth = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
 
        if (likely(_avp_cmp_ether_addr(&avp->ethaddr, &eth->d_addr) == 0)) {
                /* allow all packets destined to our address */
@@ -2170,7 +2165,6 @@ avp_dev_info_get(struct rte_eth_dev *eth_dev,
                dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP;
                dev_info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT;
        }
-       dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_CRC_STRIP;
 }
 
 static int
@@ -2271,9 +2265,7 @@ avp_dev_stats_reset(struct rte_eth_dev *eth_dev)
 RTE_PMD_REGISTER_PCI(net_avp, rte_avp_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_avp, pci_id_avp_map);
 
-RTE_INIT(avp_init_log);
-static void
-avp_init_log(void)
+RTE_INIT(avp_init_log)
 {
        avp_logtype_driver = rte_log_register("pmd.net.avp.driver");
        if (avp_logtype_driver >= 0)