From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 54ACF388F for ; Wed, 9 Aug 2017 05:53:42 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Aug 2017 20:53:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,346,1498546800"; d="scan'208";a="888055691" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 08 Aug 2017 20:53:40 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 8 Aug 2017 20:53:40 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 8 Aug 2017 20:53:39 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.128]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.236]) with mapi id 14.03.0319.002; Wed, 9 Aug 2017 11:53:37 +0800 From: "Li, Xiaoyun" To: Yuanhan Liu CC: "Wu, Jingjing" , dpdk stable Thread-Topic: patch 'net/i40e: fix PF notify when VF is not up' has been queued to LTS release 16.11.3 Thread-Index: AQHTEMIzuCroxNMU1UeYDUFRR5rjuKJ7Y82w Date: Wed, 9 Aug 2017 03:53:36 +0000 Message-ID: References: <1502250240-6599-1-git-send-email-yliu@fridaylinux.org> <1502250240-6599-9-git-send-email-yliu@fridaylinux.org> In-Reply-To: <1502250240-6599-9-git-send-email-yliu@fridaylinux.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDljY2JiMmEtM2U5OS00YzFmLWEzMjctZmZjYjc0OGYyODE2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InA1TlZSYXd4VWhlWVFMVXFadkJOaDFZRXA4WVlWemtaNzlMMVBXNWFBT0E9In0= 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-stable] patch 'net/i40e: fix PF notify when VF is not up' has been queued to LTS release 16.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Aug 2017 03:53:42 -0000 Hi, this patch will cause DPDK PF failing to send messages to kernel VF, an= d can't get kernel interface in VM. So I will rework on this issue. -----Original Message----- From: Yuanhan Liu [mailto:yliu@fridaylinux.org]=20 Sent: Wednesday, August 9, 2017 11:44 To: Li, Xiaoyun Cc: Wu, Jingjing ; dpdk stable ; Yu= anhan Liu Subject: patch 'net/i40e: fix PF notify when VF is not up' has been queued = to LTS release 16.11.3 Hi, FYI, your patch has been queued to LTS release 16.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/11/17. So please shout i= f anyone has objections. Thanks. --yliu --- >>From a01cf403496049b6991eedc7084279b3bd43b431 Mon Sep 17 00:00:00 2001 From: Xiaoyun Li Date: Fri, 28 Jul 2017 23:48:11 +0800 Subject: [PATCH] net/i40e: fix PF notify when VF is not up [ upstream commit 035a8cf88f010c82de3040c895c801ce0849b065 ] This patch stops PF from sending messages to inactive VF and modifies VF st= ate to active when VF reset is completed. Fixes: 4861cde46116 ("i40e: new poll mode driver") Signed-off-by: Xiaoyun Li Acked-by: Jingjing Wu --- drivers/net/i40e/i40e_pf.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c index = b36d901..978b82b 100644 --- a/drivers/net/i40e/i40e_pf.c +++ b/drivers/net/i40e/i40e_pf.c @@ -151,22 +151,22 @@ i40e_pf_host_vf_reset(struct i40e_pf_vf *vf, bool do_= hw_reset) val |=3D I40E_VPGEN_VFRTRIG_VFSWR_MASK; I40E_WRITE_REG(hw, I40E_VPGEN_VFRTRIG(vf_id), val); I40E_WRITE_FLUSH(hw); - } =20 #define VFRESET_MAX_WAIT_CNT 100 - /* Wait until VF reset is done */ - for (i =3D 0; i < VFRESET_MAX_WAIT_CNT; i++) { - rte_delay_us(10); - val =3D I40E_READ_REG(hw, I40E_VPGEN_VFRSTAT(vf_id)); - if (val & I40E_VPGEN_VFRSTAT_VFRD_MASK) - break; - } + /* Wait until VF reset is done */ + for (i =3D 0; i < VFRESET_MAX_WAIT_CNT; i++) { + rte_delay_us(10); + val =3D I40E_READ_REG(hw, I40E_VPGEN_VFRSTAT(vf_id)); + if (val & I40E_VPGEN_VFRSTAT_VFRD_MASK) + break; + } =20 - if (i >=3D VFRESET_MAX_WAIT_CNT) { - PMD_DRV_LOG(ERR, "VF reset timeout"); - return -ETIMEDOUT; + if (i >=3D VFRESET_MAX_WAIT_CNT) { + PMD_DRV_LOG(ERR, "VF reset timeout"); + return -ETIMEDOUT; + } + vf->state =3D I40E_VF_ACTIVE; } - /* This is not first time to do reset, do cleanup job first */ if (vf->vsi) { /* Disable queues */ @@ -261,7 +261,10 @@ i40e_pf_host_send_msg_to_vf(struct i40e_pf_vf *vf, { struct i40e_hw *hw =3D I40E_PF_TO_HW(vf->pf); uint16_t abs_vf_id =3D hw->func_caps.vf_base_id + vf->vf_idx; - int ret; + int ret =3D I40E_ERR_ADMIN_QUEUE_ERROR; + + if (vf->state =3D=3D I40E_VF_INACTIVE) + return ret; =20 ret =3D i40e_aq_send_msg_to_vf(hw, abs_vf_id, opcode, retval, msg, msglen, NULL); -- 2.7.4