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 6D711C00140 for ; Fri, 12 Aug 2022 13:26:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 029BD61151; Fri, 12 Aug 2022 13:26:17 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 029BD61151 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1660310777; bh=QNdPFbs11KfNlGtEnk/ko1lJkcfPOZhm5qTKlGQkuPo=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=7M8xcnP9ApoAsR/s/l56wdmY9KMJOBbzFJYMxzW1G41jdfl6FpahOXsTc1TUHbq+K IiRCfhlgb7Fw6pBWyCuGQvIG29j58oL3TII8bKIxiBWUyefpw1HoH5Hl5jWnx32560 J2kzgIzpMzuw+/Gbu+e4kTDD1m7HDzYviVr0H8Rk9+AHOma3M7jQkYm7sD8IhF2xFH eH5aa2bD92FlTE23GDhIiEsqQCck4Q/HVDjprUnjRj1xi5GrXsoNM85NFdEtAwskj0 rmaMRkol3VuhyXXir8LK3F4ztKOcsZvUjB9Nv02/ILPLsMqLWhqvGAc8e/OvAH8KPg CrE4pif0dVguA== 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 JoPbVlSaxPnK; Fri, 12 Aug 2022 13:26:15 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id BAEB86115A; Fri, 12 Aug 2022 13:26:14 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org BAEB86115A Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 7CFFA1BF23C for ; Fri, 12 Aug 2022 13:26:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 65BB283DEF for ; Fri, 12 Aug 2022 13:26:05 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 65BB283DEF X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uGkWRHadUc_H for ; Fri, 12 Aug 2022 13:26:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 8A6A583147 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by smtp1.osuosl.org (Postfix) with ESMTPS id 8A6A583147 for ; Fri, 12 Aug 2022 13:26:04 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6400,9594,10437"; a="290346970" X-IronPort-AV: E=Sophos;i="5.93,233,1654585200"; d="scan'208";a="290346970" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2022 06:26:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,233,1654585200"; d="scan'208";a="674075773" Received: from gsiwik.igk.intel.com ([10.102.18.50]) by fmsmga004.fm.intel.com with ESMTP; 12 Aug 2022 06:26:03 -0700 From: Grzegorz Siwik To: intel-wired-lan@lists.osuosl.org Date: Fri, 12 Aug 2022 15:25:50 +0200 Message-Id: <1660310750-290943-5-git-send-email-grzegorz.siwik@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1660310750-290943-1-git-send-email-grzegorz.siwik@intel.com> References: <1660310750-290943-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=1660310764; x=1691846764; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=MLjdFBs+nXjIfUmT4SJwT1MLmyqs3Ftb9V4aKeiaTIA=; b=CpP4s+YeJ3WmTTutyHTcL50Lwvn2z3dAOiieLtujHgdfp3X+c0f5TbD9 GbxuMoBcLjmfclHYq3y7PbC19YNP+Dlb5jTwNSZuToyR4L1un/J0PrJDA s+fCZswl3a5mvBhGYyp27ah7TpUnQrt50U2ODjX+09OsApiZmbDRxN8Nv /zKcpXa4Br4Vxja0rebUEHzZos7cu/4GmKVCCYU80NgXt+THjTljeJAQh NyDUKk68J7bc2WhnEhS/Ww4Gyhd3CMfkCx2wqywreY6m6x+65QlodxTpg /w+XfmSm7rg25YAR6Hz914fbtVc/QIsUTk9hmdtdzJUoQbym0lMn8M1vG A==; X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=CpP4s+Ye Subject: [Intel-wired-lan] [PATCH net v5 4/4] ice: Ignore error message when setting same promiscuous 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: Benjamin Mikailenko , 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" From: Benjamin Mikailenko Commit 1273f89578f2 ("ice: Fix broken IFF_ALLMULTI handling") introduced new checks when setting/clearing promiscuous mode. But if the requested promiscuous mode setting already exists, an -EEXIST error message would be printed. This is incorrect because promiscuous mode is either on/off and shouldn't print an error when the requested configuration is already set. This can happen when removing a bridge with two bonded interfaces and promiscuous most isn't fully cleared from VLAN VSI in hardware. Fix this by ignoring cases where requested promiscuous mode exists. Fixes: 1273f89578f2 ("ice: Fix broken IFF_ALLMULTI handling") Signed-off-by: Benjamin Mikailenko 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 --- v5: Fixed incorrect title patch issue --- drivers/net/ethernet/intel/ice/ice_fltr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_fltr.c b/drivers/net/ethernet/intel/ice/ice_fltr.c index 85a9448..40e678c 100644 --- a/drivers/net/ethernet/intel/ice/ice_fltr.c +++ b/drivers/net/ethernet/intel/ice/ice_fltr.c @@ -62,7 +62,7 @@ void ice_fltr_free_list(struct device *dev, struct list_head *h) int result; result = ice_set_vlan_vsi_promisc(hw, vsi->idx, promisc_mask, false); - if (result) + if (result && result != -EEXIST) dev_err(ice_pf_to_dev(pf), "Error setting promisc mode on VSI %i (rc=%d)\n", vsi->vsi_num, result); @@ -86,7 +86,7 @@ void ice_fltr_free_list(struct device *dev, struct list_head *h) int result; result = ice_set_vlan_vsi_promisc(hw, vsi->idx, promisc_mask, true); - if (result) + if (result && result != -EEXIST) dev_err(ice_pf_to_dev(pf), "Error clearing promisc mode on VSI %i (rc=%d)\n", vsi->vsi_num, result); @@ -109,7 +109,7 @@ void ice_fltr_free_list(struct device *dev, struct list_head *h) int result; result = ice_clear_vsi_promisc(hw, vsi_handle, promisc_mask, vid); - if (result) + if (result && result != -EEXIST) dev_err(ice_pf_to_dev(pf), "Error clearing promisc mode on VSI %i for VID %u (rc=%d)\n", ice_get_hw_vsi_num(hw, vsi_handle), vid, result); @@ -132,7 +132,7 @@ void ice_fltr_free_list(struct device *dev, struct list_head *h) int result; result = ice_set_vsi_promisc(hw, vsi_handle, promisc_mask, vid); - if (result) + if (result && result != -EEXIST) dev_err(ice_pf_to_dev(pf), "Error setting promisc mode on VSI %i for VID %u (rc=%d)\n", ice_get_hw_vsi_num(hw, vsi_handle), vid, result); -- 1.8.3.1 _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan