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 87C0AA00C2; Thu, 23 Apr 2020 06:18:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 31ABF1D150; Thu, 23 Apr 2020 06:18:26 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 9AD221C43D for ; Thu, 23 Apr 2020 06:18:24 +0200 (CEST) IronPort-SDR: 0YPu+fH9eFKjXyJVrdAvIUgPh9d3Y5lrRpoc3+bAvMRerq/idxdo8PTt1fQXv0JpgzfT+pUy1+ AkxesjeauhpQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2020 21:18:23 -0700 IronPort-SDR: 9U2/dIQJJCMH8hPXYr0bMJ/9zPQhKzFRkpyBL1+jkQeMWofiAQ24M7Ldq6A8KlYTvwxbPr0RXl 92+nmXjsWY6g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,305,1583222400"; d="scan'208";a="456763428" Received: from dpdk51.sh.intel.com ([10.67.110.245]) by fmsmga005.fm.intel.com with ESMTP; 22 Apr 2020 21:18:21 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: xiaolong.ye@intel.com, beilei.xing@intel.com, xiao.zhang@intel.com, dev@dpdk.org, Qi Zhang Date: Thu, 23 Apr 2020 12:22:13 +0800 Message-Id: <20200423042213.17391-1-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 Subject: [dpdk-dev] [PATCH] net/ice/base: workaround for unexpected rule deletion 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" Ideally a rule with "TO VSI LIST" action should not be deleted when one of the VF reset happens. The correct action by kernel PF driver is to remove the VSI of a reset VF from the VSI list, but this is not implemented in kernel PF yet, so workaround is the DCF to prevent a rule with "To VSI List" action happens. Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_switch.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 08999d336..b9fa516b0 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -6438,6 +6438,13 @@ ice_adv_add_update_vsi_list(struct ice_hw *hw, cur_fltr->sw_act.fltr_act == ICE_FWD_TO_VSI_LIST)) return ICE_ERR_NOT_IMPL; + /* Workaround fix for unexpected rule deletion by kernel PF + * during VF reset. + */ + if (new_fltr->sw_act.fltr_act == ICE_FWD_TO_VSI && + cur_fltr->sw_act.fltr_act == ICE_FWD_TO_VSI) + return ICE_ERR_NOT_IMPL; + if (m_entry->vsi_count < 2 && !m_entry->vsi_list_info) { /* Only one entry existed in the mapping and it was not already * a part of a VSI list. So, create a VSI list with the old and -- 2.13.6