X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fszedata2%2Frte_eth_szedata2.c;h=d5dec1b75560293a7daee9fbd00185aeb9e09583;hb=092b38341859c1640871b864817d5e2e4c845edb;hp=d105e50f3737fe48f12feb8d7b8513cef41c6970;hpb=896c87e8feda5ca1dc94b2c9e54b3d86c7112a22;p=dpdk.git diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c index d105e50f37..d5dec1b755 100644 --- a/drivers/net/szedata2/rte_eth_szedata2.c +++ b/drivers/net/szedata2/rte_eth_szedata2.c @@ -105,7 +105,7 @@ struct szedata2_tx_queue { int szedata2_logtype_init; int szedata2_logtype_driver; -static struct ether_addr eth_addr = { +static struct rte_ether_addr eth_addr = { .addr_bytes = { 0x00, 0x11, 0x17, 0x00, 0x00, 0x00 } }; @@ -1093,7 +1093,6 @@ eth_stats_get(struct rte_eth_dev *dev, if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) { stats->q_opackets[i] = txq->tx_pkts; stats->q_obytes[i] = txq->tx_bytes; - stats->q_errors[i] = txq->err_pkts; } tx_total += txq->tx_pkts; tx_total_bytes += txq->tx_bytes; @@ -1332,7 +1331,7 @@ eth_tx_queue_setup(struct rte_eth_dev *dev, static int eth_mac_addr_set(struct rte_eth_dev *dev __rte_unused, - struct ether_addr *mac_addr __rte_unused) + struct rte_ether_addr *mac_addr __rte_unused) { return 0; } @@ -1474,7 +1473,7 @@ rte_szedata2_eth_dev_init(struct rte_eth_dev *dev, struct port_info *pi) PMD_INIT_FUNC_TRACE(); PMD_INIT_LOG(INFO, "Initializing eth_dev %s (driver %s)", data->name, - dev->device->driver->name); + RTE_STR(RTE_SZEDATA2_DRIVER_NAME)); /* Fill internal private structure. */ internals->dev = dev; @@ -1514,7 +1513,7 @@ rte_szedata2_eth_dev_init(struct rte_eth_dev *dev, struct port_info *pi) eth_link_update(dev, 0); /* Allocate space for one mac address */ - data->mac_addrs = rte_zmalloc(data->name, sizeof(struct ether_addr), + data->mac_addrs = rte_zmalloc(data->name, sizeof(struct rte_ether_addr), RTE_CACHE_LINE_SIZE); if (data->mac_addrs == NULL) { PMD_INIT_LOG(ERR, "Could not alloc space for MAC address!"); @@ -1522,10 +1521,10 @@ rte_szedata2_eth_dev_init(struct rte_eth_dev *dev, struct port_info *pi) return -ENOMEM; } - ether_addr_copy(ð_addr, data->mac_addrs); + rte_ether_addr_copy(ð_addr, data->mac_addrs); PMD_INIT_LOG(INFO, "%s device %s successfully initialized", - dev->device->driver->name, data->name); + RTE_STR(RTE_SZEDATA2_DRIVER_NAME), data->name); return 0; } @@ -1544,10 +1543,9 @@ rte_szedata2_eth_dev_uninit(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); free(internals->sze_dev_path); - rte_free(dev->data->mac_addrs); PMD_DRV_LOG(INFO, "%s device %s successfully uninitialized", - dev->device->driver->name, dev->data->name); + RTE_STR(RTE_SZEDATA2_DRIVER_NAME), dev->data->name); return 0; } @@ -1569,6 +1567,14 @@ static const struct rte_pci_id rte_szedata2_pci_id_table[] = { RTE_PCI_DEVICE(PCI_VENDOR_ID_NETCOPE, PCI_DEVICE_ID_NETCOPE_NFB200G2QL) }, + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_SILICOM, + PCI_DEVICE_ID_FB2CGG3) + }, + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_SILICOM, + PCI_DEVICE_ID_FB2CGG3D) + }, { .vendor_id = 0, } @@ -1841,6 +1847,8 @@ static int szedata2_eth_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, rte_free(list_entry); return ret; } + + rte_eth_dev_probing_finish(eth_devs[i]); } /* @@ -1920,9 +1928,7 @@ RTE_PMD_REGISTER_PCI_TABLE(RTE_SZEDATA2_DRIVER_NAME, rte_szedata2_pci_id_table); RTE_PMD_REGISTER_KMOD_DEP(RTE_SZEDATA2_DRIVER_NAME, "* combo6core & combov3 & szedata2 & ( szedata2_cv3 | szedata2_cv3_fdt )"); -RTE_INIT(szedata2_init_log); -static void -szedata2_init_log(void) +RTE_INIT(szedata2_init_log) { szedata2_logtype_init = rte_log_register("pmd.net.szedata2.init"); if (szedata2_logtype_init >= 0)