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 210515682 for ; Tue, 26 Jul 2016 04:27:56 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 25 Jul 2016 19:27:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,422,1464678000"; d="scan'208";a="853406291" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga003.jf.intel.com with ESMTP; 25 Jul 2016 19:27:56 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 25 Jul 2016 19:27:55 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 25 Jul 2016 19:27:54 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.181]) with mapi id 14.03.0248.002; Tue, 26 Jul 2016 10:27:53 +0800 From: "Peng, Yuan" To: "Wu, Jingjing" , "Zhang, Helin" CC: "dev@dpdk.org" , "Xing, Beilei" Thread-Topic: [PATCH v2] net/i40e: fix vsi removing from tailq when release Thread-Index: AQHR5jamKtT8IfYaWEypxPRWIGLp5aAp+kbw Date: Tue, 26 Jul 2016 02:27:52 +0000 Message-ID: <67D543A150B29E4CAAE53918F64EDAEAAB4ACD@shsmsx102.ccr.corp.intel.com> References: <1469416948-13073-1-git-send-email-jingjing.wu@intel.com> <1469424969-32205-1-git-send-email-jingjing.wu@intel.com> In-Reply-To: <1469424969-32205-1-git-send-email-jingjing.wu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2ZkYzA0YmUtNTYzMC00NDlkLTg4OWEtMzhkMjIyMDU0MDc3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImhYT3hXVGhwOXFERldGdDdpcU1UNFNReklzYWNVNjAxV2tRMzRJZUJiSGc9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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: Tue, 26 Jul 2016 02:27:57 -0000 Tested-by: Peng Yuan - Test Commit: 6baf0eca5cfa068621ee15605159523918109661 - OS/Kernel: 4.5.7-202.fc23.x86_64 - GCC: gcc version 5.3.1 20160406 (Red Hat 5.3.1-6) (GCC) 1. Bind 1 pf to igb_uio 2. use the pf to generate 2 VFs 3. rmmod i40evf 4. launch testpmd with PF with or without floating veb parameter, quit the = testpmd for several times, and never see the core dump So it can fix the "c= ore dump" issue. Thank you. Yuan. -----Original Message----- From: Wu, Jingjing=20 Sent: Monday, July 25, 2016 1:36 PM To: Zhang, Helin Cc: dev@dpdk.org; Wu, Jingjing ; Xing, Beilei ; Peng, Yuan Subject: [PATCH v2] net/i40e: fix vsi removing from tailq when release 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) !=3D 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) !=3D I40E_SUCCESS) return -1; - TAILQ_REMOVE(&vsi->floating_veb->head, vsi_list, list); } } =20 -- 2.4.0