All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: kernel test robot <lkp@intel.com>
Cc: netdev@vger.kernel.org, Eli Cohen <elic@nvidia.com>,
	kbuild-all@lists.01.org, kvm@vger.kernel.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [mst-vhost:vhost 30/44] drivers/vdpa/mlx5/net/mlx5_vnet.c:1247:23: sparse: sparse: cast to restricted __le16
Date: Sun, 9 Jan 2022 10:55:59 -0500	[thread overview]
Message-ID: <20220109105546-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <202201082258.aKRHnaJX-lkp@intel.com>

On Sat, Jan 08, 2022 at 10:48:34PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost
> head:   008842b2060c14544ff452483ffd2241d145c7b2
> commit: 7620d51af29aa1c5d32150db2ac4b6187ef8af3a [30/44] vdpa/mlx5: Support configuring max data virtqueue
> config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20220108/202201082258.aKRHnaJX-lkp@intel.com/config)
> compiler: powerpc-linux-gcc (GCC) 11.2.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # apt-get install sparse
>         # sparse version: v0.6.4-dirty
>         # https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git/commit/?id=7620d51af29aa1c5d32150db2ac4b6187ef8af3a
>         git remote add mst-vhost https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git
>         git fetch --no-tags mst-vhost vhost
>         git checkout 7620d51af29aa1c5d32150db2ac4b6187ef8af3a
>         # save the config file to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/vdpa/mlx5/
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> 
> sparse warnings: (new ones prefixed by >>)
> >> drivers/vdpa/mlx5/net/mlx5_vnet.c:1247:23: sparse: sparse: cast to restricted __le16
> >> drivers/vdpa/mlx5/net/mlx5_vnet.c:1247:23: sparse: sparse: cast from restricted __virtio16
> 
> vim +1247 drivers/vdpa/mlx5/net/mlx5_vnet.c

Eli? I sent a patch for this - ack?

>   1232	
>   1233	static int create_rqt(struct mlx5_vdpa_net *ndev)
>   1234	{
>   1235		__be32 *list;
>   1236		int max_rqt;
>   1237		void *rqtc;
>   1238		int inlen;
>   1239		void *in;
>   1240		int i, j;
>   1241		int err;
>   1242		int num;
>   1243	
>   1244		if (!(ndev->mvdev.actual_features & BIT_ULL(VIRTIO_NET_F_MQ)))
>   1245			num = 1;
>   1246		else
> > 1247			num = le16_to_cpu(ndev->config.max_virtqueue_pairs);
>   1248	
>   1249		max_rqt = min_t(int, roundup_pow_of_two(num),
>   1250				1 << MLX5_CAP_GEN(ndev->mvdev.mdev, log_max_rqt_size));
>   1251		if (max_rqt < 1)
>   1252			return -EOPNOTSUPP;
>   1253	
>   1254		inlen = MLX5_ST_SZ_BYTES(create_rqt_in) + max_rqt * MLX5_ST_SZ_BYTES(rq_num);
>   1255		in = kzalloc(inlen, GFP_KERNEL);
>   1256		if (!in)
>   1257			return -ENOMEM;
>   1258	
>   1259		MLX5_SET(create_rqt_in, in, uid, ndev->mvdev.res.uid);
>   1260		rqtc = MLX5_ADDR_OF(create_rqt_in, in, rqt_context);
>   1261	
>   1262		MLX5_SET(rqtc, rqtc, list_q_type, MLX5_RQTC_LIST_Q_TYPE_VIRTIO_NET_Q);
>   1263		MLX5_SET(rqtc, rqtc, rqt_max_size, max_rqt);
>   1264		list = MLX5_ADDR_OF(rqtc, rqtc, rq_num[0]);
>   1265		for (i = 0, j = 0; i < max_rqt; i++, j += 2)
>   1266			list[i] = cpu_to_be32(ndev->vqs[j % (2 * num)].virtq_id);
>   1267	
>   1268		MLX5_SET(rqtc, rqtc, rqt_actual_size, max_rqt);
>   1269		err = mlx5_vdpa_create_rqt(&ndev->mvdev, in, inlen, &ndev->res.rqtn);
>   1270		kfree(in);
>   1271		if (err)
>   1272			return err;
>   1273	
>   1274		return 0;
>   1275	}
>   1276	
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: kernel test robot <lkp@intel.com>
Cc: Eli Cohen <elic@nvidia.com>,
	kbuild-all@lists.01.org, kvm@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	netdev@vger.kernel.org
