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 73467A00C3; Mon, 15 Aug 2022 01:26:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F37242CC3; Mon, 15 Aug 2022 01:23:28 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 4125642CB2; Mon, 15 Aug 2022 01:23:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660519406; x=1692055406; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2pDaJ0eI/A9oe3N75O/94Sr77b/bD733khIZNw06fJ0=; b=jKQA/Kek4VhP8QfyDGN/kCRolHqVIbzujRQc60Qp8mWHb0eic1oe6LN+ k5GBqNv1oUJ4iHMzo6VDgPQSoDI02+BL9QEiFYjB6TPakcbiSGzisPwSv 5OXBV/rrEUqM6LA+7A4xIiRLF8H4QVfjmTPhHIPggTydBvX/Yf/X14dXq u8NdNTvjkcYFovWTlqIIypGR5kW6LhcJ59uOQ73JFd1MS9+hLS/iRHT9S dVhMwOHWgXts9QctgdkWz4qwbK+GXOxApojBzQ5JyWbPVfiLTivBXJc1d qjhx3wRhW546yJqrSIhgXmLQRzhs9WwlJagJxXQsvdU/VIO/J9bei0CyV g==; X-IronPort-AV: E=McAfee;i="6400,9594,10439"; a="291857989" X-IronPort-AV: E=Sophos;i="5.93,237,1654585200"; d="scan'208";a="291857989" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2022 16:23:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,237,1654585200"; d="scan'208";a="635283224" Received: from dpdk-qzhan15-test02.sh.intel.com ([10.67.115.4]) by orsmga008.jf.intel.com with ESMTP; 14 Aug 2022 16:23:24 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: dev@dpdk.org, Qi Zhang , stable@dpdk.org, Grzegorz Siwik Subject: [PATCH v2 42/70] net/ice/base: fix double VLAN error in promisc mode Date: Mon, 15 Aug 2022 03:31:38 -0400 Message-Id: <20220815073206.2917968-43-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220815073206.2917968-1-qi.z.zhang@intel.com> References: <20220815071306.2910599-1-qi.z.zhang@intel.com> <20220815073206.2917968-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Avoid enabling or disabling vlan 0 when trying to set promiscuous vlan mode if double vlan mode is enabled. This fix is needed because the driver tries to add the vlan 0 filter twice (once for inner and once for outer) when double VLAN mode is enabled. The filter program is rejected by the firmware when double vlan is enabled, because the promiscuous filter only needs to be set once. This issue was missed in the initial implementation of double vlan mode. Fixes: 60ff6f5ce2d8 ("net/ice/base: consolidate VF promiscuous mode") Cc: stable@dpdk.org Signed-off-by: Grzegorz Siwik 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 a8f83f62ff..6a94e3fde9 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -6263,6 +6263,13 @@ _ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask, LIST_FOR_EACH_ENTRY(list_itr, &vsi_list_head, ice_fltr_list_entry, list_entry) { + /* Avoid enabling or disabling vlan zero twice when in double + * vlan mode + */ + if (ice_is_dvm_ena(hw) && + list_itr->fltr_info.l_data.vlan.tpid == 0) + continue; + vlan_id = list_itr->fltr_info.l_data.vlan.vlan_id; if (rm_vlan_promisc) status = _ice_clear_vsi_promisc(hw, vsi_handle, -- 2.31.1