Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B0B9EC19F2A for ; Thu, 11 Aug 2022 13:16:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 54A95610E9; Thu, 11 Aug 2022 13:16:52 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 54A95610E9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1660223812; bh=AFoMxFqZK7NqeMwdZdeQJ4b8PQPA1p+MllfuAS55AG4=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=MLauiFFGdDAX8mQiSqcaA61aLL1ETfTFERf8bNFd36Fvk8OJ8qI/ok02Z4YUtB5IB 0anwUNu4IHXtTj1Cqxc/8TqiTEgsF2Y8UUIUWE1UGq9CDPiRaVJrx/Z3K+sBMH8FWH XfVNF+9/PK43+EdXmNclPW2bng9yXNOwI9u8eAC8z2lriVPt+M2jgYrGOizT0xNSSj LrH8EzWHCWAb2IR6SlM/WNqeo2OTtr/05kwtKzJjDGZRX3AYQK0mNSKMs0yC4nbcy1 +lemhLYDW/MBUQaz7xDJDKuIbob220jxLDcZYjV6OorMm5v4R/VwOUF9PmUNO+Zleh 56cUeSbQj7o1A== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R5DFFCfADb7C; Thu, 11 Aug 2022 13:16:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 649DE610EC; Thu, 11 Aug 2022 13:16:51 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 649DE610EC Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 0D9B51BF2F6 for ; Thu, 11 Aug 2022 13:16:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id E978A402AA for ; Thu, 11 Aug 2022 13:16:46 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org E978A402AA X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DhZ19w-MK-G3 for ; Thu, 11 Aug 2022 13:16:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 14FFF41591 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by smtp4.osuosl.org (Postfix) with ESMTPS id 14FFF41591 for ; Thu, 11 Aug 2022 13:16:46 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6400,9594,10435"; a="274397606" X-IronPort-AV: E=Sophos;i="5.93,228,1654585200"; d="scan'208";a="274397606" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2022 06:16:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,228,1654585200"; d="scan'208";a="634219886" Received: from gsiwik.igk.intel.com ([10.102.18.50]) by orsmga008.jf.intel.com with ESMTP; 11 Aug 2022 06:16:45 -0700 From: Grzegorz Siwik To: intel-wired-lan@lists.osuosl.org Date: Thu, 11 Aug 2022 15:16:38 +0200 Message-Id: <1660223801-254272-2-git-send-email-grzegorz.siwik@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1660223801-254272-1-git-send-email-grzegorz.siwik@intel.com> References: <1660223801-254272-1-git-send-email-grzegorz.siwik@intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660223806; x=1691759806; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=Z0t+bkbDaow2CYB+Y4o5/j3czM3OsmfMZu8QMhjA9bk=; b=GuOCO93vYjhEgqJD4ifOttJu8m6o1VagGDAYFo06jkIfAHLo6+0yGLpq oVZ6aA5vqRqH3uan4+vGEeh51tNh5cRPA/jZqIvlT0TmGMyYH4j8pCAgq 0rpJWxjMzXQQvcl/n/muWlp/Oh6wquEuFFX84VyXh/bP7aibi9RY3n4Xr 77ngBcWdZWpeI9tMQVcN44oPNx/tr2cIbfWA+TGBnkMsHby5YXfHxYVQm GLtp+xGGgzr1W1rrAzeyjMZ28TY1nMlfY8QdRCxYfCjGNG3uqrW11G52e p+qJf87KsDvEbLAKMxd5oLUgwxPSG0kU/xvIaWzImAgWqKHBdzzxRyCt8 Q==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=GuOCO93v Subject: [Intel-wired-lan] [PATCH net v4 1/4] ice: Fix double VLAN error when entering promisc mode X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Grzegorz Siwik MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" 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: 5eda8afd6bcc ("ice: Add support for PF/VF promiscuous mode") Signed-off-by: Grzegorz Siwik Link: https://lore.kernel.org/all/CAK8fFZ7m-KR57M_rYX6xZN39K89O=LGooYkKsu6HKt0Bs+x6xQ@mail.gmail.com/ --- v2: Fixed error message when setting same promiscuous mode --- v3: Fixed style issues, changed to return directly. --- v4: Fixed problem with patch applying --- drivers/net/ethernet/intel/ice/ice_switch.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c index 8d8f3ee..8a60052 100644 --- a/drivers/net/ethernet/intel/ice/ice_switch.c +++ b/drivers/net/ethernet/intel/ice/ice_switch.c @@ -4414,6 +4414,13 @@ static u8 ice_determine_promisc_mask(struct ice_fltr_info *fi) goto free_fltr_list; list_for_each_entry(list_itr, &vsi_list_head, 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, -- 1.8.3.1 _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan