Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3294800rwa; Tue, 23 Aug 2022 02:10:23 -0700 (PDT) X-Google-Smtp-Source: AA6agR647Zwy0rhsPfmVBQH8od5psaOYjgustnIZOiBmfw7Qnw3u4+DMMpae0Bm6tYrZEz6ggZX0 X-Received: by 2002:a05:6402:428c:b0:440:8259:7a2b with SMTP id g12-20020a056402428c00b0044082597a2bmr2721734edc.329.1661245822882; Tue, 23 Aug 2022 02:10:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661245822; cv=none; d=google.com; s=arc-20160816; b=rBCyCGFbkTLTnHOf7EjDPmzWGZ1DElWjIakwOtRmOKttqWbo3QBNAg1vDjzoZKFLkH FPKLC4HbunMLlmO6SJIObVi7+iPZak61cHJ2fxSBAaZAb1AM1RsGvP+2MUAbuM7qzgkK 4C+un8hFZBufg/Z6ueMB6ZXw/WxfIXqJ4teoQcf/SorF5nzGJ/g0TExoPOumHgqHBDO5 nmLQxbKVI9GyYHA9lI6EMjHQSOxuacCTWMjVpNrDZraeU+IXh4IPHBg1VxEkUCkumqo9 jpuxdrBP2HvNd/ck5CYgfrcogCC3lHeCnamheeAF4Y8nxdBrBYABoyCmnfMpWA48cfNI uhfQ== 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=vFtZ52dJU0n5q2HhZ4ngbMUZYvpIBw6DUHoVukMMw0A=; b=SnsppgrL5vHGGKVceu8RZqwSo07rpDkV3X+x/QlxGdP+tCSQJmvdeK3A6wRQcWqJWN 0ANtFq743Ks0HDUJwO+Krrse0DsvD/yiJhd5ZnzIZoUZ65fPtRVThW5hC/gs14X6iWrr HlUSp+B5UVP3rTO6i1+Bi1DmuYVotAvgqvkGFkBVyzbnEdk5AwFBoq+YXtoKt+JqnB81 j+bPqQX6frdLsHqHsYKjpU8b+zJSmX+sWt2JUMfzPWuBqab4EET9yf7MB9VqlfulQ1Mp LyF4spc/TzBaZcWbmfI2ShRIdmkHW4OC6jndbEaunmbYpbPo0EiwicaDC/1K511sKFyh IwGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kRWAH4rB; 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 ta26-20020a1709078c1a00b0073d4db38fdesi9263400ejc.475.2022.08.23.02.09.50; Tue, 23 Aug 2022 02:10:22 -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=kRWAH4rB; 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 S1347643AbiHWJFL (ORCPT + 99 others); Tue, 23 Aug 2022 05:05:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347706AbiHWJEE (ORCPT ); Tue, 23 Aug 2022 05:04:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EE3974CF5; Tue, 23 Aug 2022 01:29:05 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 4F367614C7; Tue, 23 Aug 2022 08:28:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50D59C433D6; Tue, 23 Aug 2022 08:28:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661243282; bh=c8L+CHRO4m50NwSdiBKH0thAerkwii/5twQy5EFqNbE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kRWAH4rBZFhe3pVAdN2b1SWkxTVzNbgcpg3lrX84fFYVwbsNmie+3NqXclZkyDw5R hWsFQhja36GY0IF/bPn1lM2WEe7NbqE3Oe/B0l08KJk8hi+UQ4iUHh/cMngON3drKi WakhAIZy/coNqDmIALD/gZ6cUU8SdcpABxBPm++k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Benjamin Mikailenko , Grzegorz Siwik , Tony Nguyen , Gurucharan Subject: [PATCH 5.19 227/365] ice: Ignore error message when setting same promiscuous mode Date: Tue, 23 Aug 2022 10:02:08 +0200 Message-Id: <20220823080127.691956406@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: Benjamin Mikailenko commit 79956b83ed4281c35561c39254558092d96a9ed1 upstream. 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/ 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_fltr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/net/ethernet/intel/ice/ice_fltr.c +++ b/drivers/net/ethernet/intel/ice/ice_fltr.c @@ -62,7 +62,7 @@ ice_fltr_set_vlan_vsi_promisc(struct ice 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 @@ ice_fltr_clear_vlan_vsi_promisc(struct i 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 @@ ice_fltr_clear_vsi_promisc(struct ice_hw 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 @@ ice_fltr_set_vsi_promisc(struct ice_hw * 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);