Subject: Re: [mst-vhost:vhost 30/44] drivers/vdpa/mlx5/net/mlx5_vnet.c:1247:23: sparse: sparse: cast to restricted __le16
Date: Sun, 9 Jan 2022 10:55:59 -0500	[thread overview]
Message-ID: <20220109105546-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <202201082258.aKRHnaJX-lkp@intel.com>

On Sat, Jan 08, 2022 at 10:48:34PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost
> head:   008842b2060c14544ff452483ffd2241d145c7b2
> commit: 7620d51af29aa1c5d32150db2ac4b6187ef8af3a [30/44] vdpa/mlx5: Support configuring max data virtqueue
> config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20220108/202201082258.aKRHnaJX-lkp@intel.com/config)
> compiler: powerpc-linux-gcc (GCC) 11.2.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # apt-get install sparse
>         # sparse version: v0.6.4-dirty
>         # https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git/commit/?id=7620d51af29aa1c5d32150db2ac4b6187ef8af3a
>         git remote add mst-vhost https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git
>         git fetch --no-tags mst-vhost vhost
>         git checkout 7620d51af29aa1c5d32150db2ac4b6187ef8af3a
>         # save the config file to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/vdpa/mlx5/
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> 
> sparse warnings: (new ones prefixed by >>)
> >> drivers/vdpa/mlx5/net/mlx5_vnet.c:1247:23: sparse: sparse: cast to restricted __le16
> >> drivers/vdpa/mlx5/net/mlx5_vnet.c:1247:23: sparse: sparse: cast from restricted __virtio16
> 
> vim +1247 drivers/vdpa/mlx5/net/mlx5_vnet.c

Eli? I sent a patch for this - ack?

>   1232	
>   1233	static int create_rqt(struct mlx5_vdpa_net *ndev)
>   1234	{
>   1235		__be32 *list;
>   1236		int max_rqt;
>   1237		void *rqtc;
>   1238		int inlen;
>   1239		void *in;
>   1240		int i, j;
>   1241		int err;
>   1242		int num;
>   1243	
>   1244		if (!(ndev->mvdev.actual_features & BIT_ULL(VIRTIO_NET_F_MQ)))
>   1245			num = 1;
>   1246		else
> > 1247			num = le16_to_cpu(ndev->config.max_virtqueue_pairs);
>   1248	
>   1249		max_rqt = min_t(int, roundup_pow_of_two(num),
>   1250				1 << MLX5_CAP_GEN(ndev->mvdev.mdev, log_max_rqt_size));
>   1251		if (max_rqt < 1)
>   1252			return -EOPNOTSUPP;
>   1253	
>   1254		inlen = MLX5_ST_SZ_BYTES(create_rqt_in) + max_rqt * MLX5_ST_SZ_BYTES(rq_num);
>   1255		in = kzalloc(inlen, GFP_KERNEL);
>   1256		if (!in)
>   1257			return -ENOMEM;
>   1258	
>   1259		MLX5_SET(create_rqt_in, in, uid, ndev->mvdev.res.uid);
>   1260		rqtc = MLX5_ADDR_OF(create_rqt_in, in, rqt_context);
>   1261	
>   1262		MLX5_SET(rqtc, rqtc, list_q_type, MLX5_RQTC_LIST_Q_TYPE_VIRTIO_NET_Q);
>   1263		MLX5_SET(rqtc, rqtc, rqt_max_size, max_rqt);
>   1264		list = MLX5_ADDR_OF(rqtc, rqtc, rq_num[0]);
>   1265		for (i = 0, j = 0; i < max_rqt; i++, j += 2)
>   1266			list[i] = cpu_to_be32(ndev->vqs[j % (2 * num)].virtq_id);
>   1267	
>   1268		MLX5_SET(rqtc, rqtc, rqt_actual_size, max_rqt);
>   1269		err = mlx5_vdpa_create_rqt(&ndev->mvdev, in, inlen, &ndev->res.rqtn);
>   1270		kfree(in);
>   1271		if (err)
>   1272			return err;
>   1273	
>   1274		return 0;
>   1275	}
>   1276	
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org


WARNING: multiple messages have this Message-ID (diff)
From: Michael S. Tsirkin <mst@redhat.com>
To: kbuild-all@lists.01.org
Subject: Re: [mst-vhost:vhost 30/44] drivers/vdpa/mlx5/net/mlx5_vnet.c:1247:23: sparse: sparse: cast to restricted __le16
Date: Sun, 09 Jan 2022 10:55:59 -0500	[thread overview]
Message-ID: <20220109105546-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <202201082258.aKRHnaJX-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 3479 bytes --]

