From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D0127A00C3 for ; Thu, 13 Oct 2022 08:18:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C727142D34; Thu, 13 Oct 2022 08:18:15 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 358D942C27; Thu, 13 Oct 2022 08:18:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665641893; x=1697177893; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Lo7tarBnim7QUwJeTfAne8HiJbAAiW9fNbqwAX8BTOk=; b=bwgMKVF2LTwgM5gRsvJjKDu5R68NJVleLYNnIheYuluJvxBVDreXoiZv DSvKVqcf+3gFpY/8n1G2QLZHbU57y3ppTJc5+cVJkOEr4sUf1marehjIt 6fl/aeaVDYjqRDZYrcHg09Q1zBhz5nOUKq9cQKLhWk7bX1zYHzyRVtm0O qdjdVvsZj9f8OHSvljhcnj5Pv+sVD61gixvu5DLnYTqnbuT1NTJ8Z9br/ bpB7fqtaWOXdhloZa30MJ2HJqTg88+lOS+Ju8GtCbhTVGaVB/aYIfg/jp fqtlESaZzgIKNaFejo7QK9GxMURi7lki7Ur4SXs6A3np+q6u7asGpq9xG Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10498"; a="366989933" X-IronPort-AV: E=Sophos;i="5.95,180,1661842800"; d="scan'208";a="366989933" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2022 23:17:54 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10498"; a="802117904" X-IronPort-AV: E=Sophos;i="5.95,180,1661842800"; d="scan'208";a="802117904" Received: from unknown (HELO dpdkserver..) ([10.239.252.174]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2022 23:17:53 -0700 From: Yiding Zhou To: dev@dpdk.org Cc: Yiding Zhou , stable@dpdk.org Subject: [PATCH] net/ice/base: fix duplicate flow rules Date: Thu, 13 Oct 2022 14:21:13 +0800 Message-Id: <20221013062113.96088-1-yidingx.zhou@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220919060654.1092715-1-yidingx.zhou@intel.com> References: <20220919060654.1092715-1-yidingx.zhou@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 --- 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