All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC v1 2/6] virtio/vsock: add support for virtio datagram
Date: Wed, 16 Jun 2021 19:18:19 +0800	[thread overview]
Message-ID: <202106161905.rmuxHSC5-lkp@intel.com> (raw)
In-Reply-To: <20210609232501.171257-3-jiang.wang@bytedance.com>

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

Hi Jiang,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on vhost/linux-next]
[also build test WARNING on tip/perf/core linus/master v5.13-rc6]
[cannot apply to next-20210615]
[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/Jiang-Wang/virtio-vsock-introduce-SOCK_DGRAM-support/20210616-120056
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
config: x86_64-randconfig-a015-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/b156a0ad587c43dbfc98397f01b34fad15054bf0
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jiang-Wang/virtio-vsock-introduce-SOCK_DGRAM-support/20210616-120056
        git checkout b156a0ad587c43dbfc98397f01b34fad15054bf0
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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 >>):

>> net/vmw_vsock/virtio_transport_common.c:416:6: warning: variable 'free_space' set but not used [-Wunused-but-set-variable]
           u32 free_space;
               ^
   1 warning generated.


vim +/free_space +416 net/vmw_vsock/virtio_transport_common.c

   408	
   409	static ssize_t
   410	virtio_transport_dgram_do_dequeue(struct vsock_sock *vsk,
   411							   struct msghdr *msg, size_t len)
   412	{
   413		struct virtio_vsock_sock *vvs = vsk->trans;
   414		struct virtio_vsock_pkt *pkt;
   415		size_t total = 0;
 > 416		u32 free_space;
   417		int err = -EFAULT;
   418	
   419		spin_lock_bh(&vvs->rx_lock);
   420		if (total < len && !list_empty(&vvs->rx_queue)) {
   421			pkt = list_first_entry(&vvs->rx_queue,
   422					       struct virtio_vsock_pkt, list);
   423	
   424			total = len;
   425			if (total > pkt->len - pkt->off)
   426				total = pkt->len - pkt->off;
   427			else if (total < pkt->len - pkt->off)
   428				msg->msg_flags |= MSG_TRUNC;
   429	
   430			/* sk_lock is held by caller so no one else can dequeue.
   431			 * Unlock rx_lock since memcpy_to_msg() may sleep.
   432			 */
   433			spin_unlock_bh(&vvs->rx_lock);
   434	
   435			err = memcpy_to_msg(msg, pkt->buf + pkt->off, total);
   436			if (err)
   437				return err;
   438	
   439			spin_lock_bh(&vvs->rx_lock);
   440	
   441			virtio_transport_dec_rx_pkt(vvs, pkt);
   442			list_del(&pkt->list);
   443			virtio_transport_free_pkt(pkt);
   444		}
   445	
   446		free_space = vvs->buf_alloc - (vvs->fwd_cnt - vvs->last_fwd_cnt);
   447	
   448		spin_unlock_bh(&vvs->rx_lock);
   449	
   450		if (total > 0 && msg->msg_name) {
   451			/* Provide the address of the sender. */
   452			DECLARE_SOCKADDR(struct sockaddr_vm *, vm_addr, msg->msg_name);
   453	
   454			vsock_addr_init(vm_addr, le64_to_cpu(pkt->hdr.src_cid),
   455							le32_to_cpu(pkt->hdr.src_port));
   456			msg->msg_namelen = sizeof(*vm_addr);
   457		}
   458		return total;
   459	}
   460	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 40350 bytes --]

  parent reply	other threads:[~2021-06-16 11:18 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-09 23:24 [RFC v1 0/6] virtio/vsock: introduce SOCK_DGRAM support Jiang Wang
2021-06-09 23:24 ` Jiang Wang
2021-06-09 23:24 ` [RFC v1 1/6] virtio/vsock: add VIRTIO_VSOCK_F_DGRAM feature bit Jiang Wang
2021-06-09 23:24   ` Jiang Wang
2021-06-18  9:39   ` Stefano Garzarella
2021-06-18  9:39     ` Stefano Garzarella
2021-06-21 17:24     ` [External] " Jiang Wang .
2021-06-21 17:24       ` Jiang Wang .
2021-06-22 10:50       ` Stefano Garzarella
2021-06-22 10:50         ` Stefano Garzarella
2021-06-09 23:24 ` [RFC v1 2/6] virtio/vsock: add support for virtio datagram Jiang Wang
2021-06-09 23:24   ` Jiang Wang
2021-06-16  9:06   ` kernel test robot
2021-06-16  9:17   ` kernel test robot
2021-06-16 11:18   ` kernel test robot [this message]
2021-06-16 17:54   ` kernel test robot
2021-06-18  9:52   ` Stefano Garzarella
2021-06-18  9:52     ` Stefano Garzarella
2021-06-18 10:11   ` Stefano Garzarella
2021-06-18 10:11     ` Stefano Garzarella
2021-06-09 23:24 ` [RFC v1 3/6] vhost/vsock: add support for vhost dgram Jiang Wang
2021-06-09 23:24   ` Jiang Wang
2021-06-16 12:33   ` kernel test robot
2021-06-18 10:13   ` Stefano Garzarella
2021-06-18 10:13     ` Stefano Garzarella
2021-06-21 17:32     ` [External] " Jiang Wang .
2021-06-21 17:32       ` Jiang Wang .
2021-06-09 23:24 ` [RFC v1 4/6] vsock_test: add tests for vsock dgram Jiang Wang
2021-06-09 23:24   ` Jiang Wang
2021-06-09 23:24 ` [RFC v1 5/6] vhost/vsock: add kconfig for vhost dgram support Jiang Wang
2021-06-09 23:24   ` Jiang Wang
2021-06-18  9:54   ` Stefano Garzarella
2021-06-18  9:54     ` Stefano Garzarella
2021-06-21 17:25     ` [External] " Jiang Wang .
2021-06-21 17:25       ` Jiang Wang .
2021-06-09 23:24 ` [RFC v1 6/6] virtio/vsock: add sysfs for rx buf len for dgram Jiang Wang
2021-06-09 23:24   ` Jiang Wang
2021-06-18 10:04   ` Stefano Garzarella
2021-06-18 10:04     ` Stefano Garzarella
2021-06-21 17:27     ` [External] " Jiang Wang .
2021-06-21 17:27       ` Jiang Wang .
2021-06-10  1:50 ` [RFC v1 0/6] virtio/vsock: introduce SOCK_DGRAM support Jason Wang
2021-06-10  1:50   ` Jason Wang
2021-06-10  3:43   ` Jiang Wang .
2021-06-10  3:43     ` Jiang Wang .
2021-06-10  4:02     ` Jason Wang
2021-06-10  4:02       ` Jason Wang
2021-06-10  7:23       ` Stefano Garzarella
2021-06-10  7:23         ` Stefano Garzarella
2021-06-10  7:46         ` Jason Wang
2021-06-10  7:46           ` Jason Wang
2021-06-10  9:51           ` Stefano Garzarella
2021-06-10  9:51             ` Stefano Garzarella
2021-06-10 16:44             ` Jiang Wang .
2021-06-10 16:44               ` Jiang Wang .
2021-06-18  9:35 ` Stefano Garzarella
2021-06-18  9:35   ` Stefano Garzarella
2021-06-21 17:21   ` [External] " Jiang Wang .
2021-06-21 17:21     ` Jiang Wang .

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=202106161905.rmuxHSC5-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.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.