From: kernel test robot <lkp@intel.com>
To: Hans Westgaard Ry <hans.westgaard.ry@oracle.com>,
linux-rdma@vger.kernel.org
Cc: kbuild-all@lists.01.org, Jack Morgenstein <jackm@dev.mellanox.co.il>
Subject: Re: [PATCH] net/mlx4: Treat VFs fair when handling comm_channel_events
Date: Thu, 15 Apr 2021 22:22:33 +0800 [thread overview]
Message-ID: <202104152216.iDypCEBc-lkp@intel.com> (raw)
In-Reply-To: <1618487022-15770-1-git-send-email-hans.westgaard.ry@oracle.com>
[-- Attachment #1: Type: text/plain, Size: 4392 bytes --]
Hi Hans,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on rdma/for-next]
[also build test WARNING on linus/master v5.12-rc7 next-20210414]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Hans-Westgaard-Ry/net-mlx4-Treat-VFs-fair-when-handling-comm_channel_events/20210415-194619
base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/9de686423c117ccefb2c09e57ab16f84f0434c68
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Hans-Westgaard-Ry/net-mlx4-Treat-VFs-fair-when-handling-comm_channel_events/20210415-194619
git checkout 9de686423c117ccefb2c09e57ab16f84f0434c68
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/mellanox/mlx4/cmd.c: In function 'mlx4_master_comm_channel':
>> drivers/net/ethernet/mellanox/mlx4/cmd.c:2251:6: warning: variable 'prev_slave' set but not used [-Wunused-but-set-variable]
2251 | u32 prev_slave;
| ^~~~~~~~~~
vim +/prev_slave +2251 drivers/net/ethernet/mellanox/mlx4/cmd.c
2230
2231 /* master command processing */
2232 void mlx4_master_comm_channel(struct work_struct *work)
2233 {
2234 struct mlx4_mfunc_master_ctx *master =
2235 container_of(work,
2236 struct mlx4_mfunc_master_ctx,
2237 comm_work);
2238 struct mlx4_mfunc *mfunc =
2239 container_of(master, struct mlx4_mfunc, master);
2240 struct mlx4_priv *priv =
2241 container_of(mfunc, struct mlx4_priv, mfunc);
2242 struct mlx4_dev *dev = &priv->dev;
2243 u32 comm_cmd;
2244 int i, slave;
2245 int toggle;
2246 int served = 0;
2247 int reported = 0;
2248 u32 slt;
2249 u32 lbit_vec[COMM_CHANNEL_BIT_ARRAY_SIZE];
2250 u32 nmbr_bits;
> 2251 u32 prev_slave;
2252 bool first = true;
2253
2254 for (i = 0; i < COMM_CHANNEL_BIT_ARRAY_SIZE; i++)
2255 lbit_vec[i] = be32_to_cpu(master->comm_arm_bit_vector[i]);
2256 nmbr_bits = dev->persist->num_vfs + 1;
2257 if (++priv->next_slave >= nmbr_bits)
2258 priv->next_slave = 0;
2259 slave = priv->next_slave;
2260 while (true) {
2261 slave = find_next_bit((const unsigned long *)&lbit_vec, nmbr_bits, slave);
2262 if (!first && slave >= priv->next_slave) {
2263 break;
2264 } else if (slave == nmbr_bits) {
2265 if (!first)
2266 break;
2267 first = false;
2268 slave = 0;
2269 continue;
2270 }
2271 ++reported;
2272 comm_cmd = swab32(readl(&mfunc->comm[slave].slave_write));
2273 slt = swab32(readl(&mfunc->comm[slave].slave_read)) >> 31;
2274 toggle = comm_cmd >> 31;
2275 if (toggle != slt) {
2276 if (master->slave_state[slave].comm_toggle
2277 != slt) {
2278 pr_info("slave %d out of sync. read toggle %d, state toggle %d. Resynching.\n",
2279 slave, slt,
2280 master->slave_state[slave].comm_toggle);
2281 master->slave_state[slave].comm_toggle =
2282 slt;
2283 }
2284 mlx4_master_do_cmd(dev, slave,
2285 comm_cmd >> 16 & 0xff,
2286 comm_cmd & 0xffff, toggle);
2287 ++served;
2288 }
2289 prev_slave = slave++;
2290 }
2291
2292 if (reported && reported != served)
2293 mlx4_warn(dev, "Got command event with bitmask from %d slaves but %d were served %x %d\n",
2294 reported, served, lbit_vec[0], priv->next_slave);
2295
2296 if (mlx4_ARM_COMM_CHANNEL(dev))
2297 mlx4_warn(dev, "Failed to arm comm channel events\n");
2298 }
2299
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 67446 bytes --]
next prev parent reply other threads:[~2021-04-15 14:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-15 11:43 [PATCH] net/mlx4: Treat VFs fair when handling comm_channel_events Hans Westgaard Ry
2021-04-15 14:02 ` Hans Westgaard Ry
2021-04-15 14:22 ` kernel test robot [this message]
2021-04-18 11:30 ` Leon Romanovsky
2021-04-18 13:17 ` 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=202104152216.iDypCEBc-lkp@intel.com \
--to=lkp@intel.com \
--cc=hans.westgaard.ry@oracle.com \
--cc=jackm@dev.mellanox.co.il \
--cc=kbuild-all@lists.01.org \
--cc=linux-rdma@vger.kernel.org \
/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