[dpdk-dev] [PATCHv4 2/9] null: fix segfault when null_pmd added to bonding

Kulasek, TomaszX tomaszx.kulasek at intel.com
Tue Sep 29 17:10:47 CEST 2015


Hi Tetsuya,

Changes from patch below, solves the problem. I've removed malloc.

Tomasz.

---
>From e03e77a7dc0e47ac9d750545a834624f88f61966 Mon Sep 17 00:00:00 2001
From: Tomasz Kulasek <tomaszx.kulasek at intel.com>
Date: Tue, 29 Sep 2015 16:48:31 +0200
Subject: [PATCH 1/4] null: fix segfault when null_pmd added to bonding

---
 drivers/net/null/rte_eth_null.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index e244595..b498ef1 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -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) {
@@ -461,6 +463,7 @@ error:
 	rte_free(data);
 	rte_free(pci_dev);
 	rte_free(internals);
+	rte_free(eth_dev);
 
 	return -1;
 }
--


More information about the dev mailing list