[dpdk-dev,v7,20/28] bonding: copy device info to eth_dev data
Commit Message
initialise dev_flags, kdrv, driver, drv_name and numa_node fields in eth_dev data.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
---
drivers/net/bonding/rte_eth_bond_api.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
@@ -44,6 +44,8 @@
#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)
{
@@ -250,7 +252,12 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
eth_dev->data->all_multicast = 0;
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 | RTE_ETH_DEV_BONDED;
+ 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);