null: fix crash when added to bonding
authorTomasz Kulasek <tomaszx.kulasek@intel.com>
Fri, 30 Oct 2015 14:25:49 +0000 (15:25 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 1 Nov 2015 17:10:55 +0000 (18:10 +0100)
This patch initializes eth_dev->link_intr_cbs queue used when null pmd is
added to the bonding.

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Tetsuya Mukawa <mukawa@igel.co.jp>
drivers/net/null/rte_eth_null.c

index e244595..c748101 100644 (file)
@@ -432,6 +432,7 @@ eth_dev_null_create(const char *name,
        internals->numa_node = numa_node;
 
        pci_dev->numa_node = numa_node;
+       pci_dev->driver = &rte_null_pmd.pci_drv;
 
        data->dev_private = internals;
        data->port_id = eth_dev->data->port_id;
@@ -445,6 +446,7 @@ eth_dev_null_create(const char *name,
        eth_dev->dev_ops = &ops;
        eth_dev->pci_dev = pci_dev;
        eth_dev->driver = &rte_null_pmd;
+       TAILQ_INIT(&eth_dev->link_intr_cbs);
 
        /* finally assign rx and tx ops */
        if (packet_copy) {