DPDK patches and discussions
 help / color / mirror / Atom feed
From: Qi Zhang <qi.z.zhang@intel.com>
To: qiming.yang@intel.com
Cc: xiaolong.ye@intel.com, beilei.xing@intel.com,
	xiao.zhang@intel.com, dev@dpdk.org,
	Qi Zhang <qi.z.zhang@intel.com>
Subject: [dpdk-dev] [PATCH] net/ice/base: workaround for unexpected rule deletion
Date: Thu, 23 Apr 2020 12:22:13 +0800	[thread overview]
Message-ID: <20200423042213.17391-1-qi.z.zhang@intel.com> (raw)

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 <qi.z.zhang@intel.com>
---
 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


             reply	other threads:[~2020-04-23  4:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23  4:22 Qi Zhang [this message]
2020-04-24  3:14 ` Zhao1, Wei
2020-04-28  7:17   ` Ye Xiaolong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200423042213.17391-1-qi.z.zhang@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=qiming.yang@intel.com \
    --cc=xiao.zhang@intel.com \
    --cc=xiaolong.ye@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).