DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yiding Zhou <yidingx.zhou@intel.com>
To: dev@dpdk.org
Cc: Yiding Zhou <yidingx.zhou@intel.com>, stable@dpdk.org
Subject: [PATCH] net/ice/base: fix duplicate flow rules
Date: Thu, 13 Oct 2022 14:21:13 +0800	[thread overview]
Message-ID: <20221013062113.96088-1-yidingx.zhou@intel.com> (raw)
In-Reply-To: <20220919060654.1092715-1-yidingx.zhou@intel.com>

When a vsi that already exists in the created vsi_list subscribes to the
same filter again, the return value ICE_SUCCESS results in duplicate flow
rules to be stored, which will cause 'flush' and 'destroy' errors.

Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")
Cc: stable@dpdk.org

Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
---
 drivers/net/ice/base/ice_switch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 4b115ce660..a2581f404d 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -8786,7 +8786,7 @@ ice_adv_add_update_vsi_list(struct ice_hw *hw,
 
 		/* A rule already exists with the new VSI being added */
 		if (ice_is_bit_set(m_entry->vsi_list_info->vsi_map, vsi_handle))
-			return ICE_SUCCESS;
+			return ICE_ERR_ALREADY_EXISTS;
 
 		/* Update the previously created VSI list set with
 		 * the new VSI ID passed in
-- 
2.34.1


  parent reply	other threads:[~2022-10-13  6:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-19  6:06 [PATCH] net/iavf: fix error of virtchnl command Yiding Zhou
2022-09-19  7:53 ` [PATCH v2] " Yiding Zhou
2022-10-08  8:48 ` [PATCH v3] " Yiding Zhou
2022-10-09  6:03   ` Zhang, Qi Z
2022-10-10  2:02     ` Zhou, YidingX
2022-10-13  6:20 ` [PATCH v4] " Yiding Zhou
2022-10-18 13:18   ` Zhang, Qi Z
2022-10-13  6:21 ` Yiding Zhou [this message]
2022-10-19 12:19   ` [PATCH] net/ice/base: fix duplicate flow rules Xu, Ke1
2022-11-09  0:40     ` Zhang, Qi Z
2022-11-08  6:37   ` Zhou, YidingX
2022-10-20  5:00 ` [PATCH v5] net/iavf: add thread for event callbacks Yiding Zhou
2022-10-20  5:40   ` Zhang, Qi Z
2022-10-28 21:45   ` Thomas Monjalon

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=20221013062113.96088-1-yidingx.zhou@intel.com \
    --to=yidingx.zhou@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /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).