From: Jingjing Wu Date: Wed, 29 Jul 2015 00:54:57 +0000 (+0800) Subject: i40evf: fix crash when setup Tx queues X-Git-Tag: spdx-start~8602 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8d2686c0e47d155c9ddaa7b8ca84214fca0cd65c;p=dpdk.git i40evf: fix crash when setup Tx queues This patch fixes the issue: Testpmd crashed with Segmentation fault when setup tx queues on vf Steps for reproduce: - create one vf device from i40e driver - bind vf device to igb_uio and start testpmd With debugging tools, we saw the struct i40e_vf is cleared after memcpy(&dev->data->dev_conf, dev_conf, sizeof(dev->data->dev_conf)) in rte_eth_dev_configure, which should not happen, and the pointer to i40e_vf isn't in the range of i40e_adapter. The root cause is the dev_private_size in i40e virtual function driver struct rte_i40evf_pmd was set incorrectly. Signed-off-by: Jingjing Wu Tested-by: Marvin Liu --- diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index f3470e6c4e..b694400e79 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -1248,7 +1248,7 @@ static struct eth_driver rte_i40evf_pmd = { }, .eth_dev_init = i40evf_dev_init, .eth_dev_uninit = i40evf_dev_uninit, - .dev_private_size = sizeof(struct i40e_vf), + .dev_private_size = sizeof(struct i40e_adapter), }; /*