From: kernel test robot <lkp@intel.com>
To: Xuan Zhuo <xuanzhuo@linux.alibaba.com>, netdev@vger.kernel.org
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
"Jakub Kicinski" <kuba@kernel.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Björn Töpel" <bjorn@kernel.org>,
"Magnus Karlsson" <magnus.karlsson@intel.com>,
"Jonathan Lemon" <jonathan.lemon@gmail.com>,
"Alexei Starovoitov" <ast@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Jesper Dangaard Brouer" <hawk@kernel.org>
Subject: Re: [PATCH net-next v5 13/15] virtio-net: support AF_XDP zc rx
Date: Thu, 17 Jun 2021 10:48:57 +0800 [thread overview]
Message-ID: <202106171059.fZKTNsGN-lkp@intel.com> (raw)
In-Reply-To: <20210610082209.91487-14-xuanzhuo@linux.alibaba.com>
[-- Attachment #1: Type: text/plain, Size: 4472 bytes --]
Hi Xuan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Xuan-Zhuo/virtio-net-support-xdp-socket-zero-copy/20210617-033438
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git c7654495916e109f76a67fd3ae68f8fa70ab4faa
config: x86_64-randconfig-a015-20210617 (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/f5f1e60139e7c38fbb4ed58d503e89bbb26c1464
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/20210617-033438
git checkout f5f1e60139e7c38fbb4ed58d503e89bbb26c1464
# 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 >>):
>> drivers/net/virtio/virtio_net.c:1304:2: warning: variable 'oom' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (fill_recv_xsk(vi, rq, gfp))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:30: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/virtio/virtio_net.c:1329:10: note: uninitialized use occurs here
return !oom;
^~~
drivers/net/virtio/virtio_net.c:1304:2: note: remove the 'if' if its condition is always false
if (fill_recv_xsk(vi, rq, gfp))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/net/virtio/virtio_net.c:1297:10: note: initialize the variable 'oom' to silence this warning
bool oom;
^
= 0
1 warning generated.
vim +1304 drivers/net/virtio/virtio_net.c
1285
1286 /*
1287 * Returns false if we couldn't fill entirely (OOM).
1288 *
1289 * Normally run in the receive path, but can also be run from ndo_open
1290 * before we're receiving packets, or from refill_work which is
1291 * careful to disable receiving (using napi_disable).
1292 */
1293 static bool try_fill_recv(struct virtnet_info *vi, struct receive_queue *rq,
1294 gfp_t gfp)
1295 {
1296 int err;
1297 bool oom;
1298
1299 /* Because virtio-net does not yet support flow direct, all rx
1300 * channels must also process other non-xsk packets. If there is
1301 * no buf available from xsk temporarily, we try to allocate
1302 * memory to the channel.
1303 */
> 1304 if (fill_recv_xsk(vi, rq, gfp))
1305 goto kick;
1306
1307 do {
1308 if (vi->mergeable_rx_bufs)
1309 err = add_recvbuf_mergeable(vi, rq, gfp);
1310 else if (vi->big_packets)
1311 err = add_recvbuf_big(vi, rq, gfp);
1312 else
1313 err = add_recvbuf_small(vi, rq, gfp);
1314
1315 oom = err == -ENOMEM;
1316 if (err)
1317 break;
1318 } while (rq->vq->num_free);
1319
1320 kick:
1321 if (virtqueue_kick_prepare(rq->vq) && virtqueue_notify(rq->vq)) {
1322 unsigned long flags;
1323
1324 flags = u64_stats_update_begin_irqsave(&rq->stats.syncp);
1325 rq->stats.kicks++;
1326 u64_stats_update_end_irqrestore(&rq->stats.syncp, flags);
1327 }
1328
1329 return !oom;
1330 }
1331
---
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: 31921 bytes --]
next prev parent reply other threads:[~2021-06-17 2:50 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-10 8:21 [PATCH net-next v5 00/15] virtio-net: support xdp socket zero copy Xuan Zhuo
2021-06-10 8:21 ` [PATCH net-next v5 01/15] netdevice: priv_flags extend to 64bit Xuan Zhuo
2021-06-10 8:21 ` [PATCH net-next v5 02/15] netdevice: add priv_flags IFF_NOT_USE_DMA_ADDR Xuan Zhuo
2021-06-10 8:21 ` [PATCH net-next v5 03/15] virtio-net: " Xuan Zhuo
2021-06-16 9:27 ` Jason Wang
2021-06-10 8:21 ` [PATCH net-next v5 04/15] xsk: XDP_SETUP_XSK_POOL support option IFF_NOT_USE_DMA_ADDR Xuan Zhuo
2021-06-10 8:21 ` [PATCH net-next v5 05/15] virtio: support virtqueue_detach_unused_buf_ctx Xuan Zhuo
2021-06-17 2:48 ` kernel test robot
2021-06-10 8:22 ` [PATCH net-next v5 06/15] virtio-net: unify the code for recycling the xmit ptr Xuan Zhuo
2021-06-16 2:42 ` Jason Wang
2021-06-10 8:22 ` [PATCH net-next v5 07/15] virtio-net: standalone virtnet_aloc_frag function Xuan Zhuo
2021-06-16 2:45 ` Jason Wang
2021-06-10 8:22 ` [PATCH net-next v5 08/15] virtio-net: split the receive_mergeable function Xuan Zhuo
2021-06-16 7:33 ` Jason Wang
2021-06-10 8:22 ` [PATCH net-next v5 09/15] virtio-net: virtnet_poll_tx support budget check Xuan Zhuo
2021-06-10 8:22 ` [PATCH net-next v5 10/15] virtio-net: independent directory Xuan Zhuo
2021-06-16 7:34 ` Jason Wang
2021-06-10 8:22 ` [PATCH net-next v5 11/15] virtio-net: move to virtio_net.h Xuan Zhuo
2021-06-16 7:35 ` Jason Wang
2021-06-10 8:22 ` [PATCH net-next v5 12/15] virtio-net: support AF_XDP zc tx Xuan Zhuo
2021-06-16 9:26 ` Jason Wang
2021-06-16 10:10 ` Magnus Karlsson
2021-06-10 8:22 ` [PATCH net-next v5 13/15] virtio-net: support AF_XDP zc rx Xuan Zhuo
2021-06-17 2:48 ` kernel test robot [this message]
2021-06-17 3:23 ` Jason Wang
2021-06-21 3:26 ` kernel test robot
2021-06-10 8:22 ` [PATCH net-next v5 14/15] virtio-net: xsk direct xmit inside xsk wakeup Xuan Zhuo
2021-06-17 3:07 ` Jason Wang
2021-06-10 8:22 ` [PATCH net-next v5 15/15] virtio-net: xsk zero copy xmit kick by threshold Xuan Zhuo
2021-06-17 3:08 ` Jason Wang
[not found] <1623909234.193789-1-xuanzhuo@linux.alibaba.com>
2021-06-17 6:03 ` [PATCH net-next v5 13/15] virtio-net: support AF_XDP zc rx Jason Wang
[not found] <1623911825.4660118-1-xuanzhuo@linux.alibaba.com>
2021-06-17 6:58 ` 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=202106171059.fZKTNsGN-lkp@intel.com \
--to=lkp@intel.com \
--cc=ast@kernel.org \
--cc=bjorn@kernel.org \
--cc=clang-built-linux@googlegroups.com \
--cc=daniel@iogearbox.net \
--cc=hawk@kernel.org \
--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=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).