BPF List
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	virtualization@lists.linux-foundation.org
Cc: oe-kbuild-all@lists.linux.dev, Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	netdev@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH vhost 05/22] virtio_net: independent directory
Date: Thu, 12 Oct 2023 07:22:09 +0800	[thread overview]
Message-ID: <202310120705.aR0WPj7m-lkp@intel.com> (raw)
In-Reply-To: <20231011092728.105904-6-xuanzhuo@linux.alibaba.com>

Hi Xuan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.6-rc5 next-20231011]
[cannot apply to mst-vhost/linux-next]
[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_ring-virtqueue_set_dma_premapped-support-disable/20231011-180709
base:   linus/master
patch link:    https://lore.kernel.org/r/20231011092728.105904-6-xuanzhuo%40linux.alibaba.com
patch subject: [PATCH vhost 05/22] virtio_net: independent directory
config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20231012/202310120705.aR0WPj7m-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231012/202310120705.aR0WPj7m-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/202310120705.aR0WPj7m-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/virtio/main.c: In function 'virtnet_find_vqs':
>> drivers/net/virtio/main.c:4091:48: warning: '%d' directive writing between 1 and 11 bytes into a region of size 10 [-Wformat-overflow=]
    4091 |                 sprintf(vi->rq[i].name, "input.%d", i);
         |                                                ^~
   drivers/net/virtio/main.c:4091:41: note: directive argument in the range [-2147483641, 65534]
    4091 |                 sprintf(vi->rq[i].name, "input.%d", i);
         |                                         ^~~~~~~~~~
   drivers/net/virtio/main.c:4091:17: note: 'sprintf' output between 8 and 18 bytes into a destination of size 16
    4091 |                 sprintf(vi->rq[i].name, "input.%d", i);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/virtio/main.c:4092:49: warning: '%d' directive writing between 1 and 11 bytes into a region of size 9 [-Wformat-overflow=]
    4092 |                 sprintf(vi->sq[i].name, "output.%d", i);
         |                                                 ^~
   drivers/net/virtio/main.c:4092:41: note: directive argument in the range [-2147483641, 65534]
    4092 |                 sprintf(vi->sq[i].name, "output.%d", i);
         |                                         ^~~~~~~~~~~
   drivers/net/virtio/main.c:4092:17: note: 'sprintf' output between 9 and 19 bytes into a destination of size 16
    4092 |                 sprintf(vi->sq[i].name, "output.%d", i);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +4091 drivers/net/virtio/main.c

d85b758f72b05a drivers/net/virtio_net.c Michael S. Tsirkin 2017-03-09  4046  
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4047  static int virtnet_find_vqs(struct virtnet_info *vi)
3f9c10b0d478a3 drivers/net/virtio_net.c Amit Shah          2011-12-22  4048  {
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4049  	vq_callback_t **callbacks;
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4050  	struct virtqueue **vqs;
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4051  	int ret = -ENOMEM;
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4052  	int i, total_vqs;
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4053  	const char **names;
d45b897b11eaf9 drivers/net/virtio_net.c Michael S. Tsirkin 2017-03-06  4054  	bool *ctx;
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4055  
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4056  	/* We expect 1 RX virtqueue followed by 1 TX virtqueue, followed by
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4057  	 * possible N-1 RX/TX queue pairs used in multiqueue mode, followed by
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4058  	 * possible control vq.
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4059  	 */
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4060  	total_vqs = vi->max_queue_pairs * 2 +
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4061  		    virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ);
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4062  
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4063  	/* Allocate space for find_vqs parameters */
6396bb221514d2 drivers/net/virtio_net.c Kees Cook          2018-06-12  4064  	vqs = kcalloc(total_vqs, sizeof(*vqs), GFP_KERNEL);
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4065  	if (!vqs)
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4066  		goto err_vq;
6da2ec56059c3c drivers/net/virtio_net.c Kees Cook          2018-06-12  4067  	callbacks = kmalloc_array(total_vqs, sizeof(*callbacks), GFP_KERNEL);
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4068  	if (!callbacks)
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4069  		goto err_callback;
6da2ec56059c3c drivers/net/virtio_net.c Kees Cook          2018-06-12  4070  	names = kmalloc_array(total_vqs, sizeof(*names), GFP_KERNEL);
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4071  	if (!names)
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4072  		goto err_names;
192f68cf35f5ee drivers/net/virtio_net.c Jason Wang         2017-07-19  4073  	if (!vi->big_packets || vi->mergeable_rx_bufs) {
6396bb221514d2 drivers/net/virtio_net.c Kees Cook          2018-06-12  4074  		ctx = kcalloc(total_vqs, sizeof(*ctx), GFP_KERNEL);
d45b897b11eaf9 drivers/net/virtio_net.c Michael S. Tsirkin 2017-03-06  4075  		if (!ctx)
d45b897b11eaf9 drivers/net/virtio_net.c Michael S. Tsirkin 2017-03-06  4076  			goto err_ctx;
d45b897b11eaf9 drivers/net/virtio_net.c Michael S. Tsirkin 2017-03-06  4077  	} else {
d45b897b11eaf9 drivers/net/virtio_net.c Michael S. Tsirkin 2017-03-06  4078  		ctx = NULL;
d45b897b11eaf9 drivers/net/virtio_net.c Michael S. Tsirkin 2017-03-06  4079  	}
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4080  
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4081  	/* Parameters for control virtqueue, if any */
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4082  	if (vi->has_cvq) {
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4083  		callbacks[total_vqs - 1] = NULL;
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4084  		names[total_vqs - 1] = "control";
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4085  	}
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4086  
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4087  	/* Allocate/initialize parameters for send/receive virtqueues */
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4088  	for (i = 0; i < vi->max_queue_pairs; i++) {
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4089  		callbacks[rxq2vq(i)] = skb_recv_done;
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4090  		callbacks[txq2vq(i)] = skb_xmit_done;
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07 @4091  		sprintf(vi->rq[i].name, "input.%d", i);
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4092  		sprintf(vi->sq[i].name, "output.%d", i);
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4093  		names[rxq2vq(i)] = vi->rq[i].name;
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4094  		names[txq2vq(i)] = vi->sq[i].name;
d45b897b11eaf9 drivers/net/virtio_net.c Michael S. Tsirkin 2017-03-06  4095  		if (ctx)
d45b897b11eaf9 drivers/net/virtio_net.c Michael S. Tsirkin 2017-03-06  4096  			ctx[rxq2vq(i)] = true;
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4097  	}
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4098  
2e9ca760c289e1 drivers/net/virtio_net.c Michael S. Tsirkin 2022-08-16  4099  	ret = virtio_find_vqs_ctx(vi->vdev, total_vqs, vqs, callbacks,
2e9ca760c289e1 drivers/net/virtio_net.c Michael S. Tsirkin 2022-08-16  4100  				  names, ctx, NULL);
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4101  	if (ret)
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4102  		goto err_find;
3f9c10b0d478a3 drivers/net/virtio_net.c Amit Shah          2011-12-22  4103  
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4104  	if (vi->has_cvq) {
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4105  		vi->cvq = vqs[total_vqs - 1];
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4106  		if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VLAN))
f646968f8f7c62 drivers/net/virtio_net.c Patrick McHardy    2013-04-19  4107  			vi->dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4108  	}
3f9c10b0d478a3 drivers/net/virtio_net.c Amit Shah          2011-12-22  4109  
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4110  	for (i = 0; i < vi->max_queue_pairs; i++) {
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4111  		vi->rq[i].vq = vqs[rxq2vq(i)];
d85b758f72b05a drivers/net/virtio_net.c Michael S. Tsirkin 2017-03-09  4112  		vi->rq[i].min_buf_len = mergeable_min_buf_len(vi, vi->rq[i].vq);
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4113  		vi->sq[i].vq = vqs[txq2vq(i)];
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4114  	}
3f9c10b0d478a3 drivers/net/virtio_net.c Amit Shah          2011-12-22  4115  
2fa3c8a8b23041 drivers/net/virtio_net.c Tonghao Zhang      2018-05-31  4116  	/* run here: ret == 0. */
3f9c10b0d478a3 drivers/net/virtio_net.c Amit Shah          2011-12-22  4117  
3f9c10b0d478a3 drivers/net/virtio_net.c Amit Shah          2011-12-22  4118  
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4119  err_find:
d45b897b11eaf9 drivers/net/virtio_net.c Michael S. Tsirkin 2017-03-06  4120  	kfree(ctx);
d45b897b11eaf9 drivers/net/virtio_net.c Michael S. Tsirkin 2017-03-06  4121  err_ctx:
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4122  	kfree(names);
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4123  err_names:
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4124  	kfree(callbacks);
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4125  err_callback:
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4126  	kfree(vqs);
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4127  err_vq:
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4128  	return ret;
3f9c10b0d478a3 drivers/net/virtio_net.c Amit Shah          2011-12-22  4129  }
986a4f4d452dec drivers/net/virtio_net.c Jason Wang         2012-12-07  4130  

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

  reply	other threads:[~2023-10-11 23:22 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11  9:27 [PATCH vhost 00/22] virtio-net: support AF_XDP zero copy Xuan Zhuo
2023-10-11  9:27 ` [PATCH vhost 01/22] virtio_ring: virtqueue_set_dma_premapped support disable Xuan Zhuo
2023-10-11 14:13   ` kernel test robot
2023-10-12  9:15   ` Michael S. Tsirkin
2023-10-12  9:18     ` Xuan Zhuo
2023-10-12  9:40       ` Michael S. Tsirkin
2023-10-12 11:36         ` Xuan Zhuo
2023-10-11  9:27 ` [PATCH vhost 02/22] virtio_ring: introduce virtqueue_dma_[un]map_page_attrs Xuan Zhuo
2023-10-18  7:53   ` Xuan Zhuo
2023-10-18  7:59     ` Michael S. Tsirkin
2023-10-18  8:00       ` Xuan Zhuo
2023-10-18  8:44         ` Michael S. Tsirkin
2023-10-18  8:57           ` Xuan Zhuo
2023-10-18  9:13             ` Michael S. Tsirkin
2023-10-18  9:17               ` Xuan Zhuo
2023-10-18  8:09     ` Michael S. Tsirkin
2023-10-11  9:27 ` [PATCH vhost 03/22] virtio_net: rename free_old_xmit_skbs to free_old_xmit Xuan Zhuo
2023-10-11  9:27 ` [PATCH vhost 04/22] virtio_net: unify the code for recycling the xmit ptr Xuan Zhuo
2023-10-11  9:27 ` [PATCH vhost 05/22] virtio_net: independent directory Xuan Zhuo
2023-10-11 23:22   ` kernel test robot [this message]
2023-10-11  9:27 ` [PATCH vhost 06/22] virtio_net: move to virtio_net.h Xuan Zhuo
2023-10-11  9:27 ` [PATCH vhost 07/22] virtio_net: add prefix virtnet to all struct/api inside virtio_net.h Xuan Zhuo
2023-10-11  9:27 ` [PATCH vhost 08/22] virtio_net: virtnet_poll_tx support rescheduled Xuan Zhuo
2023-10-12  9:13   ` Michael S. Tsirkin
2023-10-11  9:27 ` [PATCH vhost 09/22] virtio_net: separate virtnet_rx_resize() Xuan Zhuo
2023-10-11  9:27 ` [PATCH vhost 10/22] virtio_net: separate virtnet_tx_resize() Xuan Zhuo
2023-10-11  9:27 ` [PATCH vhost 11/22] virtio_net: sq support premapped mode Xuan Zhuo
2023-10-13 10:13   ` kernel test robot
2023-10-11  9:27 ` [PATCH vhost 12/22] virtio_net: xsk: bind/unbind xsk Xuan Zhuo
2023-10-15 19:17   ` Simon Horman
2023-10-11  9:27 ` [PATCH vhost 13/22] virtio_net: xsk: prevent disable tx napi Xuan Zhuo
2023-10-11  9:27 ` [PATCH vhost 14/22] virtio_net: xsk: tx: support tx Xuan Zhuo
2023-10-11  9:27 ` [PATCH vhost 15/22] virtio_net: xsk: tx: support wakeup Xuan Zhuo
2023-10-11  9:27 ` [PATCH vhost 16/22] virtio_net: xsk: tx: virtnet_free_old_xmit() distinguishes xsk buffer Xuan Zhuo
2023-10-11  9:27 ` [PATCH vhost 17/22] virtio_net: xsk: tx: virtnet_sq_free_unused_buf() check " Xuan Zhuo
2023-10-11  9:27 ` [PATCH vhost 18/22] virtio_net: xsk: rx: introduce add_recvbuf_xsk() Xuan Zhuo
2023-10-11  9:27 ` [PATCH vhost 19/22] virtio_net: xsk: rx: introduce receive_xsk() to recv xsk buffer Xuan Zhuo
2023-10-11  9:27 ` [PATCH vhost 20/22] virtio_net: xsk: rx: virtnet_rq_free_unused_buf() check " Xuan Zhuo
2023-10-11  9:27 ` [PATCH vhost 21/22] virtio_net: update tx timeout record Xuan Zhuo
2023-10-12  9:10   ` Michael S. Tsirkin
2023-10-12  9:12     ` Xuan Zhuo
2023-10-12  9:36       ` Michael S. Tsirkin
2023-10-12 11:54         ` Xuan Zhuo
2023-10-12 13:07           ` Michael S. Tsirkin
2023-10-11  9:27 ` [PATCH vhost 22/22] virtio_net: xdp_features add NETDEV_XDP_ACT_XSK_ZEROCOPY Xuan Zhuo
2023-10-11 17:00 ` [PATCH vhost 00/22] virtio-net: support AF_XDP zero copy Jakub Kicinski
2023-10-12  1:53   ` Xuan Zhuo
2023-10-12  7:50     ` Jason Wang
2023-10-12  8:32       ` Xuan Zhuo
2023-10-12 14:50         ` 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=202310120705.aR0WPj7m-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=jasowang@redhat.com \
    --cc=john.fastabend@gmail.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-foundation.org \
    --cc=xuanzhuo@linux.alibaba.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