From mboxrd@z Thu Jan 1 00:00:00 1970 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 A5065C00140 for ; Wed, 10 Aug 2022 14:22:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 52A4A60AC0; Wed, 10 Aug 2022 14:22:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 52A4A60AC0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1660141340; bh=0c9LGDUqCzKQnSoN3WwbvxRQ3MLWtk0qDAZ3tM8wzE0=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=mKiFAdUFRgUQJ5pgi41s+dhuBZSr2df3003cBWT0C8YIDn2++899B4rhOj5nVDc3f xT/AzSUR8JQE86pzNyfTm0nLJQBgX9wJuuEi1EcDV5M0et42YrJiD6vXY9KJVIJMXq mLbsO5KdHuwSECqYUaqSyOuh4aoKrpYfzvUhtE1EPFLBU79imWfnGj3ztisYStZkov qC+5j6gqUR73q+FngXwVUZVsiapIWYaWidAsFnJbwHF7thJDIkI2f1+OPUr8EiGuR0 cn1VE3//ysT3AZ+qnaVEt4QY3WcJaQHjtUJKD6n96GoUev486PU6WMXm22UROHp9wQ 3xlC5NTPe8VmA== 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 9v3V2lHIrqwf; Wed, 10 Aug 2022 14:22:19 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 400AF61044; Wed, 10 Aug 2022 14:22:19 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 400AF61044 Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id F28B21BF488 for ; Wed, 10 Aug 2022 14:22:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id CD07F40C13 for ; Wed, 10 Aug 2022 14:22:10 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org CD07F40C13 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id En9vtesxcURV for ; Wed, 10 Aug 2022 14:22:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org E732040150 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by smtp2.osuosl.org (Postfix) with ESMTPS id E732040150 for ; Wed, 10 Aug 2022 14:22:08 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6400,9594,10435"; a="291882975" X-IronPort-AV: E=Sophos;i="5.93,227,1654585200"; d="scan'208";a="291882975" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2022 07:22:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,227,1654585200"; d="scan'208";a="638121327" Received: from gsiwik.igk.intel.com ([10.102.18.50]) by orsmga001.jf.intel.com with ESMTP; 10 Aug 2022 07:22:06 -0700 From: Grzegorz Siwik To: intel-wired-lan@lists.osuosl.org Date: Wed, 10 Aug 2022 16:21:54 +0200 Message-Id: <1660141315-216111-4-git-send-email-grzegorz.siwik@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1660141315-216111-1-git-send-email-grzegorz.siwik@intel.com> References: <1660141315-216111-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=1660141329; x=1691677329; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=kcA11K36etdwB9UGFXHisCt0hnG+peLp1tXUrBvXPHI=; b=QdC1r9U2XHu7+KQh+Rt2bWAeafMHZJiA+38Jy9oZ9SVLhjgXYohAJcbu /e28WzB8eRtknBbjQcHjKGRpKvunPfQfi6ZyHRJ5m7yxrp23fa50xKPce i6YQWWXR7x9MOp/QL3whWNJgtpo89dBZOYKh1OWazjbQr2raDjxs1Nsah 6HNo/fUzHu9z0MNYWEQrhJWZjV4YZHfuGWSQiJY3ghIJjOqEmyL2ZNQPq 0eBQ99gU/cJQMDoA021WaXo9mywr3fACdMozFZstErZdG2A9veVznw+CN 82ZjqBWG2PNquzpdxfh7a+B1NvhsL2ezPh7QQfSYNDXqaqPgGfoXhu7Bn Q==; X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=QdC1r9U2 Subject: [Intel-wired-lan] [PATCH net v3 3/4] ice: Fix clearing of promisc mode with bridge over bond 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: Jesse Brandeburg , 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" When at least two interfaces are bonded and a bridge is enabled on the bond, an error can occur when the bridge is removed and re-added. The reason for the error is because promiscuous mode was not fully cleared from the VLAN VSI in the hardware. With this change, promiscuous mode is properly removed when the bridge disconnects from bonding. [ 1033.676359] bond1: link status definitely down for interface enp95s0f0, disabling it [ 1033.676366] bond1: making interface enp175s0f0 the new active one [ 1033.676369] device enp95s0f0 left promiscuous mode [ 1033.676522] device enp175s0f0 entered promiscuous mode [ 1033.676901] ice 0000:af:00.0 enp175s0f0: Error setting Multicast promiscuous mode on VSI 6 [ 1041.795662] ice 0000:af:00.0 enp175s0f0: Error setting Multicast promiscuous mode on VSI 6 [ 1041.944826] bond1: link status definitely down for interface enp175s0f0, disabling it [ 1041.944874] device enp175s0f0 left promiscuous mode [ 1041.944918] bond1: now running without any active interface! Fixes: c31af68a1b94 ("ice: Add outer_vlan_ops and VSI specific VLAN ops implementations") Signed-off-by: Grzegorz Siwik Co-developed-by: Jesse Brandeburg Signed-off-by: Jesse Brandeburg 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. --- drivers/net/ethernet/intel/ice/ice_lib.c | 8 +++++++- drivers/net/ethernet/intel/ice/ice_main.c | 13 ++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c index f7f9c97..251012d 100644 --- a/drivers/net/ethernet/intel/ice/ice_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_lib.c @@ -4078,7 +4078,13 @@ int ice_vsi_del_vlan_zero(struct ice_vsi *vsi) if (err && err != -EEXIST) return err; - return 0; + /* when deleting the last VLAN filter, make sure to disable the VLAN + * promisc mode so the filter isn't left by accident + */ + return ice_clear_vsi_promisc(&vsi->back->hw, vsi->idx, + ICE_MCAST_VLAN_PROMISC_BITS, 0); } /** diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index c1ac2f7..c4f89c1 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -267,8 +267,10 @@ static int ice_set_promisc(struct ice_vsi *vsi, u8 promisc_m) status = ice_fltr_set_vsi_promisc(&vsi->back->hw, vsi->idx, promisc_m, 0); } + if (status && status != -EEXIST) + return status; - return status; + return 0; } /** @@ -3572,6 +3574,15 @@ struct ice_vsi * while (test_and_set_bit(ICE_CFG_BUSY, vsi->state)) usleep_range(1000, 2000); + ret = ice_clear_vsi_promisc(&vsi->back->hw, vsi->idx, + ICE_MCAST_VLAN_PROMISC_BITS, vid); + if (ret) { + netdev_err(netdev, "Error clearing multicast promiscuous mode on VSI %i\n", + vsi->vsi_num); + vsi->current_netdev_flags |= IFF_ALLMULTI; + } + vlan_ops = ice_get_compat_vsi_vlan_ops(vsi); /* Make sure VLAN delete is successful before updating VLAN -- 1.8.3.1 _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan