netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Tariq Toukan <tariqt@nvidia.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>
Cc: oe-kbuild-all@lists.linux.dev, netdev@vger.kernel.org,
	Saeed Mahameed <saeedm@nvidia.com>, Gal Pressman <gal@nvidia.com>,
	Leon Romanovsky <leonro@nvidia.com>,
	Jiri Pirko <jiri@resnulli.us>,
	Carolina Jubran <cjubran@nvidia.com>,
	Cosmin Ratiu <cratiu@nvidia.com>,
	Tariq Toukan <tariqt@nvidia.com>
Subject: Re: [PATCH net-next 3/8] devlink: Extend devlink rate API with traffic classes bandwidth management
Date: Thu, 14 Nov 2024 08:46:46 +0800	[thread overview]
Message-ID: <202411140820.ybeyWmcE-lkp@intel.com> (raw)
In-Reply-To: <20241113180034.714102-4-tariqt@nvidia.com>

Hi Tariq,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Tariq-Toukan/net-mlx5-DR-expand-SWS-STE-callbacks-and-consolidate-common-structs/20241114-022031
base:   net-next/main
patch link:    https://lore.kernel.org/r/20241113180034.714102-4-tariqt%40nvidia.com
patch subject: [PATCH net-next 3/8] devlink: Extend devlink rate API with traffic classes bandwidth management
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20241114/202411140820.ybeyWmcE-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241114/202411140820.ybeyWmcE-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/202411140820.ybeyWmcE-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from net/devlink/devl_internal.h:14,
                    from net/devlink/rate.c:7:
   include/net/devlink.h:121:19: error: 'IEEE_8021QAZ_MAX_TCS' undeclared here (not in a function)
     121 |         u32 tc_bw[IEEE_8021QAZ_MAX_TCS];
         |                   ^~~~~~~~~~~~~~~~~~~~
   net/devlink/rate.c: In function 'devlink_nl_rate_set':
>> net/devlink/rate.c:335:13: warning: unused variable 'tc_bw' [-Wunused-variable]
     335 |         u32 tc_bw[IEEE_8021QAZ_MAX_TCS];
         |             ^~~~~


