[dpdk-dev] net/kni: fix crash

Message ID 20170418140025.32337-1-ferruh.yigit@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ferruh Yigit April 18, 2017, 2 p.m. UTC
  eth_dev->device is now NULL, and accessing eth_dev->device->driver
crashes.
No need to set this value, removed completely.

Fixes: 5d2aa461cbca ("vdev: use generic vdev struct for probe and remove")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/kni/rte_eth_kni.c | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Ferruh Yigit April 18, 2017, 4:36 p.m. UTC | #1
On 4/18/2017 3:00 PM, Ferruh Yigit wrote:
> eth_dev->device is now NULL, and accessing eth_dev->device->driver
> crashes.
> No need to set this value, removed completely.
> 
> Fixes: 5d2aa461cbca ("vdev: use generic vdev struct for probe and remove")
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index a0b18cd..0e0e4ad 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -393,7 +393,6 @@  eth_kni_create(const char *name, struct eth_kni_args *args,
 
 	eth_dev->data = data;
 	eth_dev->dev_ops = &eth_kni_ops;
-	eth_dev->device->driver = NULL;
 
 	data->dev_flags = RTE_ETH_DEV_DETACHABLE;
 	data->kdrv = RTE_KDRV_NONE;