Content-Type: multipart/mixed; boundary="===============4129693323281349774==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [RFC 11/12] io_uring: sendzc with fixed buffers Date: Wed, 01 Dec 2021 07:22:01 +0800 Message-ID: <202112010723.KOd3X6GN-lkp@intel.com> In-Reply-To: <962f2f1c524d25356cdda188070d8653ee28f012.1638282789.git.asml.silence@gmail.com> List-Id: --===============4129693323281349774== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Pavel, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on next-20211130] [also build test WARNING on v5.16-rc3] [cannot apply to net/master horms-ipvs/master net-next/master linus/master = v5.16-rc3 v5.16-rc2 v5.16-rc1] [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/Pavel-Begunkov/io_uring-ze= rocopy-send/20211130-232227 base: 34f255a1e91ab44ff8926cf8294ff9144e62e861 config: nds32-randconfig-r021-20211130 (https://download.01.org/0day-ci/arc= hive/20211201/202112010723.KOd3X6GN-lkp(a)intel.com/config) compiler: nds32le-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/6144f7bc14ecc2532d2b7dc22= 1b644bce73f3464 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Pavel-Begunkov/io_uring-zerocopy-s= end/20211130-232227 git checkout 6144f7bc14ecc2532d2b7dc221b644bce73f3464 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Dnds32 SHELL=3D/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): fs/io_uring.c: In function '__io_submit_flush_completions': fs/io_uring.c:2546:40: warning: variable 'prev' set but not used [-Wunus= ed-but-set-variable] 2546 | struct io_wq_work_node *node, *prev; | ^~~~ fs/io_uring.c: In function 'io_sendzc': >> fs/io_uring.c:5108:41: warning: cast from pointer to integer of differen= t size [-Wpointer-to-int-cast] 5108 | (u64)sr->buf, sr->len); | ^ vim +5108 fs/io_uring.c 5089 = 5090 static int io_sendzc(struct io_kiocb *req, unsigned int issue_flags) 5091 { 5092 struct sockaddr_storage address; 5093 struct io_ring_ctx *ctx =3D req->ctx; 5094 struct io_tx_notifier *notifier; 5095 struct io_sendzc *sr =3D &req->msgzc; 5096 struct msghdr msg; 5097 struct iovec iov; 5098 struct socket *sock; 5099 unsigned flags; 5100 int ret, min_ret =3D 0; 5101 = 5102 sock =3D sock_from_file(req->file); 5103 if (unlikely(!sock)) 5104 return -ENOTSOCK; 5105 = 5106 if (req->msgzc.zc_flags & IORING_SENDZC_FIXED_BUF) { 5107 ret =3D __io_import_fixed(WRITE, &msg.msg_iter, req->imu, > 5108 (u64)sr->buf, sr->len); 5109 } else { 5110 ret =3D import_single_range(WRITE, sr->buf, sr->len, &iov, 5111 &msg.msg_iter); 5112 } 5113 if (unlikely(ret)) 5114 return ret; 5115 = 5116 msg.msg_name =3D NULL; 5117 msg.msg_control =3D NULL; 5118 msg.msg_controllen =3D 0; 5119 msg.msg_namelen =3D 0; 5120 if (sr->addr) { 5121 ret =3D move_addr_to_kernel(sr->addr, sr->addr_len, &address); 5122 if (ret < 0) 5123 return ret; 5124 msg.msg_name =3D (struct sockaddr *)&address; 5125 msg.msg_namelen =3D sr->addr_len; 5126 } 5127 = 5128 io_ring_submit_lock(ctx, issue_flags & IO_URING_F_UNLOCKED); 5129 notifier =3D io_get_tx_notifier(ctx, req->msgzc.tx_ctx); 5130 if (!notifier) { 5131 req_set_fail(req); 5132 ret =3D -ENOMEM; 5133 goto out; 5134 } 5135 msg.msg_ubuf =3D ¬ifier->uarg; 5136 = 5137 flags =3D sr->msg_flags; 5138 if (issue_flags & IO_URING_F_NONBLOCK) 5139 flags |=3D MSG_DONTWAIT; 5140 if (flags & MSG_WAITALL) 5141 min_ret =3D iov_iter_count(&msg.msg_iter); 5142 msg.msg_flags =3D flags; 5143 ret =3D sock_sendmsg(sock, &msg); 5144 = 5145 if (ret < min_ret) { 5146 if (ret =3D=3D -EAGAIN && (issue_flags & IO_URING_F_NONBLOCK)) 5147 goto out; 5148 if (ret =3D=3D -ERESTARTSYS) 5149 ret =3D -EINTR; 5150 req_set_fail(req); 5151 } else if (req->msgzc.zc_flags & IORING_SENDZC_FLUSH) { 5152 io_tx_kill_notification(req->msgzc.tx_ctx); 5153 } 5154 io_ring_submit_unlock(ctx, issue_flags & IO_URING_F_UNLOCKED); 5155 __io_req_complete(req, issue_flags, ret, 0); 5156 return 0; 5157 out: 5158 io_ring_submit_unlock(ctx, issue_flags & IO_URING_F_UNLOCKED); 5159 return ret; 5160 } 5161 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============4129693323281349774==--