Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3295579rwa; Tue, 23 Aug 2022 02:11:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR7hIVXpZZ4o6vJooSRlnJsBqHZ/WSklL8Ug+xGsJuhbEFdAxfpvpYbY5NtJkHi0fSOhmT0Q X-Received: by 2002:a05:6402:3698:b0:446:6a7c:43de with SMTP id ej24-20020a056402369800b004466a7c43demr2839482edb.414.1661245871298; Tue, 23 Aug 2022 02:11:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661245871; cv=none; d=google.com; s=arc-20160816; b=sSZeG1DXmk/ZsepGtX4O9sfK2mro06aXpn0tjVmmEpwOgftdGDYTXrD/DpkKR5SOEC If/2Be/ROVyUw3u/IQ5YlY+bNOwKk8UXgllNaHE3PrdNx8JcCBnZyc/qNr8RWLoSwaIm iApFH9zD8Z2haIiARVM7+y3gBww+Cgd0Pul34oTewR3inrVjv/GEvp9KFg+5MlE/Tsjj HFrEZwqAjHSTq9xkZzy33LlJ1vsp138RLH/E4uCwhjHWgr7131PATI3ByCXyy68+piFC F071RJym90idLKwjgNpv+sE2N4oBq9+iaXUfQfRCkoHX8BWezZrpA9jbR26LZuJmXN4q p9Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FW6wQOplieBkualx//11cYm6qkyrBGj2H0N+fsaCkOo=; b=rGHef59ue7ziX93A7+HiOaUxaQdFiyQ2Yp09Fz6TIdHW/7jOSuRBKoEfR9Xu2eWCIo zhi3dBX+FCqIffYGoJRXRM05AljPivscNF1LX5T/dDbTFbCAmjBJT35/8O6woLmUzrhB HiUxm9/w6tOIBINMQ7FhrJXc4u1zG8isTTRCHcWYkizNC1Yemv7BdtRuDtM8LGdjCStX IvqvmvNWkE6oZELFwVHD6i/g7vWex/NO0zoDdjvhf3/dvSgBPMiDsZjUIpvbddHPDLYQ JlS1EuG77iov49JzmJimVP0UZtdYmud3hZl2hPZ2zgAXio55acmQ/OYI1I7v/N58jxQ+ vv+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=E09IpiJM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m23-20020a50d7d7000000b00446f6b3899esi1409249edj.344.2022.08.23.02.10.41; Tue, 23 Aug 2022 02:11:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=E09IpiJM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347712AbiHWJGk (ORCPT + 99 others); Tue, 23 Aug 2022 05:06:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348047AbiHWJFp (ORCPT ); Tue, 23 Aug 2022 05:05:45 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E41E74DD7; Tue, 23 Aug 2022 01:29:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E86CFB81C52; Tue, 23 Aug 2022 08:28:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55E10C433D6; Tue, 23 Aug 2022 08:27:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661243279; bh=06rDHVyj14to00b6+dc3sf8vZFtqHsM2kx3cr8PLbb0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E09IpiJMPkCxsJwO8pGpl2/xyRmAJJZSvBrkODijK+fRY4ITwT9PXEfTNsNmp0UWc /rZRrf0e7Kv7YgLa/rw3kprDVPwy++9dRm95Fxy29mN7/YFHAhYWdglN5xQ4EoVZBZ R/Itdhuo2Gi1MjJAaQE8snWufEdLoa9+3WbvDhbc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jesse Brandeburg , Grzegorz Siwik , Jaroslav Pulchart , Igor Raits , Tony Nguyen , Gurucharan Subject: [PATCH 5.19 226/365] ice: Fix clearing of promisc mode with bridge over bond Date: Tue, 23 Aug 2022 10:02:07 +0200 Message-Id: <20220823080127.653236561@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080118.128342613@linuxfoundation.org> References: <20220823080118.128342613@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Grzegorz Siwik commit abddafd4585cc825d454da3cf308ad1226f6c554 upstream. 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") Co-developed-by: Jesse Brandeburg Signed-off-by: Jesse Brandeburg Signed-off-by: Grzegorz Siwik Link: https://lore.kernel.org/all/CAK8fFZ7m-KR57M_rYX6xZN39K89O=LGooYkKsu6HKt0Bs+x6xQ@mail.gmail.com/ Tested-by: Jaroslav Pulchart Tested-by: Igor Raits Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/intel/ice/ice_lib.c | 6 +++++- drivers/net/ethernet/intel/ice/ice_main.c | 12 +++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) --- a/drivers/net/ethernet/intel/ice/ice_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_lib.c @@ -4078,7 +4078,11 @@ int ice_vsi_del_vlan_zero(struct ice_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); } /** --- 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_vs 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,14 @@ ice_vlan_rx_kill_vid(struct net_device * 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