[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202204190335.6x3ZxWPL-lkp@intel.com>
Date: Tue, 19 Apr 2022 03:03:51 +0800
From: kernel test robot <lkp@...el.com>
To: Eli Cohen <elic@...dia.com>, mst@...hat.com, jasowang@...hat.com
Cc: kbuild-all@...ts.01.org, virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, si-wei.liu@...cle.com,
Eli Cohen <elic@...dia.com>
Subject: Re: [PATCH v2 2/2] vdpa/mlx5: Add support for reading descriptor
statistics
Hi Eli,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.18-rc3 next-20220414]
[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/intel-lab-lkp/linux/commits/Eli-Cohen/Show-statistics-for-a-vdpa-device/20220412-212129
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ce522ba9ef7e2d9fb22a39eb3371c0c64e2a433e
config: i386-randconfig-s001-20220418 (https://download.01.org/0day-ci/archive/20220419/202204190335.6x3ZxWPL-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-19) 11.2.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/intel-lab-lkp/linux/commit/3d9eba4c8d59370c862469b93e157cd72a49d6ad
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Eli-Cohen/Show-statistics-for-a-vdpa-device/20220412-212129
git checkout 3d9eba4c8d59370c862469b93e157cd72a49d6ad
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/vdpa/mlx5/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/vdpa/mlx5/net/mlx5_vnet.c:2583:19: sparse: sparse: cast to restricted __le16
>> drivers/vdpa/mlx5/net/mlx5_vnet.c:2583:19: sparse: sparse: cast from restricted __virtio16
vim +2583 drivers/vdpa/mlx5/net/mlx5_vnet.c
2542
2543 static int mlx5_vdpa_get_vendor_vq_stats(struct vdpa_device *vdev, u16 idx,
2544 struct sk_buff *msg,
2545 struct netlink_ext_ack *extack)
2546 {
2547 struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev);
2548 struct mlx5_vdpa_net *ndev = to_mlx5_vdpa_ndev(mvdev);
2549 struct mlx5_vdpa_virtqueue *mvq;
2550 struct mlx5_control_vq *cvq;
2551 u64 received_desc;
2552 u64 completed_desc;
2553 int err = 0;
2554 u16 max_vqp;
2555
2556 mutex_lock(&ndev->numq_lock);
2557 if (!is_index_valid(mvdev, idx)) {
2558 NL_SET_ERR_MSG_MOD(extack, "virtqueue index is not valid");
2559 err = -EINVAL;
2560 goto out_err;
2561 }
2562
2563 if (idx == ctrl_vq_idx(mvdev)) {
2564 cvq = &mvdev->cvq;
2565 received_desc = cvq->received_desc;
2566 completed_desc = cvq->completed_desc;
2567 goto out;
2568 }
2569
2570 mvq = &ndev->vqs[idx];
2571 err = counter_set_query(ndev, mvq, &received_desc, &completed_desc);
2572 if (err) {
2573 NL_SET_ERR_MSG_MOD(extack, "failed to query hardware");
2574 goto out_err;
2575 }
2576
2577 out:
2578 err = -EMSGSIZE;
2579 if (nla_put_u64_64bit(msg, VDPA_ATTR_DEV_NEGOTIATED_FEATURES,
2580 mvdev->actual_features, VDPA_ATTR_PAD))
2581 goto out_err;
2582
> 2583 max_vqp = le16_to_cpu(ndev->config.max_virtqueue_pairs);
2584 if (nla_put_u16(msg, VDPA_ATTR_DEV_NET_CFG_MAX_VQP, max_vqp))
2585 goto out_err;
2586
2587 if (nla_put_string(msg, VDPA_ATTR_DEV_VENDOR_ATTR_NAME, "received_desc"))
2588 goto out_err;
2589
2590 if (nla_put_u64_64bit(msg, VDPA_ATTR_DEV_VENDOR_ATTR_VALUE, received_desc,
2591 VDPA_ATTR_PAD))
2592 goto out_err;
2593
2594 if (nla_put_string(msg, VDPA_ATTR_DEV_VENDOR_ATTR_NAME, "completed_desc"))
2595 goto out_err;
2596
2597 if (nla_put_u64_64bit(msg, VDPA_ATTR_DEV_VENDOR_ATTR_VALUE, completed_desc,
2598 VDPA_ATTR_PAD))
2599 goto out_err;
2600
2601 err = 0;
2602 out_err:
2603 mutex_unlock(&ndev->numq_lock);
2604 return err;
2605 }
2606
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists