*
* Originally based upon librte_pmd_pcap code:
*
- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+ * Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
* Copyright(c) 2014 6WIND S.A.
* All rights reserved.
*
/*
* now put it all together
* - store queue data in internals,
- * - store numa_node info in pci_driver
- * - point eth_dev_data to internals and pci_driver
+ * - store numa_node in eth_dev
+ * - point eth_dev_data to internals
* - and point eth_dev structure to new eth_dev_data structure
*/
(*eth_dev)->data = data;
(*eth_dev)->dev_ops = &ops;
(*eth_dev)->pci_dev = pci_dev;
+ (*eth_dev)->driver = NULL;
+ (*eth_dev)->data->dev_flags = 0;
+ (*eth_dev)->data->drv_name = drivername;
+ (*eth_dev)->data->kdrv = RTE_KDRV_NONE;
+ (*eth_dev)->data->numa_node = numa_node;
return 0;
#define DEFAULT_POLLING_INTERVAL_10_MS (10)
+const char pmd_bond_driver_name[] = "rte_bond_pmd";
+
int
valid_bonded_ethdev(const struct rte_eth_dev *eth_dev)
{
return ++sockets;
}
-const char pmd_bond_driver_name[] = "rte_bond_pmd";
-
static struct rte_pci_id pci_id_table = {
.device_id = PCI_ANY_ID,
.subsystem_device_id = PCI_ANY_ID,
eth_dev->dev_ops = &default_dev_ops;
eth_dev->pci_dev = pci_dev;
+ eth_dev->data->dev_flags = RTE_ETH_DEV_INTR_LSC |
+ RTE_ETH_DEV_DETACHABLE;
+ eth_dev->driver = NULL;
+ eth_dev->data->kdrv = RTE_KDRV_NONE;
+ eth_dev->data->drv_name = pmd_bond_driver_name;
+ eth_dev->data->numa_node = socket_id;
+
rte_spinlock_init(&internals->lock);
internals->port_id = eth_dev->data->port_id;
static struct mpipe_context mpipe_contexts[GXIO_MPIPE_INSTANCE_MAX];
static int mpipe_instances;
+static const char *drivername = "MPIPE PMD";
/* Per queue statistics. */
struct mpipe_queue_stats {
eth_dev->pci_dev = &priv->pci_dev;
eth_dev->data->mac_addrs = &priv->mac_addr;
+ eth_dev->data->dev_flags = 0;
+ eth_dev->data->kdrv = RTE_KDRV_NONE;
+ eth_dev->driver = NULL;
+ eth_dev->data->drv_name = drivername;
+ eth_dev->data->numa_node = instance;
+
eth_dev->dev_ops = &mpipe_dev_ops;
eth_dev->rx_pkt_burst = &mpipe_recv_pkts;
eth_dev->tx_pkt_burst = &mpipe_xmit_pkts;
/* now put it all together
* - store queue data in internals,
- * - store numa_node info in pci_driver
- * - point eth_dev_data to internals and pci_driver
+ * - store numa_node info in ethdev data
+ * - point eth_dev_data to internals
* - and point eth_dev structure to new eth_dev_data structure
*/
/* NOTE: we'll replace the data element, of originally allocated eth_dev
eth_dev->driver = &rte_null_pmd;
TAILQ_INIT(ð_dev->link_intr_cbs);
+ eth_dev->driver = NULL;
+ eth_dev->data->dev_flags = RTE_ETH_DEV_DETACHABLE;
+ eth_dev->data->kdrv = RTE_KDRV_NONE;
+ eth_dev->data->drv_name = drivername;
+ eth_dev->data->numa_node = numa_node;
+
/* finally assign rx and tx ops */
if (packet_copy) {
eth_dev->rx_pkt_burst = eth_null_copy_rx;
/*-
* BSD LICENSE
*
- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+ * Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
* Copyright(c) 2014 6WIND S.A.
* All rights reserved.
*
/* now put it all together
* - store queue data in internals,
- * - store numa_node info in pci_driver
- * - point eth_dev_data to internals and pci_driver
+ * - store numa_node info in eth_dev
+ * - point eth_dev_data to internals
* - and point eth_dev structure to new eth_dev_data structure
*/
/* NOTE: we'll replace the data element, of originally allocated eth_dev
(*eth_dev)->dev_ops = &ops;
(*eth_dev)->pci_dev = pci_dev;
(*eth_dev)->driver = &rte_pcap_pmd;
+ (*eth_dev)->data->dev_flags = RTE_ETH_DEV_DETACHABLE;
+ (*eth_dev)->driver = NULL;
+ (*eth_dev)->data->kdrv = RTE_KDRV_NONE;
+ (*eth_dev)->data->drv_name = drivername;
+ (*eth_dev)->data->numa_node = numa_node;
return 0;
goto error;
}
-
/* now put it all together
* - store queue data in internals,
- * - store numa_node info in pci_driver
- * - point eth_dev_data to internals and pci_driver
+ * - store numa_node info in eth_dev_data
+ * - point eth_dev_data to internals
* - and point eth_dev structure to new eth_dev_data structure
*/
/* NOTE: we'll replace the data element, of originally allocated eth_dev
eth_dev->data = data;
eth_dev->driver = &rte_ring_pmd;
eth_dev->dev_ops = &ops;
- eth_dev->pci_dev = pci_dev;
+ eth_dev->data->dev_flags = RTE_ETH_DEV_DETACHABLE;
+ eth_dev->data->kdrv = RTE_KDRV_NONE;
+ eth_dev->data->drv_name = drivername;
+ eth_dev->data->numa_node = numa_node;
+
TAILQ_INIT(&(eth_dev->link_intr_cbs));
/* finally assign rx and tx ops */
/* virtio_idx is increased after new device is created.*/
static int virtio_idx = 0;
-static const char *drivername = "xen dummy virtio PMD";
+static const char *drivername = "xen virtio PMD";
static struct rte_eth_link pmd_link = {
.link_speed = 10000,
eth_dev->data = data;
eth_dev->dev_ops = &ops;
+
eth_dev->data->dev_flags = RTE_PCI_DRV_DETACHABLE;
eth_dev->pci_dev = pci_dev;
+ eth_dev->data->kdrv = RTE_KDRV_NONE;
+ eth_dev->data->drv_name = drivername;
+ eth_dev->driver = NULL;
+ eth_dev->data->numa_node = numa_node;
eth_dev->rx_pkt_burst = eth_xenvirt_rx;
eth_dev->tx_pkt_burst = eth_xenvirt_tx;
/*-
* BSD LICENSE
*
- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+ * Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
RTE_KDRV_VFIO,
RTE_KDRV_UIO_GENERIC,
RTE_KDRV_NIC_UIO,
+ RTE_KDRV_NONE,
};
/**