From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E0308A05A1; Wed, 22 Apr 2020 05:27:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D57F51C299; Wed, 22 Apr 2020 05:27:03 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id F3A601C1F8 for ; Wed, 22 Apr 2020 05:27:01 +0200 (CEST) IronPort-SDR: P+BA3x6voMsKP52ZL2SO4EhDFNhxspK1Pvz6iowO2ujRttcs+p0RTjoE1/QnQeKpdT3UEiDHV4 /uNvahB/EPDQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2020 20:27:00 -0700 IronPort-SDR: aCYLA2uDipNNbsvhWGjt2zkBsIIGVkRpTzGs1aBaCXxB0MphDAsHzkCVIaRgmiGglC3P/FvAQO QngQ1NM+9YdA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,412,1580803200"; d="scan'208";a="334478862" Received: from dpdk-beileix-3.sh.intel.com ([10.67.110.206]) by orsmga001.jf.intel.com with ESMTP; 21 Apr 2020 20:26:58 -0700 From: Beilei Xing To: dev@dpdk.org, haiyue.wang@intel.com, qi.z.zhang@intel.com Date: Wed, 22 Apr 2020 20:22:44 +0800 Message-Id: <1587558164-5504-1-git-send-email-beilei.xing@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] net/ice: fix flow redirector issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" If there's VF reset, the kernel PF will remove rules associated with the reset VF no matter the HW VSI ID is changed or not. So DCF should redirector all rules associated with the reset VF no matter the HW VSI ID is changed or not. Fixes: f10cde8e8478 ("net/ice: get VF hardware index in DCF") Fixes: dc0f06849e50 ("net/ice: redirect switch rule to new VSI") Signed-off-by: Beilei Xing --- drivers/net/ice/ice_dcf.c | 2 +- drivers/net/ice/ice_dcf_parent.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c index 4c30f0e..0cd5d1b 100644 --- a/drivers/net/ice/ice_dcf.c +++ b/drivers/net/ice/ice_dcf.c @@ -536,7 +536,7 @@ ice_dcf_handle_vsi_update_event(struct ice_dcf_hw *hw) rte_intr_disable(&pci_dev->intr_handle); ice_dcf_disable_irq0(hw); - if (ice_dcf_get_vf_resource(hw) || ice_dcf_get_vf_vsi_map(hw)) + if (ice_dcf_get_vf_resource(hw) || ice_dcf_get_vf_vsi_map(hw) < 0) err = -1; rte_intr_enable(&pci_dev->intr_handle); diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c index d4b4ede..bdfc7d4 100644 --- a/drivers/net/ice/ice_dcf_parent.c +++ b/drivers/net/ice/ice_dcf_parent.c @@ -45,7 +45,7 @@ ice_dcf_update_vsi_ctx(struct ice_hw *hw, uint16_t vsi_handle, VIRTCHNL_DCF_VF_VSI_ID_S; /* Redirect rules if vsi mapping table changes. */ - if (!first_update && vsi_ctx->vsi_num != new_vsi_num) { + if (!first_update) { struct ice_flow_redirect rd; memset(&rd, 0, sizeof(struct ice_flow_redirect)); -- 2.7.4