From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f49.google.com (mail-pg0-f49.google.com [74.125.83.49]) by dpdk.org (Postfix) with ESMTP id 520809978 for ; Mon, 21 Aug 2017 11:38:31 +0200 (CEST) Received: by mail-pg0-f49.google.com with SMTP id m133so14761982pga.5 for ; Mon, 21 Aug 2017 02:38:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dJmg+5FWaVE3+23cS6xvVk2ZBqaUi+xYn0kfiAnNJlg=; b=tlVZfgPFystNdP4u3EbSW/PiZpueTAAPjfJZQ9pLnXLxcQdSYvbjs1WGIeOKiy/O2y gCAaKhk3wllhJqu1qYskxsSMka0wBd22CmNxyfWO6FFSeARXkghfuUFeXp+b+UyXqIoq /Yn7zX1NXhovTaNtW4Pjw4niFbDGUrlKb8rhEGmnxC8kG4ofs7k/jnF0KmmMP5Own6BA k7o+S3YlSs6VmZB3Ewjqrqde1JWQ2SyqCjCxIFjooB5iaIz7eS1eqyj9Hsz9bXh/qioL xx+/D7C6L1aqOM4HXlKnr9A0G2XXkA+4qvhubr0kuC1XhJpKMy5quWJ8eFmuAehC9Sr8 XbVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dJmg+5FWaVE3+23cS6xvVk2ZBqaUi+xYn0kfiAnNJlg=; b=MSUeuViOpDj4Ph62Q0gDAmhRiRcdIeaugxw/T9lFZ9CtlhRFNwktNndpqZwR8PU5Pm YJbmxMccNgzoGmaO+ZeGb700ZdKTGxb6i2zDtjzPPI4fQn8l+w6CTiPbE47NDh5/EWwx BbFb7PvIoegH8nVqy8yD26KaxN2iI4F63+iVqhppPtP0G7DD96N02zWEL97/5x1SOTHN gWWXBda0owloDWF26bN138Lkvq/Fjo4+Q8AWkTegAm8S18tG0TZLagPvx5PIUfjJj/fs K3fkgr4GvEbjebWwY7MzTWpfM6kfxyFrJlQ7Uqn7uLqu29MNM2P35odcI9QPqwJOQlHG ArcA== X-Gm-Message-State: AHYfb5gbRWnYOM5hAivcT353LBzn3oqVITUyQ+MStoh81wGnr9H3UfNz sHfaCQZG2PtvCADl X-Received: by 10.84.218.129 with SMTP id r1mr3945156pli.111.1503308310670; Mon, 21 Aug 2017 02:38:30 -0700 (PDT) Received: from localhost.localdomain ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id 69sm23355087pfh.186.2017.08.21.02.38.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 Aug 2017 02:38:29 -0700 (PDT) From: Yuanhan Liu To: Xiaoyun Li Cc: Beilei Xing , dpdk stable , Yuanhan Liu Date: Mon, 21 Aug 2017 17:31:16 +0800 Message-Id: <1503307878-16728-62-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503307878-16728-1-git-send-email-yliu@fridaylinux.org> References: <1503307878-16728-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/i40e: revert fix of PF notify when VF not up' has been queued to stable release 17.05.2 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: Mon, 21 Aug 2017 09:38:31 -0000 Hi, FYI, your patch has been queued to stable release 17.05.2 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/24/17. So please shout if anyone has objections. Thanks. --yliu --- >>From 59ec4917824f6f923c220d602b057a23bf139a45 Mon Sep 17 00:00:00 2001 From: Xiaoyun Li Date: Fri, 4 Aug 2017 23:50:06 +0800 Subject: [PATCH] net/i40e: revert fix of PF notify when VF not up [ upstream commit f0adeebde0eff52674f28c4dd240030381c391e9 ] This reverts commit 035a8cf88f010c82de3040c895c801ce0849b065. Don't send messages to inactive VF will cause DPDK PF failing to send messages to kernel VF. With this revert, this issue will be solved. Fixes: 035a8cf88f01 ("net/i40e: fix PF notify when VF is not up") Signed-off-by: Xiaoyun Li Acked-by: Beilei Xing --- drivers/net/i40e/i40e_pf.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c index 65d93a8..2011461 100644 --- a/drivers/net/i40e/i40e_pf.c +++ b/drivers/net/i40e/i40e_pf.c @@ -152,21 +152,20 @@ 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; - } - vf->state = I40E_VF_ACTIVE; + if (i >= VFRESET_MAX_WAIT_CNT) { + PMD_DRV_LOG(ERR, "VF reset timeout"); + return -ETIMEDOUT; } /* This is not first time to do reset, do cleanup job first */ if (vf->vsi) { @@ -262,10 +261,7 @@ 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 = I40E_ERR_ADMIN_QUEUE_ERROR; - - if (vf->state == I40E_VF_INACTIVE) - return ret; + int ret; ret = i40e_aq_send_msg_to_vf(hw, abs_vf_id, opcode, retval, msg, msglen, NULL); -- 2.7.4