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: kbuild-all@lists.01.org, dust.li@linux.alibaba.com,
	tonylu@linux.alibaba.com, "Michael S. Tsirkin" <mst@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Björn Töpel" <bjorn.topel@intel.com>,
	"Magnus Karlsson" <magnus.karlsson@intel.com>,
	"Jonathan Lemon" <jonathan.lemon@gmail.com>,
	"Alexei Starovoitov" <ast@kernel.org>
Subject: Re: [PATCH netdev 5/5] virtio-net, xsk: virtio-net support xsk zero copy tx
Date: Tue, 5 Jan 2021 21:35:51 +0800	[thread overview]
Message-ID: <202101052131.9lNSEe6e-lkp@intel.com> (raw)
In-Reply-To: <65b5d0af6c4ed878cbcfa53c925d9dcbb09ecc55.1609837120.git.xuanzhuo@linux.alibaba.com>

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

Hi Xuan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on ipvs/master]
[also build test WARNING on linus/master v5.11-rc2 next-20210104]
[cannot apply to sparc-next/master]
[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/Xuan-Zhuo/virtio-net-support-xdp-socket-zero-copy-xmit/20210105-171505
base:   https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git master
config: x86_64-randconfig-s032-20210105 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-208-g46a52ca4-dirty
        # https://github.com/0day-ci/linux/commit/265d3cdead3bd609bec53e66dfb7c5bf7339f73f
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Xuan-Zhuo/virtio-net-support-xdp-socket-zero-copy-xmit/20210105-171505
        git checkout 265d3cdead3bd609bec53e66dfb7c5bf7339f73f
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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/net/virtio_net.c:1502:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const * @@     got struct virtnet_xsk_hdr [noderef] __rcu *hdr @@
   drivers/net/virtio_net.c:1502:38: sparse:     expected void const *
   drivers/net/virtio_net.c:1502:38: sparse:     got struct virtnet_xsk_hdr [noderef] __rcu *hdr
   drivers/net/virtio_net.c:2745:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const * @@     got struct virtnet_xsk_hdr [noderef] __rcu *hdr @@
   drivers/net/virtio_net.c:2745:30: sparse:     expected void const *
   drivers/net/virtio_net.c:2745:30: sparse:     got struct virtnet_xsk_hdr [noderef] __rcu *hdr
>> drivers/net/virtio_net.c:2798:16: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct virtnet_xsk_hdr *xskhdr @@     got struct virtnet_xsk_hdr [noderef] __rcu * @@
   drivers/net/virtio_net.c:2798:16: sparse:     expected struct virtnet_xsk_hdr *xskhdr
   drivers/net/virtio_net.c:2798:16: sparse:     got struct virtnet_xsk_hdr [noderef] __rcu *
   drivers/net/virtio_net.c:602:9: sparse: sparse: context imbalance in 'virtnet_get_xdp_sq' - different lock contexts for basic block
   drivers/net/virtio_net.c:611:22: sparse: sparse: context imbalance in 'virtnet_put_xdp_sq' - unexpected unlock

vim +1502 drivers/net/virtio_net.c

  1489	
  1490	static void virt_xsk_complete(struct send_queue *sq, u32 num, bool xsk_wakeup)
  1491	{
  1492		struct xsk_buff_pool *pool;
  1493		int n;
  1494	
  1495		rcu_read_lock();
  1496	
  1497		WRITE_ONCE(sq->xsk.hdr_pro, sq->xsk.hdr_pro + num);
  1498	
  1499		pool = rcu_dereference(sq->xsk.pool);
  1500		if (!pool) {
  1501			if (sq->xsk.hdr_pro - sq->xsk.hdr_con == sq->xsk.hdr_n) {
> 1502				kfree(sq->xsk.hdr);
  1503				rcu_assign_pointer(sq->xsk.hdr, NULL);
  1504			}
  1505			rcu_read_unlock();
  1506			return;
  1507		}
  1508	
  1509		xsk_tx_completed(pool, num);
  1510	
  1511		rcu_read_unlock();
  1512	
  1513		if (!xsk_wakeup || !sq->xsk.wait_slot)
  1514			return;
  1515	
  1516		n = sq->xsk.hdr_pro - sq->xsk.hdr_con;
  1517	
  1518		if (n > sq->xsk.hdr_n / 2) {
  1519			sq->xsk.wait_slot = false;
  1520			virtqueue_napi_schedule(&sq->napi, sq->vq);
  1521		}
  1522	}
  1523	

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

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

  parent reply	other threads:[~2021-01-05 13:37 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-05  9:11 [PATCH netdev 0/5] virtio-net support xdp socket zero copy xmit Xuan Zhuo
2021-01-05  9:11 ` [PATCH netdev 1/5] xsk: support get page for drv Xuan Zhuo
2021-01-05  9:11 ` [PATCH netdev 2/5] virtio-net: support XDP_TX when not more queues Xuan Zhuo
2021-01-05  9:11 ` [PATCH netdev 3/5] virtio-net, xsk: distinguish XDP_TX and XSK XMIT ctx Xuan Zhuo
2021-01-05  9:11 ` [PATCH netdev 4/5] xsk, virtio-net: prepare for support xsk Xuan Zhuo
2021-01-05  9:11 ` [PATCH netdev 5/5] virtio-net, xsk: virtio-net support xsk zero copy tx Xuan Zhuo
2021-01-05 13:19   ` kernel test robot
2021-01-05 13:21   ` Michael S. Tsirkin
2021-01-05 13:25   ` [kbuild] " Dan Carpenter
2021-01-05 13:29   ` kernel test robot
2021-01-05 13:35   ` kernel test robot [this message]
2021-01-05  9:32 ` [PATCH netdev 0/5] virtio-net support xdp socket zero copy xmit Jason Wang
2021-01-05 12:25 ` Michael S. Tsirkin
2021-01-16  2:59 ` [PATCH net-next v2 0/7] " Xuan Zhuo
2021-01-16  2:59   ` [PATCH net-next v2 1/7] xsk: support get page for drv Xuan Zhuo
2021-01-16  2:59   ` [PATCH net-next v2 2/7] virtio-net, xsk: distinguish XDP_TX and XSK XMIT ctx Xuan Zhuo
2021-01-18  6:45     ` Jason Wang
2021-01-16  2:59   ` [PATCH net-next v2 3/7] xsk, virtio-net: prepare for support xsk zerocopy xmit Xuan Zhuo
2021-01-16  2:59   ` [PATCH net-next v2 4/7] virtio-net, xsk: support xsk enable/disable Xuan Zhuo
2021-01-16  2:59   ` [PATCH net-next v2 5/7] virtio-net, xsk: realize the function of xsk packet sending Xuan Zhuo
2021-01-16  4:47     ` Jakub Kicinski
2021-01-18  9:10     ` Jason Wang
2021-01-18 12:27       ` Michael S. Tsirkin
2021-01-16  2:59   ` [PATCH net-next v2 6/7] virtio-net, xsk: implement xsk wakeup callback Xuan Zhuo
2021-01-19  4:50     ` Jason Wang
2021-01-16  2:59   ` [PATCH net-next v2 7/7] virtio-net, xsk: set xsk completed when packet sent done Xuan Zhuo
2021-01-18  6:28   ` [PATCH net-next v2 0/7] virtio-net support xdp socket zero copy xmit Jason 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=202101052131.9lNSEe6e-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ast@kernel.org \
    --cc=bjorn.topel@intel.com \
    --cc=dust.li@linux.alibaba.com \
    --cc=jasowang@redhat.com \
    --cc=jonathan.lemon@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=magnus.karlsson@intel.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=tonylu@linux.alibaba.com \
    --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;
as well as URLs for NNTP newsgroup(s).