From: kernel test robot <lkp@intel.com>
To: Tariq Toukan <tariqt@nvidia.com>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
netdev@vger.kernel.org, Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
Tariq Toukan <tariqt@nvidia.com>, Mark Bloch <mbloch@nvidia.com>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
Gal Pressman <gal@nvidia.com>, Moshe Shemesh <moshe@nvidia.com>,
Carolina Jubran <cjubran@nvidia.com>
Subject: Re: [PATCH net-next 3/7] net/mlx5: Improve QoS error messages with actual depth values
Date: Tue, 23 Sep 2025 09:58:02 +0800 [thread overview]
Message-ID: <202509230959.thBtcZnc-lkp@intel.com> (raw)
In-Reply-To: <1758531671-819655-4-git-send-email-tariqt@nvidia.com>
Hi Tariq,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 312e6f7676e63bbb9b81e5c68e580a9f776cc6f0]
url: https://github.com/intel-lab-lkp/linux/commits/Tariq-Toukan/net-mlx5-HWS-Generalize-complex-matchers/20250922-170716
base: 312e6f7676e63bbb9b81e5c68e580a9f776cc6f0
patch link: https://lore.kernel.org/r/1758531671-819655-4-git-send-email-tariqt%40nvidia.com
patch subject: [PATCH net-next 3/7] net/mlx5: Improve QoS error messages with actual depth values
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20250923/202509230959.thBtcZnc-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250923/202509230959.thBtcZnc-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509230959.thBtcZnc-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c:974:4: warning: 'snprintf' will always be truncated; specified size is 80, but format string expands to at least 82 [-Wformat-truncation]
974 | NL_SET_ERR_MSG_FMT_MOD(extack,
| ^
include/linux/netlink.h:131:2: note: expanded from macro 'NL_SET_ERR_MSG_FMT_MOD'
131 | NL_SET_ERR_MSG_FMT((extack), KBUILD_MODNAME ": " fmt, ##args)
| ^
include/linux/netlink.h:116:6: note: expanded from macro 'NL_SET_ERR_MSG_FMT'
116 | if (snprintf(__extack->_msg_buf, NETLINK_MAX_FMTMSG_LEN, \
| ^
drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c:1448:3: warning: 'snprintf' will always be truncated; specified size is 80, but format string expands to at least 82 [-Wformat-truncation]
1448 | NL_SET_ERR_MSG_FMT_MOD(extack,
| ^
include/linux/netlink.h:131:2: note: expanded from macro 'NL_SET_ERR_MSG_FMT_MOD'
131 | NL_SET_ERR_MSG_FMT((extack), KBUILD_MODNAME ": " fmt, ##args)
| ^
include/linux/netlink.h:116:6: note: expanded from macro 'NL_SET_ERR_MSG_FMT'
116 | if (snprintf(__extack->_msg_buf, NETLINK_MAX_FMTMSG_LEN, \
| ^
2 warnings generated.
vim +/snprintf +974 drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c
955
956 static int
957 esw_qos_vport_tc_enable(struct mlx5_vport *vport, enum sched_node_type type,
958 struct netlink_ext_ack *extack)
959 {
960 struct mlx5_esw_sched_node *vport_node = vport->qos.sched_node;
961 struct mlx5_esw_sched_node *parent = vport_node->parent;
962 int err;
963
964 if (type == SCHED_NODE_TYPE_TC_ARBITER_TSAR) {
965 int new_level, max_level;
966
967 /* Increase the parent's level by 2 to account for both the
968 * TC arbiter and the vports TC scheduling element.
969 */
970 new_level = (parent ? parent->level : 2) + 2;
971 max_level = 1 << MLX5_CAP_QOS(vport_node->esw->dev,
972 log_esw_max_sched_depth);
973 if (new_level > max_level) {
> 974 NL_SET_ERR_MSG_FMT_MOD(extack,
975 "TC arbitration on leafs is not supported beyond max scheduling depth %d",
976 max_level);
977 return -EOPNOTSUPP;
978 }
979 }
980
981 esw_assert_qos_lock_held(vport->dev->priv.eswitch);
982
983 if (type == SCHED_NODE_TYPE_RATE_LIMITER)
984 err = esw_qos_create_rate_limit_element(vport_node, extack);
985 else
986 err = esw_qos_tc_arbiter_scheduling_setup(vport_node, extack);
987 if (err)
988 return err;
989
990 /* Rate limiters impact multiple nodes not directly connected to them
991 * and are not direct members of the QoS hierarchy.
992 * Unlink it from the parent to reflect that.
993 */
994 if (type == SCHED_NODE_TYPE_RATE_LIMITER) {
995 list_del_init(&vport_node->entry);
996 vport_node->level = 0;
997 }
998
999 err = esw_qos_create_vport_tc_sched_elements(vport, type, extack);
1000 if (err)
1001 goto err_sched_nodes;
1002
1003 return 0;
1004
1005 err_sched_nodes:
1006 if (type == SCHED_NODE_TYPE_RATE_LIMITER) {
1007 esw_qos_node_destroy_sched_element(vport_node, NULL);
1008 esw_qos_node_attach_to_parent(vport_node);
1009 } else {
1010 esw_qos_tc_arbiter_scheduling_teardown(vport_node, NULL);
1011 }
1012 return err;
1013 }
1014
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-09-23 1:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-22 9:01 [PATCH net-next 0/7] net/mlx5: misc changes 2025-09-22 Tariq Toukan
2025-09-22 9:01 ` [PATCH net-next 1/7] net/mlx5: HWS, Generalize complex matchers Tariq Toukan
2025-09-24 16:17 ` Simon Horman
2025-09-24 18:07 ` Vlad Dogaru
2025-09-22 9:01 ` [PATCH net-next 2/7] net/mlx5e: Prevent entering switchdev mode with inconsistent netns Tariq Toukan
2025-09-22 9:01 ` [PATCH net-next 3/7] net/mlx5: Improve QoS error messages with actual depth values Tariq Toukan
2025-09-23 0:06 ` Jakub Kicinski
2025-09-23 1:58 ` kernel test robot [this message]
2025-09-22 9:01 ` [PATCH net-next 4/7] net/mlx5e: Remove unused mdev param from RSS indir init Tariq Toukan
2025-09-22 9:01 ` [PATCH net-next 5/7] net/mlx5e: Introduce mlx5e_rss_init_params Tariq Toukan
2025-09-22 9:01 ` [PATCH net-next 6/7] net/mlx5e: Introduce mlx5e_rss_params for RSS configuration Tariq Toukan
2025-09-22 9:01 ` [PATCH net-next 7/7] net/mlx5e: Use extack in set rxfh callback Tariq Toukan
2025-09-23 4:06 ` kernel test robot
2025-09-24 16:21 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202509230959.thBtcZnc-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=cjubran@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mbloch@nvidia.com \
--cc=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).