From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id B02432B92 for ; Mon, 25 Jul 2016 07:36:18 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 24 Jul 2016 22:36:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,417,1464678000"; d="scan'208";a="1013146770" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 24 Jul 2016 22:36:17 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id u6P5aE8J030019; Mon, 25 Jul 2016 13:36:14 +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 u6P5aBXH032240; Mon, 25 Jul 2016 13:36:13 +0800 Received: (from wujingji@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u6P5aBhd032236; Mon, 25 Jul 2016 13:36:11 +0800 From: Jingjing Wu To: helin.zhang@intel.com Cc: dev@dpdk.org, jingjing.wu@intel.com, beilei.xing@intel.com, yuan.peng@intel.com Date: Mon, 25 Jul 2016 13:36:09 +0800 Message-Id: <1469424969-32205-1-git-send-email-jingjing.wu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1469416948-13073-1-git-send-email-jingjing.wu@intel.com> References: <1469416948-13073-1-git-send-email-jingjing.wu@intel.com> Subject: [dpdk-dev] [PATCH v2] net/i40e: fix vsi removing from tailq when release 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: Mon, 25 Jul 2016 05:36:19 -0000 VSI structure need to be removed from TAILQ list when releasing. But for the child VSI it will be removed again after the structure is freed. It will cause core dump when the DPDK i40e using as PF host driver. This patch fixes it to only remove child VSI from TAILQ before send adminq command to remove it from hardware. Fixes: 4861cde46116 ("i40e: new poll mode driver") Fixes: 440499cf5376 ("net/i40e: support floating VEB") Signed-off-by: Jingjing Wu --- v2 change: - add fix for floating veb case drivers/net/i40e/i40e_ethdev.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 11a5804..d0aeb70 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -4110,7 +4110,6 @@ i40e_vsi_release(struct i40e_vsi *vsi) TAILQ_FOREACH_SAFE(vsi_list, &vsi->veb->head, list, temp) { if (i40e_vsi_release(vsi_list->vsi) != I40E_SUCCESS) return -1; - TAILQ_REMOVE(&vsi->veb->head, vsi_list, list); } i40e_veb_release(vsi->veb); } @@ -4119,7 +4118,6 @@ i40e_vsi_release(struct i40e_vsi *vsi) TAILQ_FOREACH_SAFE(vsi_list, &vsi->floating_veb->head, list, temp) { if (i40e_vsi_release(vsi_list->vsi) != I40E_SUCCESS) return -1; - TAILQ_REMOVE(&vsi->floating_veb->head, vsi_list, list); } } -- 2.4.0