From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id C8A441B48B for ; Fri, 4 Jan 2019 14:27:42 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2E8423680B; Fri, 4 Jan 2019 13:27:42 +0000 (UTC) Received: from ktraynor.remote.csb (ovpn-117-13.ams2.redhat.com [10.36.117.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5F1175C1A1; Fri, 4 Jan 2019 13:27:40 +0000 (UTC) From: Kevin Traynor To: Zhirun Yan Cc: Haiyue Wang , Qi Zhang , dpdk stable Date: Fri, 4 Jan 2019 13:24:26 +0000 Message-Id: <20190104132455.15170-44-ktraynor@redhat.com> In-Reply-To: <20190104132455.15170-1-ktraynor@redhat.com> References: <20190104132455.15170-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 04 Jan 2019 13:27:42 +0000 (UTC) Subject: [dpdk-stable] patch 'net/i40e: clear VF reset flags after reset' has been queued to LTS release 18.11.1 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: Fri, 04 Jan 2019 13:27:43 -0000 Hi, FYI, your patch has been queued to LTS release 18.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 01/11/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Kevin Traynor --- >>From 49719bdfde3834834b2f72bccea2d467159e9747 Mon Sep 17 00:00:00 2001 From: Zhirun Yan Date: Thu, 13 Dec 2018 15:46:45 +0000 Subject: [PATCH] net/i40e: clear VF reset flags after reset [ upstream commit 0eaa1f8c75311b96d269a0195b80e80d6c27e83c ] The reset flags vf->vf_reset and vf->pend_msg are set when VF received VIRTCHNL_EVENT_RESET_IMPENDING. So after resetting done, these flags should be cleared. Fixes: 8cacf78469a7 ("net/i40e: fix VF initialization error") Signed-off-by: Zhirun Yan Signed-off-by: Haiyue Wang Acked-by: Qi Zhang --- drivers/net/i40e/i40e_ethdev_vf.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 05dc6596b..100e71cc8 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -1081,7 +1081,9 @@ i40evf_enable_irq0(struct i40e_hw *hw) static int -i40evf_check_vf_reset_done(struct i40e_hw *hw) +i40evf_check_vf_reset_done(struct rte_eth_dev *dev) { int i, reset; + struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private); + struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); for (i = 0; i < MAX_RESET_WAIT_CNT; i++) { @@ -1098,10 +1100,14 @@ i40evf_check_vf_reset_done(struct i40e_hw *hw) return -1; + vf->vf_reset = false; + vf->pend_msg &= ~PFMSG_RESET_IMPENDING; + return 0; } static int -i40evf_reset_vf(struct i40e_hw *hw) +i40evf_reset_vf(struct rte_eth_dev *dev) { int ret; + struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private); if (i40e_vf_reset(hw) != I40E_SUCCESS) { @@ -1120,5 +1126,5 @@ i40evf_reset_vf(struct i40e_hw *hw) rte_delay_ms(200); - ret = i40evf_check_vf_reset_done(hw); + ret = i40evf_check_vf_reset_done(dev); if (ret) { PMD_INIT_LOG(ERR, "VF is still resetting"); @@ -1146,5 +1152,5 @@ i40evf_init_vf(struct rte_eth_dev *dev) } - err = i40evf_check_vf_reset_done(hw); + err = i40evf_check_vf_reset_done(dev); if (err) goto err; @@ -1158,5 +1164,5 @@ i40evf_init_vf(struct rte_eth_dev *dev) /* Reset VF and wait until it's complete */ - if (i40evf_reset_vf(hw)) { + if (i40evf_reset_vf(dev)) { PMD_INIT_LOG(ERR, "reset NIC failed"); goto err_aq; @@ -2258,5 +2264,5 @@ i40evf_dev_close(struct rte_eth_dev *dev) i40evf_dev_allmulticast_disable(dev); - i40evf_reset_vf(hw); + i40evf_reset_vf(dev); i40e_shutdown_adminq(hw); i40evf_disable_irq0(hw); -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-01-04 13:23:08.504963458 +0000 +++ 0044-net-i40e-clear-VF-reset-flags-after-reset.patch 2019-01-04 13:23:07.000000000 +0000 @@ -1,14 +1,15 @@ -From 0eaa1f8c75311b96d269a0195b80e80d6c27e83c Mon Sep 17 00:00:00 2001 +From 49719bdfde3834834b2f72bccea2d467159e9747 Mon Sep 17 00:00:00 2001 From: Zhirun Yan Date: Thu, 13 Dec 2018 15:46:45 +0000 Subject: [PATCH] net/i40e: clear VF reset flags after reset +[ upstream commit 0eaa1f8c75311b96d269a0195b80e80d6c27e83c ] + The reset flags vf->vf_reset and vf->pend_msg are set when VF received VIRTCHNL_EVENT_RESET_IMPENDING. So after resetting done, these flags should be cleared. Fixes: 8cacf78469a7 ("net/i40e: fix VF initialization error") -Cc: stable@dpdk.org Signed-off-by: Zhirun Yan Signed-off-by: Haiyue Wang