vim +/tc_bw +335 net/devlink/rate.c

   329	
   330	static int devlink_nl_rate_set(struct devlink_rate *devlink_rate,
   331				       const struct devlink_ops *ops,
   332				       struct genl_info *info)
   333	{
   334		struct nlattr *nla_parent, **attrs = info->attrs;
 > 335		u32 tc_bw[IEEE_8021QAZ_MAX_TCS];
   336		int err = -EOPNOTSUPP;
   337		u32 priority;
   338		u32 weight;
   339		u64 rate;
   340	
   341		if (attrs[DEVLINK_ATTR_RATE_TX_SHARE]) {
   342			rate = nla_get_u64(attrs[DEVLINK_ATTR_RATE_TX_SHARE]);
   343			if (devlink_rate_is_leaf(devlink_rate))
   344				err = ops->rate_leaf_tx_share_set(devlink_rate, devlink_rate->priv,
   345								  rate, info->extack);
   346			else if (devlink_rate_is_node(devlink_rate))
   347				err = ops->rate_node_tx_share_set(devlink_rate, devlink_rate->priv,
   348								  rate, info->extack);
   349			if (err)
   350				return err;
   351			devlink_rate->tx_share = rate;
   352		}
   353	
   354		if (attrs[DEVLINK_ATTR_RATE_TX_MAX]) {
   355			rate = nla_get_u64(attrs[DEVLINK_ATTR_RATE_TX_MAX]);
   356			if (devlink_rate_is_leaf(devlink_rate))
   357				err = ops->rate_leaf_tx_max_set(devlink_rate, devlink_rate->priv,
   358								rate, info->extack);
   359			else if (devlink_rate_is_node(devlink_rate))
   360				err = ops->rate_node_tx_max_set(devlink_rate, devlink_rate->priv,
   361								rate, info->extack);
   362			if (err)
   363				return err;
   364			devlink_rate->tx_max = rate;
   365		}
   366	
   367		if (attrs[DEVLINK_ATTR_RATE_TX_PRIORITY]) {
   368			priority = nla_get_u32(attrs[DEVLINK_ATTR_RATE_TX_PRIORITY]);
   369			if (devlink_rate_is_leaf(devlink_rate))
   370				err = ops->rate_leaf_tx_priority_set(devlink_rate, devlink_rate->priv,
   371								     priority, info->extack);
   372			else if (devlink_rate_is_node(devlink_rate))
   373				err = ops->rate_node_tx_priority_set(devlink_rate, devlink_rate->priv,
   374								     priority, info->extack);
   375	
   376			if (err)
   377				return err;
   378			devlink_rate->tx_priority = priority;
   379		}
   380	
   381		if (attrs[DEVLINK_ATTR_RATE_TX_WEIGHT]) {
   382			weight = nla_get_u32(attrs[DEVLINK_ATTR_RATE_TX_WEIGHT]);
   383			if (devlink_rate_is_leaf(devlink_rate))
   384				err = ops->rate_leaf_tx_weight_set(devlink_rate, devlink_rate->priv,
   385								   weight, info->extack);
   386			else if (devlink_rate_is_node(devlink_rate))
   387				err = ops->rate_node_tx_weight_set(devlink_rate, devlink_rate->priv,
   388								   weight, info->extack);
   389	
   390			if (err)
   391				return err;
   392			devlink_rate->tx_weight = weight;
   393		}
   394	
   395		if (attrs[DEVLINK_ATTR_RATE_TC_BW]) {
   396			struct nlattr *nla_tc_bw = attrs[DEVLINK_ATTR_RATE_TC_BW];
   397			struct nlattr *tb[DEVLINK_ATTR_RATE_TC_7_BW + 1];
   398			int i;
   399	
   400			err = nla_parse_nested(tb, DEVLINK_ATTR_RATE_TC_7_BW, nla_tc_bw,
   401					       devlink_dl_rate_tc_bw_nl_policy, info->extack);
   402			if (err)
   403				return err;
   404	
   405			for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
   406				if (tb[DEVLINK_ATTR_RATE_TC_0_BW + i])
   407					tc_bw[i] = nla_get_u32(tb[DEVLINK_ATTR_RATE_TC_0_BW + i]);
   408				else
   409					tc_bw[i] = 0;
   410			}
   411	
   412			if (devlink_rate_is_leaf(devlink_rate))
   413				err = ops->rate_leaf_tc_bw_set(devlink_rate, devlink_rate->priv,
   414							       tc_bw, info->extack);
   415			else if (devlink_rate_is_node(devlink_rate))
   416				err = ops->rate_node_tc_bw_set(devlink_rate, devlink_rate->priv,
   417							       tc_bw, info->extack);
   418	
   419			if (err)
   420				return err;
   421	
   422			memcpy(devlink_rate->tc_bw, tc_bw, sizeof(tc_bw));
   423		}
   424	
   425		nla_parent = attrs[DEVLINK_ATTR_RATE_PARENT_NODE_NAME];
   426		if (nla_parent) {
   427			err = devlink_nl_rate_parent_node_set(devlink_rate, info,
   428							      nla_parent);
   429			if (err)
   430				return err;
   431		}
   432	
   433		return 0;
   434	}
   435	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2024-11-14  0:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-13 18:00 [PATCH net-next 0/8] net/mlx5: ConnectX-8 SW Steering + Rate management on traffic classes Tariq Toukan
2024-11-13 18:00 ` [PATCH net-next 1/8] net/mlx5: DR, expand SWS STE callbacks and consolidate common structs Tariq Toukan
2024-11-13 18:00 ` [PATCH net-next 2/8] net/mlx5: DR, add support for ConnectX-8 steering Tariq Toukan
2024-11-13 18:00 ` [PATCH net-next 3/8] devlink: Extend devlink rate API with traffic classes bandwidth management Tariq Toukan
2024-11-13 23:22   ` kernel test robot
2024-11-14  0:05   ` kernel test robot
2024-11-14  0:46   ` kernel test robot [this message]
2024-11-14  9:48   ` Jiri Pirko
2024-11-13 18:00 ` [PATCH net-next 4/8] net/mlx5:Add no-op implementation for setting tc-bw on rate objects Tariq Toukan
2024-11-13 18:00 ` [PATCH net-next 5/8] net/mlx5: Add support for new scheduling elements Tariq Toukan
2024-11-13 18:00 ` [PATCH net-next 6/8] net/mlx5: Add support for setting tc-bw on nodes Tariq Toukan
2024-11-13 18:00 ` [PATCH net-next 7/8] net/mlx5: Add traffic class scheduling support for vport QoS Tariq Toukan
2024-11-13 18:00 ` [PATCH net-next 8/8] net/mlx5: Manage TC arbiter nodes and provide full support for tc-bw Tariq Toukan

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=202411140820.ybeyWmcE-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=cjubran@nvidia.com \
    --cc=cratiu@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=leonro@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).