Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp4405367ioo; Tue, 31 May 2022 03:52:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4bz/DTelGtD14ryPWYJllekRofovDBK8oljGBNpvsAVnWoojoU29jO5jw5MwDHWXU0bgT X-Received: by 2002:a17:90a:ba11:b0:1df:2d09:1308 with SMTP id s17-20020a17090aba1100b001df2d091308mr27654015pjr.184.1653994350464; Tue, 31 May 2022 03:52:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653994350; cv=none; d=google.com; s=arc-20160816; b=wIWS41b7H7d0dywQBuBUg7/zApN5TQfKembpWeT0kHAHX02WNnnAvGZqEO6VLnHzN9 4cHYAA7jU0gi5ggsLDvc1W67SlhN1d6IjtFQf5uxaV7oNSsK05VCTOt0RYAqE5cHEXqd byCFFGOSGmiQpEv1CM2jBT/rjj/h0AR6Vz5usq3Si+KSWpRIsYBkPdov1ojhZDdLdShr 9uSifMi6Ngro+GDr+oEuv0sz8RNEL5ct85QM58Tyo1VEtsJPuOOPGTt1V1/ORC3U/5nz PFfd+CB1Sxo6gQV4/fPrw5XH8Wen1uuABN0naal9ZuJDkMslOKe1eJWmXNcQjDgPl51I 0ApQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=B0x0zDDB10jo3Q5xaqxGgrAKcMPhjoXzl1Z9hb+xvxw=; b=nZTzKHzuleCfvnJjZtjpdvoncneouPNOY3Of8XbaZLUeDBJA0L4/2cdh8QEdgKDBI0 7u9PRQ4JMz2zUtKvMXJfmkGLaj1UkoruPBOx7GwJSmhP2iGVhZEVfGit/lB0Ea/f57eM /uQ2qdCVCnTvRrULoDihXd4Yr+sCaiUMPiMRC5OhKS0FUInyPHR5VTiJBPHK/1DeOmX3 GFQGBXGtT5X6yHmYdDxLIsITvxxG/+mECwmMR938EREthyHeHocIGKSwW86MC7mYwzel FsUU4WBIAr+nVT96JbfuR+MotCA2vgkL9y7KM+Ybc4QBiqPZNrLdyEotwCxXHl0ALivC TjBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vQWzh9ww; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mz16-20020a17090b379000b001dfac44cd1esi2206976pjb.17.2022.05.31.03.52.16; Tue, 31 May 2022 03:52:30 -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=@kernel.org header.s=k20201202 header.b=vQWzh9ww; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242674AbiE3Ob0 (ORCPT + 99 others); Mon, 30 May 2022 10:31:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241984AbiE3OSQ (ORCPT ); Mon, 30 May 2022 10:18:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 219029CF6B; Mon, 30 May 2022 06:48:50 -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 5220FB80DA7; Mon, 30 May 2022 13:48:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC3BBC36AE3; Mon, 30 May 2022 13:48:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653918500; bh=+/FYCLGsRVRHNZXvwv77uB0pWt/M78vjProgDG0PYuM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vQWzh9wwM3Guse3V1zszKi3ZShmsYzIKKuDTv7NvsRayXuZiwHe4X5rGOx5RV+RGo N3Hc73IyCVSYne5hpdFuFPvpFP7Y+Ss1UdIl5Hd6uvzhlX/7Z/ECrTf8ho/yTJw8SJ DIhbRcIzb8leBW0ciQvTQm12b8qetrtjPtfdO6CjE4lZ62zG5ZuUtM5gQ7lruO+d6Z yMtWv2pMz2Kkh+JxofuSK1D9QVbnlys25mzIdkyVaBRHXKd5Bym+DEmKKcdyVSguOe gCNU/SB18zAvagMk47qs6G7Ivo4LFUql7l5fTqvwBvy8a/t0P8w2gwjf+33XBMEm7q JVYepH2OHPDSw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Petr Machata , Maksym Yaremchuk , Ido Schimmel , "David S . Miller" , Sasha Levin , edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 30/55] mlxsw: spectrum_dcb: Do not warn about priority changes Date: Mon, 30 May 2022 09:46:36 -0400 Message-Id: <20220530134701.1935933-30-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220530134701.1935933-1-sashal@kernel.org> References: <20220530134701.1935933-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 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: 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 21296fa7f7fb..bf51ed94952c 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c @@ -227,8 +227,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); @@ -242,17 +240,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