From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F69FC5518A for ; Wed, 22 Apr 2020 07:35:30 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 4BD03206A1 for ; Wed, 22 Apr 2020 07:35:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4BD03206A1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 27EBE1C2EB; Wed, 22 Apr 2020 09:35:29 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id B43191C2AD for ; Wed, 22 Apr 2020 09:35:27 +0200 (CEST) IronPort-SDR: 9JTUb1OJWAAAwFJQo7h5ySakt+XFA5Uu+lfWRhVJdm6A7LMa+PiCshbBYuqCGseDBTQWD5JNzX qnoYiO3baJ7g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2020 00:35:26 -0700 IronPort-SDR: bLyyWzw0bxWcykROWivVYIMUHqmiZ7IWH4rPLhaaTFab0tdN3iR7ucBneldQ6Mn5AEScWF7HOQ nzdz28dck/AQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,412,1580803200"; d="scan'208";a="273796991" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by orsmga002.jf.intel.com with ESMTP; 22 Apr 2020 00:35:25 -0700 Date: Wed, 22 Apr 2020 15:31:02 +0800 From: Ye Xiaolong To: Beilei Xing Cc: dev@dpdk.org, haiyue.wang@intel.com, qi.z.zhang@intel.com Message-ID: <20200422073102.GD105307@intel.com> References: <1587558164-5504-1-git-send-email-beilei.xing@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1587558164-5504-1-git-send-email-beilei.xing@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) 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" On 04/22, Beilei Xing wrote: >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 > Applied to dpdk-next-net-intel, Thanks.