Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2176849iof; Tue, 7 Jun 2022 22:16:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIOEadgSvhtjNkzvx6/ZOPkE+MEY9/JevaTBiMB7n6fkEVGcwtasM1QjEcYSdbuiYA8E3j X-Received: by 2002:a17:90b:4a4e:b0:1e6:6757:d085 with SMTP id lb14-20020a17090b4a4e00b001e66757d085mr38393139pjb.207.1654665362380; Tue, 07 Jun 2022 22:16:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654665362; cv=none; d=google.com; s=arc-20160816; b=h67fM0y26ekxgveR15sqlVD5Q/AEBz6HIqKSC8CUJpaqyNYrDBrHwAISFOIAFRsgqu 3RAWe9VcMQx0fE47JckCtG2HnaxlznLUhcJlPTWEm/edbsPMU2QVnEfx232TEHo3DiS6 SRersKUtBl+oMT2UgR/OsGBQU6/h2UiEGHj4ZIM5LnGPwm3uCEvQkK7Bek7MIeNyNBR3 6Q7btA3FVkvhC38KKHLKoiVgPZpejz2ULSJvo9R2jasxPZ5MoAoF1FF5c7aVBNYDeFTF GjjTNgVg5qWl2JI9BPiq4av0J9V4SRW41DX6KYeLEHxwvnc+rPwFTmIyh0+XdyM3GAP3 632Q== 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=0NKyxblU50+P4sj48SZl8H1H2skU1ZaXD8MmUfokxt8=; b=WGcgwAxU6sX876Z3GQPNNdoiJQ2CzxDocZJYm317mzc+rfbP72QVOoj5GzYYVk3dzX qezBMUeePktH/+7S55ClbOl9b7zfut4tCGfSPvewVcA8HPDRU+wzf/nCsaolXvWC1Vh/ d9aXZ6SSt5wTaCf1YzYoUII7QRAiP2ZsMYw8DVWkCyqlS+jHPdptCn2efe94Sz6Kk+ym 5Vn5mNM141xC6eeBR53VtxORIj9ZHJ9xj/VNzeNX8N3frWGOXonX/LNo/5m+UJTqvmye 0rPRqVMqZhaqKw3fm9ZteuCN4w/c5lS6hnTaYYQxPtvrWi5SwYVaUCCrO8n/hRqKJv25 ON7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bkh1ldoc; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id p9-20020a170902780900b00153b2d1659fsi12412248pll.423.2022.06.07.22.16.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:16:02 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bkh1ldoc; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 68C07468500; Tue, 7 Jun 2022 21:45:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376369AbiFGUnb (ORCPT + 99 others); Tue, 7 Jun 2022 16:43:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357482AbiFGTmC (ORCPT ); Tue, 7 Jun 2022 15:42:02 -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 E188E1B216B; Tue, 7 Jun 2022 11:15:09 -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 5FF16B8233E; Tue, 7 Jun 2022 18:15:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B381DC385A2; Tue, 7 Jun 2022 18:15:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654625706; bh=4XChG8Mn9Ckp+o5xpIAJPICimju0Ixs9wovnr8tIqy0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bkh1ldocEy3Nl2zD422kZ+HNaWJF+9Y8STUhgtsXYhpiRjqPWaRcGH/L4Ms7hqDqT w297t57+u6mt+DBbuP+KmLLVa5UCg7xlO0Jc3eAGdLdBtRI8ec/6rhvpTrCxu+SwBn U6DeiVKy4JzyCVSqLnMUEx5YsnXQILiYGzgqya7E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maksym Yaremchuk , Petr Machata , Ido Schimmel , "David S. Miller" , Sasha Levin Subject: [PATCH 5.17 113/772] mlxsw: spectrum_dcb: Do not warn about priority changes Date: Tue, 7 Jun 2022 18:55:05 +0200 Message-Id: <20220607164952.379123725@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164948.980838585@linuxfoundation.org> References: <20220607164948.980838585@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: Petr Machata [ Upstream commit b6b584562cbe7dc357083459d6dd5b171e12cadb ] The idea behind the warnings is that the user would get warned in case when more than one priority is configured for a given DSCP value on a netdevice. The warning is currently wrong, because dcb_ieee_getapp_mask() returns the first matching entry, not all of them, and the warning will then claim that some priority is "current", when in fact it is not. But more importantly, the warning is misleading in general. Consider the following commands: # dcb app flush dev swp19 dscp-prio # dcb app add dev swp19 dscp-prio 24:3 # dcb app replace dev swp19 dscp-prio 24:2 The last command will issue the following warning: mlxsw_spectrum3 0000:07:00.0 swp19: Ignoring new priority 2 for DSCP 24 in favor of current value of 3 The reason is that the "replace" command works by first adding the new value, and then removing all old values. This is the only way to make the replacement without causing the traffic to be prioritized to whatever the chip defaults to. The warning is issued in response to adding the new priority, and then no warning is shown when the old priority is removed. The upshot is that the canonical way to change traffic prioritization always produces a warning about ignoring the new priority, but what gets configured is in fact what the user intended. An option to just emit warning every time that the prioritization changes just to make it clear that it happened is obviously unsatisfactory. Therefore, in this patch, remove the warnings. Reported-by: Maksym Yaremchuk Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c index 5f92b1691360..aff6d4f35cd2 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c @@ -168,8 +168,6 @@ static int mlxsw_sp_dcbnl_ieee_setets(struct net_device *dev, static int mlxsw_sp_dcbnl_app_validate(struct net_device *dev, struct dcb_app *app) { - int prio; - if (app->priority >= IEEE_8021QAZ_MAX_TCS) { netdev_err(dev, "APP entry with priority value %u is invalid\n", app->priority); @@ -183,17 +181,6 @@ static int mlxsw_sp_dcbnl_app_validate(struct net_device *dev, app->protocol); return -EINVAL; } - - /* Warn about any DSCP APP entries with the same PID. */ - prio = fls(dcb_ieee_getapp_mask(dev, app)); - if (prio--) { - if (prio < app->priority) - netdev_warn(dev, "Choosing priority %d for DSCP %d in favor of previously-active value of %d\n", - app->priority, app->protocol, prio); - else if (prio > app->priority) - netdev_warn(dev, "Ignoring new priority %d for DSCP %d in favor of current value of %d\n", - app->priority, app->protocol, prio); - } break; case IEEE_8021QAZ_APP_SEL_ETHERTYPE: -- 2.35.1