netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Xuan Zhuo <xuanzhuo@linux.alibaba.com>, netdev@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	virtualization@lists.linux.dev, Zhu Yanjun <yanjun.zhu@linux.dev>
Subject: Re: [PATCH net-next v1 4/6] virtio_net: stats map include driver stats
Date: Tue, 2 Jan 2024 10:17:55 +0800	[thread overview]
Message-ID: <202401020928.JpmKXuhu-lkp@intel.com> (raw)
In-Reply-To: <20231226073103.116153-5-xuanzhuo@linux.alibaba.com>

Hi Xuan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on mst-vhost/linux-next]
[also build test WARNING on linus/master v6.7-rc8]
[cannot apply to net-next/main horms-ipvs/master next-20231222]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Xuan-Zhuo/virtio_net-introduce-device-stats-feature-and-structures/20231226-153227
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
patch link:    https://lore.kernel.org/r/20231226073103.116153-5-xuanzhuo%40linux.alibaba.com
patch subject: [PATCH net-next v1 4/6] virtio_net: stats map include driver stats
config: x86_64-randconfig-121-20240101 (https://download.01.org/0day-ci/archive/20240102/202401020928.JpmKXuhu-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240102/202401020928.JpmKXuhu-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/202401020928.JpmKXuhu-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/net/virtio_net.c:3416:83: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted __virtio64 [usertype] val @@     got unsigned long long const [usertype] @@
   drivers/net/virtio_net.c:3416:83: sparse:     expected restricted __virtio64 [usertype] val
   drivers/net/virtio_net.c:3416:83: sparse:     got unsigned long long const [usertype]
   drivers/net/virtio_net.c:3500:52: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted __virtio16 [usertype] val @@     got restricted __le16 [usertype] vq_index @@
   drivers/net/virtio_net.c:3500:52: sparse:     expected restricted __virtio16 [usertype] val
   drivers/net/virtio_net.c:3500:52: sparse:     got restricted __le16 [usertype] vq_index
   drivers/net/virtio_net.c:3498:81: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted __virtio16 [usertype] val @@     got restricted __le16 [usertype] size @@
   drivers/net/virtio_net.c:3498:81: sparse:     expected restricted __virtio16 [usertype] val
   drivers/net/virtio_net.c:3498:81: sparse:     got restricted __le16 [usertype] size
   drivers/net/virtio_net.c:3549:82: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted __virtio64 [usertype] val @@     got restricted __le64 [assigned] [usertype] v @@
   drivers/net/virtio_net.c:3549:82: sparse:     expected restricted __virtio64 [usertype] val
   drivers/net/virtio_net.c:3549:82: sparse:     got restricted __le64 [assigned] [usertype] v

vim +3416 drivers/net/virtio_net.c

  3378	
  3379	static void virtnet_fill_stats(struct virtnet_info *vi, u32 qid,
  3380				       struct virtnet_stats_ctx *ctx,
  3381				       const u8 *base, bool from_driver, u8 type)
  3382	{
  3383		struct virtnet_stats_map *m;
  3384		const u64_stats_t *v_stat;
  3385		u32 queue_type;
  3386		const u64 *v;
  3387		u64 offset;
  3388		int i, j;
  3389	
  3390		if (qid == vi->max_queue_pairs * 2) {
  3391			offset = 0;
  3392			queue_type = VIRTNET_STATS_Q_TYPE_CQ;
  3393		} else if (qid % 2) {
  3394			offset = ctx->num_cq + ctx->num_rx * vi->curr_queue_pairs + ctx->num_tx * (qid / 2);
  3395			queue_type = VIRTNET_STATS_Q_TYPE_TX;
  3396		} else {
  3397			offset = ctx->num_cq + ctx->num_rx * (qid / 2);
  3398			queue_type = VIRTNET_STATS_Q_TYPE_RX;
  3399		}
  3400	
  3401		for (i = 0; i < ARRAY_SIZE(virtio_net_stats_map); ++i) {
  3402			m = &virtio_net_stats_map[i];
  3403	
  3404			if (m->queue_type != queue_type)
  3405				continue;
  3406	
  3407			if (from_driver != m->from_driver)
  3408				goto skip;
  3409	
  3410			if (type != m->type)
  3411				goto skip;
  3412	
  3413			for (j = 0; j < m->num; ++j) {
  3414				if (!from_driver) {
  3415					v = (const u64 *)(base + m->desc[j].offset);
> 3416					ctx->data[offset + j] = virtio64_to_cpu(vi->vdev, *v);
  3417				} else {
  3418					v_stat = (const u64_stats_t *)(base + m->desc[j].offset);
  3419					ctx->data[offset + j] = u64_stats_read(v_stat);
  3420				}
  3421			}
  3422	
  3423			break;
  3424	skip:
  3425			if (virtnet_stats_valid(vi, m))
  3426				offset += m->num;
  3427		}
  3428	}
  3429	

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

  reply	other threads:[~2024-01-02  2:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-26  7:30 [PATCH net-next v1 0/6] virtio-net: support device stats Xuan Zhuo
2023-12-26  7:30 ` [PATCH net-next v1 1/6] virtio_net: introduce device stats feature and structures Xuan Zhuo
2023-12-26 11:26   ` Zhu Yanjun
2023-12-27 21:05   ` Michael S. Tsirkin
2023-12-28  1:44     ` Xuan Zhuo
2023-12-26  7:30 ` [PATCH net-next v1 2/6] virtio_net: virtnet_send_command supports command-specific-result Xuan Zhuo
2023-12-26  7:31 ` [PATCH net-next v1 3/6] virtio_net: support device stats Xuan Zhuo
2023-12-27 21:08   ` Michael S. Tsirkin
2023-12-28  1:36     ` Xuan Zhuo
2024-01-01 19:56   ` kernel test robot
2024-01-02  9:45     ` Zhu Yanjun
2023-12-26  7:31 ` [PATCH net-next v1 4/6] virtio_net: stats map include driver stats Xuan Zhuo
2024-01-02  2:17   ` kernel test robot [this message]
2023-12-26  7:31 ` [PATCH net-next v1 5/6] virtio_net: add the total stats field Xuan Zhuo
2023-12-26  7:31 ` [PATCH net-next v1 6/6] virtio_net: rename stat tx_timeout to timeout Xuan Zhuo
2024-01-16  5:55 ` [PATCH net-next v1 0/6] virtio-net: support device stats Xuan Zhuo
2024-01-30  3:20   ` Jason Wang
2024-01-30  3:25     ` Xuan Zhuo

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=202401020928.JpmKXuhu-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=edumazet@google.com \
    --cc=jasowang@redhat.com \
    --cc=kuba@kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.com \
    --cc=yanjun.zhu@linux.dev \
    /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).