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 66CC5A00C2; Wed, 22 Apr 2020 07:19:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 52A271C437; Wed, 22 Apr 2020 07:19:53 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id DE4C71C2EC for ; Wed, 22 Apr 2020 07:19:51 +0200 (CEST) IronPort-SDR: 1HmRkyiJkgUsDzYIIS/1g5VAYtipgVSVrV8lg18ysy7NV5LtlkK/SYLtc8mvxv0989EB3W3bUa JySpjJaiWzKw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2020 22:19:51 -0700 IronPort-SDR: Rn58PZak7wKGE68NpKKV+uw3ZTX5FdgV0bfwvLHgJd32RHaugLPDHVal92LRANJJmCSg6RCkD1 nRz81vgAdYBg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,412,1580803200"; d="scan'208";a="258945045" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga006.jf.intel.com with ESMTP; 21 Apr 2020 22:19:50 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 21 Apr 2020 22:19:49 -0700 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 22 Apr 2020 13:19:46 +0800 Received: from shsmsx603.ccr.corp.intel.com ([10.109.6.143]) by SHSMSX603.ccr.corp.intel.com ([10.109.6.143]) with mapi id 15.01.1713.004; Wed, 22 Apr 2020 13:19:46 +0800 From: "Wang, Haiyue" To: "Xing, Beilei" , "dev@dpdk.org" , "Zhang, Qi Z" Thread-Topic: [PATCH] net/ice: fix flow redirector issue Thread-Index: AQHWGFYeQcvT5TpkH02pajFKdR1g8KiEmnYg Date: Wed, 22 Apr 2020 05:19:46 +0000 Message-ID: <4f036a80420e4a38b0e22ab36ef533a9@intel.com> References: <1587558164-5504-1-git-send-email-beilei.xing@intel.com> In-Reply-To: <1587558164-5504-1-git-send-email-beilei.xing@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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" > -----Original Message----- > From: Xing, Beilei > Sent: Wednesday, April 22, 2020 20:23 > To: dev@dpdk.org; Wang, Haiyue ; Zhang, Qi Z > Subject: [PATCH] net/ice: fix flow redirector issue >=20 > 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. >=20 > Fixes: f10cde8e8478 ("net/ice: get VF hardware index in DCF") > Fixes: dc0f06849e50 ("net/ice: redirect switch rule to new VSI") >=20 > 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(-) >=20 > 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); >=20 > - 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 =3D -1; >=20 > rte_intr_enable(&pci_dev->intr_handle); > diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_p= arent.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; >=20 > /* Redirect rules if vsi mapping table changes. */ > - if (!first_update && vsi_ctx->vsi_num !=3D new_vsi_num) { > + if (!first_update) { > struct ice_flow_redirect rd; >=20 > memset(&rd, 0, sizeof(struct ice_flow_redirect)); > -- > 2.7.4 Acked-by: Haiyue Wang