[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202509230959.thBtcZnc-lkp@intel.com>
Date: Tue, 23 Sep 2025 09:58:02 +0800
From: kernel test robot <lkp@...el.com>
To: Tariq Toukan <tariqt@...dia.com>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
netdev@...r.kernel.org, Saeed Mahameed <saeedm@...dia.com>,
Leon Romanovsky <leon@...nel.org>, Tariq Toukan <tariqt@...dia.com>,
Mark Bloch <mbloch@...dia.com>, linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org, Gal Pressman <gal@...dia.com>,
Moshe Shemesh <moshe@...dia.com>,
Carolina Jubran <cjubran@...dia.com>
Subject: Re: [PATCH net-next 3/7] net/mlx5: Improve QoS error messages with
actual depth values
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@...el.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
Powered by blists - more mailing lists