On Sat, Jan 08, 2022 at 10:48:34PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost
> head:   008842b2060c14544ff452483ffd2241d145c7b2
> commit: 7620d51af29aa1c5d32150db2ac4b6187ef8af3a [30/44] vdpa/mlx5: Support configuring max data virtqueue
> config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20220108/202201082258.aKRHnaJX-lkp(a)intel.com/config)
> compiler: powerpc-linux-gcc (GCC) 11.2.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # apt-get install sparse
>         # sparse version: v0.6.4-dirty
>         # https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git/commit/?id=7620d51af29aa1c5d32150db2ac4b6187ef8af3a
>         git remote add mst-vhost https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git
>         git fetch --no-tags mst-vhost vhost
>         git checkout 7620d51af29aa1c5d32150db2ac4b6187ef8af3a
>         # save the config file to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/vdpa/mlx5/
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> 
> sparse warnings: (new ones prefixed by >>)
> >> drivers/vdpa/mlx5/net/mlx5_vnet.c:1247:23: sparse: sparse: cast to restricted __le16
> >> drivers/vdpa/mlx5/net/mlx5_vnet.c:1247:23: sparse: sparse: cast from restricted __virtio16
> 
> vim +1247 drivers/vdpa/mlx5/net/mlx5_vnet.c

Eli? I sent a patch for this - ack?

>   1232	
>   1233	static int create_rqt(struct mlx5_vdpa_net *ndev)
>   1234	{
>   1235		__be32 *list;
>   1236		int max_rqt;
>   1237		void *rqtc;
>   1238		int inlen;
>   1239		void *in;
>   1240		int i, j;
>   1241		int err;
>   1242		int num;
>   1243	
>   1244		if (!(ndev->mvdev.actual_features & BIT_ULL(VIRTIO_NET_F_MQ)))
>   1245			num = 1;
>   1246		else
> > 1247			num = le16_to_cpu(ndev->config.max_virtqueue_pairs);
>   1248	
>   1249		max_rqt = min_t(int, roundup_pow_of_two(num),
>   1250				1 << MLX5_CAP_GEN(ndev->mvdev.mdev, log_max_rqt_size));
>   1251		if (max_rqt < 1)
>   1252			return -EOPNOTSUPP;
>   1253	
>   1254		inlen = MLX5_ST_SZ_BYTES(create_rqt_in) + max_rqt * MLX5_ST_SZ_BYTES(rq_num);
>   1255		in = kzalloc(inlen, GFP_KERNEL);
>   1256		if (!in)
>   1257			return -ENOMEM;
>   1258	
>   1259		MLX5_SET(create_rqt_in, in, uid, ndev->mvdev.res.uid);
>   1260		rqtc = MLX5_ADDR_OF(create_rqt_in, in, rqt_context);
>   1261	
>   1262		MLX5_SET(rqtc, rqtc, list_q_type, MLX5_RQTC_LIST_Q_TYPE_VIRTIO_NET_Q);
>   1263		MLX5_SET(rqtc, rqtc, rqt_max_size, max_rqt);
>   1264		list = MLX5_ADDR_OF(rqtc, rqtc, rq_num[0]);
>   1265		for (i = 0, j = 0; i < max_rqt; i++, j += 2)
>   1266			list[i] = cpu_to_be32(ndev->vqs[j % (2 * num)].virtq_id);
>   1267	
>   1268		MLX5_SET(rqtc, rqtc, rqt_actual_size, max_rqt);
>   1269		err = mlx5_vdpa_create_rqt(&ndev->mvdev, in, inlen, &ndev->res.rqtn);
>   1270		kfree(in);
>   1271		if (err)
>   1272			return err;
>   1273	
>   1274		return 0;
>   1275	}
>   1276	
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

  parent reply	other threads:[~2022-01-09 15:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-08 14:48 [mst-vhost:vhost 30/44] drivers/vdpa/mlx5/net/mlx5_vnet.c:1247:23: sparse: sparse: cast to restricted __le16 kernel test robot
2022-01-08 14:48 ` kernel test robot
2022-01-08 14:48 ` kernel test robot
2022-01-08 17:41 ` Michael S. Tsirkin
2022-01-08 17:41   ` Michael S. Tsirkin
2022-01-08 17:41   ` Michael S. Tsirkin
2022-01-09 15:55 ` Michael S. Tsirkin [this message]
2022-01-09 15:55   ` Michael S. Tsirkin
2022-01-09 15:55   ` Michael S. Tsirkin

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=20220109105546-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=elic@nvidia.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kvm@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.