From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f50.google.com (mail-pg0-f50.google.com [74.125.83.50]) by dpdk.org (Postfix) with ESMTP id 538412986 for ; Wed, 9 Aug 2017 06:05:24 +0200 (CEST) Received: by mail-pg0-f50.google.com with SMTP id u185so22982005pgb.1 for ; Tue, 08 Aug 2017 21:05:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=j5LCrzWyDYMzymYJ0UP//oJdsvQ5pBIRSBA3S2Fk/5k=; b=B53OAJxhB+8kX1Q/XEaA4LnU+YzToym4D5AhSrRvKWBiTapsLCX/sw5h2spADRLb5w 2xfOtuR6zrrE126yHGQmrJCKPKxYsOjYYm/5pHynNkx16e83BOhit/QWCjS3w4Fu99PZ P+UmTJ+3wXVwj/zJPusPJkgfyd3y7KUuoc/FzWt8iZY7r4CqHbGDcnE75Y8lIaT/X7UJ 4zVkzzu6qQpMRDILyoywqOHNSdmp1OkTnvIsT4Gz/0dz+a6rLC4rK0aUfR0PcemWlYdi acQUyEnTYMv4xQ3x7/Fp1t6lV81I/p51NlznXKzrZQpVSfOEbmKw06wu0gdqwAjke3MD EfFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=j5LCrzWyDYMzymYJ0UP//oJdsvQ5pBIRSBA3S2Fk/5k=; b=a5hZzBSkl1U4l4NK4Z/hTn0HGMPHIhzS/1L/jev/RN8cMTqHiZsnQvpXxA6BsVR3mD j1mh+F19M7lb/SlzvEss0l6GYA7MNNap0wg1EDgk54kiBmBRiBdELNqVNCe6BA7V7SPT +hu/ASOQ5pMrAKj0+1oSBRClHQZSCcHKJjHLsxHF3oTlBKIKS2budlxyfwsGHBxhAXIN AQz8xiGwZ5v0uJr/0Q9vSEeZk+uW2h6wPT3b0lTM3vDyX3Ng73y1HPikKm/43qA5wIPj oIfWCs2fYFLAVgAHb47/5IVSUqVNwaAKehiYsg6CAkVA8bGK180bGPaUIiSFFxzaPqvB RFqg== X-Gm-Message-State: AHYfb5gWz8Kl4YXlYVAtw3X3nkxz0MuyI/tB/L32vofevEa3YQp4WLJv 5ruM2bBrBa81wdRq X-Received: by 10.99.55.1 with SMTP id e1mr6296966pga.176.1502251523527; Tue, 08 Aug 2017 21:05:23 -0700 (PDT) Received: from yliu-home ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id s14sm4996754pfj.124.2017.08.08.21.05.21 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 08 Aug 2017 21:05:22 -0700 (PDT) Date: Wed, 9 Aug 2017 12:05:17 +0800 From: Yuanhan Liu To: "Li, Xiaoyun" Cc: "Wu, Jingjing" , dpdk stable Message-ID: <20170809040517.GK9612@yliu-home> References: <1502250240-6599-1-git-send-email-yliu@fridaylinux.org> <1502250240-6599-9-git-send-email-yliu@fridaylinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) 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 04:05:24 -0000 On Wed, Aug 09, 2017 at 03:53:36AM +0000, Li, Xiaoyun wrote: > Hi, this patch will cause DPDK PF failing to send messages to kernel VF, and can't get kernel interface in VM. > So I will rework on this issue. Thanks for the note. I will drop it then. --yliu > > -----Original Message----- > From: Yuanhan Liu [mailto:yliu@fridaylinux.org] > Sent: Wednesday, August 9, 2017 11:44 > To: Li, Xiaoyun > Cc: Wu, Jingjing ; dpdk stable ; Yuanhan 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 if 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 state 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 |= I40E_VPGEN_VFRTRIG_VFSWR_MASK; > I40E_WRITE_REG(hw, I40E_VPGEN_VFRTRIG(vf_id), val); > I40E_WRITE_FLUSH(hw); > - } > > #define VFRESET_MAX_WAIT_CNT 100 > - /* Wait until VF reset is done */ > - for (i = 0; i < VFRESET_MAX_WAIT_CNT; i++) { > - rte_delay_us(10); > - val = 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 = 0; i < VFRESET_MAX_WAIT_CNT; i++) { > + rte_delay_us(10); > + val = I40E_READ_REG(hw, I40E_VPGEN_VFRSTAT(vf_id)); > + if (val & I40E_VPGEN_VFRSTAT_VFRD_MASK) > + break; > + } > > - if (i >= VFRESET_MAX_WAIT_CNT) { > - PMD_DRV_LOG(ERR, "VF reset timeout"); > - return -ETIMEDOUT; > + if (i >= VFRESET_MAX_WAIT_CNT) { > + PMD_DRV_LOG(ERR, "VF reset timeout"); > + return -ETIMEDOUT; > + } > + vf->state = 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 = I40E_PF_TO_HW(vf->pf); > uint16_t abs_vf_id = hw->func_caps.vf_base_id + vf->vf_idx; > - int ret; > + int ret = I40E_ERR_ADMIN_QUEUE_ERROR; > + > + if (vf->state == I40E_VF_INACTIVE) > + return ret; > > ret = i40e_aq_send_msg_to_vf(hw, abs_vf_id, opcode, retval, > msg, msglen, NULL); > -- > 2.7.4