From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id A4389C4C4 for ; Wed, 29 Jul 2015 02:55:08 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 28 Jul 2015 17:55:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,567,1432623600"; d="scan'208";a="771840115" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 28 Jul 2015 17:55:07 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t6T0t4up006891; Wed, 29 Jul 2015 08:55:04 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t6T0t1Us022784; Wed, 29 Jul 2015 08:55:03 +0800 Received: (from wujingji@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t6T0t1Kc022780; Wed, 29 Jul 2015 08:55:01 +0800 From: Jingjing Wu To: dev@dpdk.org Date: Wed, 29 Jul 2015 08:54:57 +0800 Message-Id: <1438131297-22750-1-git-send-email-jingjing.wu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1438074060-13809-1-git-send-email-jingjing.wu@intel.com> References: <1438074060-13809-1-git-send-email-jingjing.wu@intel.com> Subject: [dpdk-dev] [PATCH v3] i40evf: fix crash when setup tx queues on vf port X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jul 2015 00:55:09 -0000 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 --- v2 changes: rework the patch's title and commit log. V3 changes: fix name in Signed-off-by. drivers/net/i40e/i40e_ethdev_vf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index f3470e6..b694400 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), }; /* -- 2.4.0