From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============1283130255041035405==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v2 net-next] net: introduce SO_RCVBUFAUTO to let the rcv_buf tune automatically Date: Wed, 16 Feb 2022 16:47:07 +0800 Message-ID: <202202161604.JJGbw1Fl-lkp@intel.com> In-Reply-To: <20220216050320.3222-1-kerneljasonxing@gmail.com> List-Id: --===============1283130255041035405== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/kerneljasonxing-gmail-com/= net-introduce-SO_RCVBUFAUTO-to-let-the-rcv_buf-tune-automatically/20220216-= 130549 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git = b0471c26108160217fc17acec4a9fdce92aaeeea config: nios2-defconfig (https://download.01.org/0day-ci/archive/20220216/2= 02202161604.JJGbw1Fl-lkp(a)intel.com/config) compiler: nios2-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/83d2852811bd798510fe870fd= 596d4aadfa87692 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review kerneljasonxing-gmail-com/net-intr= oduce-SO_RCVBUFAUTO-to-let-the-rcv_buf-tune-automatically/20220216-130549 git checkout 83d2852811bd798510fe870fd596d4aadfa87692 # 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=3Dnios2 SHELL=3D/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): net/core/sock.c: In function 'sock_setsockopt': >> net/core/sock.c:1458:9: error: duplicate case value 1458 | case SO_TXREHASH: | ^~~~ net/core/sock.c:1125:9: note: previously used here 1125 | case SO_RCVBUFAUTO: | ^~~~ vim +1458 net/core/sock.c 62748f32d501f5d Eric Dumazet 2013-09-24 1355 = 62748f32d501f5d Eric Dumazet 2013-09-24 1356 case SO_MAX_PACIN= G_RATE: 6bdef102dae9d24 Eric Dumazet 2019-02-28 1357 { 700465fd338fe5d Ke Li 2020-10-22 1358 unsigned long ul= val =3D (val =3D=3D ~0U) ? ~0UL : (unsigned int)val; 6bdef102dae9d24 Eric Dumazet 2019-02-28 1359 = 6bdef102dae9d24 Eric Dumazet 2019-02-28 1360 if (sizeof(ulval= ) !=3D sizeof(val) && 6bdef102dae9d24 Eric Dumazet 2019-02-28 1361 optlen >=3D = sizeof(ulval) && c8c1bbb6eb49810 Christoph Hellwig 2020-07-23 1362 copy_from_so= ckptr(&ulval, optval, sizeof(ulval))) { 6bdef102dae9d24 Eric Dumazet 2019-02-28 1363 ret =3D -EFAULT; 6bdef102dae9d24 Eric Dumazet 2019-02-28 1364 break; 6bdef102dae9d24 Eric Dumazet 2019-02-28 1365 } 6bdef102dae9d24 Eric Dumazet 2019-02-28 1366 if (ulval !=3D ~= 0UL) 218af599fa635b1 Eric Dumazet 2017-05-16 1367 cmpxchg(&sk->sk= _pacing_status, 218af599fa635b1 Eric Dumazet 2017-05-16 1368 SK_PACING_NONE, 218af599fa635b1 Eric Dumazet 2017-05-16 1369 SK_PACING_NEED= ED); 6bdef102dae9d24 Eric Dumazet 2019-02-28 1370 sk->sk_max_pacin= g_rate =3D ulval; 6bdef102dae9d24 Eric Dumazet 2019-02-28 1371 sk->sk_pacing_ra= te =3D min(sk->sk_pacing_rate, ulval); 62748f32d501f5d Eric Dumazet 2013-09-24 1372 break; 6bdef102dae9d24 Eric Dumazet 2019-02-28 1373 } 70da268b569d32a Eric Dumazet 2015-10-08 1374 case SO_INCOMING_= CPU: 7170a977743b72c Eric Dumazet 2019-10-30 1375 WRITE_ONCE(sk->s= k_incoming_cpu, val); 70da268b569d32a Eric Dumazet 2015-10-08 1376 break; 70da268b569d32a Eric Dumazet 2015-10-08 1377 = a87cb3e48ee86d2 Tom Herbert 2016-02-24 1378 case SO_CNX_ADVIC= E: a87cb3e48ee86d2 Tom Herbert 2016-02-24 1379 if (val =3D=3D 1) a87cb3e48ee86d2 Tom Herbert 2016-02-24 1380 dst_negative_ad= vice(sk); a87cb3e48ee86d2 Tom Herbert 2016-02-24 1381 break; 76851d1212c1136 Willem de Bruijn 2017-08-03 1382 = 76851d1212c1136 Willem de Bruijn 2017-08-03 1383 case SO_ZEROCOPY: 28190752c709272 Sowmini Varadhan 2018-02-15 1384 if (sk->sk_famil= y =3D=3D PF_INET || sk->sk_family =3D=3D PF_INET6) { 42f67eea3ba36ce Eric Dumazet 2021-11-15 1385 if (!(sk_is_tcp= (sk) || b5947e5d1e710c3 Willem de Bruijn 2018-11-30 1386 (sk->sk_t= ype =3D=3D SOCK_DGRAM && b5947e5d1e710c3 Willem de Bruijn 2018-11-30 1387 sk->sk_p= rotocol =3D=3D IPPROTO_UDP))) 76851d1212c1136 Willem de Bruijn 2017-08-03 1388 ret =3D -ENOTS= UPP; 28190752c709272 Sowmini Varadhan 2018-02-15 1389 } else if (sk->s= k_family !=3D PF_RDS) { 28190752c709272 Sowmini Varadhan 2018-02-15 1390 ret =3D -ENOTSU= PP; 28190752c709272 Sowmini Varadhan 2018-02-15 1391 } 28190752c709272 Sowmini Varadhan 2018-02-15 1392 if (!ret) { 28190752c709272 Sowmini Varadhan 2018-02-15 1393 if (val < 0 || = val > 1) 76851d1212c1136 Willem de Bruijn 2017-08-03 1394 ret =3D -EINVA= L; 76851d1212c1136 Willem de Bruijn 2017-08-03 1395 else 76851d1212c1136 Willem de Bruijn 2017-08-03 1396 sock_valbool_f= lag(sk, SOCK_ZEROCOPY, valbool); 28190752c709272 Sowmini Varadhan 2018-02-15 1397 } 334e6413134bf83 Jesus Sanchez-Palencia 2018-03-07 1398 break; 334e6413134bf83 Jesus Sanchez-Palencia 2018-03-07 1399 = 80b14dee2bea128 Richard Cochran 2018-07-03 1400 case SO_TXTIME: 790709f24972864 Eric Dumazet 2020-05-07 1401 if (optlen !=3D = sizeof(struct sock_txtime)) { 80b14dee2bea128 Richard Cochran 2018-07-03 1402 ret =3D -EINVAL; 790709f24972864 Eric Dumazet 2020-05-07 1403 break; c8c1bbb6eb49810 Christoph Hellwig 2020-07-23 1404 } else if (copy_= from_sockptr(&sk_txtime, optval, 80b14dee2bea128 Richard Cochran 2018-07-03 1405 sizeof(struc= t sock_txtime))) { 80b14dee2bea128 Richard Cochran 2018-07-03 1406 ret =3D -EFAULT; 790709f24972864 Eric Dumazet 2020-05-07 1407 break; 80b14dee2bea128 Richard Cochran 2018-07-03 1408 } else if (sk_tx= time.flags & ~SOF_TXTIME_FLAGS_MASK) { 80b14dee2bea128 Richard Cochran 2018-07-03 1409 ret =3D -EINVAL; 790709f24972864 Eric Dumazet 2020-05-07 1410 break; 790709f24972864 Eric Dumazet 2020-05-07 1411 } 790709f24972864 Eric Dumazet 2020-05-07 1412 /* CLOCK_MONOTON= IC is only used by sch_fq, and this packet 790709f24972864 Eric Dumazet 2020-05-07 1413 * scheduler has= enough safe guards. 790709f24972864 Eric Dumazet 2020-05-07 1414 */ 790709f24972864 Eric Dumazet 2020-05-07 1415 if (sk_txtime.cl= ockid !=3D CLOCK_MONOTONIC && 790709f24972864 Eric Dumazet 2020-05-07 1416 !ns_capable(= sock_net(sk)->user_ns, CAP_NET_ADMIN)) { 790709f24972864 Eric Dumazet 2020-05-07 1417 ret =3D -EPERM; 790709f24972864 Eric Dumazet 2020-05-07 1418 break; 790709f24972864 Eric Dumazet 2020-05-07 1419 } 80b14dee2bea128 Richard Cochran 2018-07-03 1420 sock_valbool_fla= g(sk, SOCK_TXTIME, true); 80b14dee2bea128 Richard Cochran 2018-07-03 1421 sk->sk_clockid = =3D sk_txtime.clockid; 80b14dee2bea128 Richard Cochran 2018-07-03 1422 sk->sk_txtime_de= adline_mode =3D 80b14dee2bea128 Richard Cochran 2018-07-03 1423 !!(sk_txtime.fl= ags & SOF_TXTIME_DEADLINE_MODE); 4b15c7075352668 Jesus Sanchez-Palencia 2018-07-03 1424 sk->sk_txtime_re= port_errors =3D 4b15c7075352668 Jesus Sanchez-Palencia 2018-07-03 1425 !!(sk_txtime.fl= ags & SOF_TXTIME_REPORT_ERRORS); 80b14dee2bea128 Richard Cochran 2018-07-03 1426 break; 80b14dee2bea128 Richard Cochran 2018-07-03 1427 = f5dd3d0c9638a9d David Herrmann 2019-01-15 1428 case SO_BINDTOIFI= NDEX: 7594888c782e735 Christoph Hellwig 2020-05-28 1429 ret =3D sock_bin= dtoindex_locked(sk, val); f5dd3d0c9638a9d David Herrmann 2019-01-15 1430 break; f5dd3d0c9638a9d David Herrmann 2019-01-15 1431 = 04190bf8944deb7 Pavel Tikhomirov 2021-08-04 1432 case SO_BUF_LOCK: 04190bf8944deb7 Pavel Tikhomirov 2021-08-04 1433 if (val & ~SOCK_= BUF_LOCK_MASK) { 04190bf8944deb7 Pavel Tikhomirov 2021-08-04 1434 ret =3D -EINVAL; 04190bf8944deb7 Pavel Tikhomirov 2021-08-04 1435 break; 04190bf8944deb7 Pavel Tikhomirov 2021-08-04 1436 } 04190bf8944deb7 Pavel Tikhomirov 2021-08-04 1437 sk->sk_userlocks= =3D val | (sk->sk_userlocks & 04190bf8944deb7 Pavel Tikhomirov 2021-08-04 1438 ~SOCK_BUF_L= OCK_MASK); 04190bf8944deb7 Pavel Tikhomirov 2021-08-04 1439 break; 04190bf8944deb7 Pavel Tikhomirov 2021-08-04 1440 = 2bb2f5fb21b0486 Wei Wang 2021-09-29 1441 case SO_RESERVE_M= EM: 2bb2f5fb21b0486 Wei Wang 2021-09-29 1442 { 2bb2f5fb21b0486 Wei Wang 2021-09-29 1443 int delta; 2bb2f5fb21b0486 Wei Wang 2021-09-29 1444 = 2bb2f5fb21b0486 Wei Wang 2021-09-29 1445 if (val < 0) { 2bb2f5fb21b0486 Wei Wang 2021-09-29 1446 ret =3D -EINVAL; 2bb2f5fb21b0486 Wei Wang 2021-09-29 1447 break; 2bb2f5fb21b0486 Wei Wang 2021-09-29 1448 } 2bb2f5fb21b0486 Wei Wang 2021-09-29 1449 = 2bb2f5fb21b0486 Wei Wang 2021-09-29 1450 delta =3D val - = sk->sk_reserved_mem; 2bb2f5fb21b0486 Wei Wang 2021-09-29 1451 if (delta < 0) 2bb2f5fb21b0486 Wei Wang 2021-09-29 1452 sock_release_re= served_memory(sk, -delta); 2bb2f5fb21b0486 Wei Wang 2021-09-29 1453 else 2bb2f5fb21b0486 Wei Wang 2021-09-29 1454 ret =3D sock_re= serve_memory(sk, delta); 2bb2f5fb21b0486 Wei Wang 2021-09-29 1455 break; 2bb2f5fb21b0486 Wei Wang 2021-09-29 1456 } 2bb2f5fb21b0486 Wei Wang 2021-09-29 1457 = 26859240e4ee701 Akhmat Karakotov 2022-01-31 @1458 case SO_TXREHASH: 26859240e4ee701 Akhmat Karakotov 2022-01-31 1459 if (val < -1 || = val > 1) { 26859240e4ee701 Akhmat Karakotov 2022-01-31 1460 ret =3D -EINVAL; 26859240e4ee701 Akhmat Karakotov 2022-01-31 1461 break; 26859240e4ee701 Akhmat Karakotov 2022-01-31 1462 } cb6cd2cec799356 Akhmat Karakotov 2022-01-31 1463 /* Paired with R= EAD_ONCE() in tcp_rtx_synack() */ cb6cd2cec799356 Akhmat Karakotov 2022-01-31 1464 WRITE_ONCE(sk->s= k_txrehash, (u8)val); 26859240e4ee701 Akhmat Karakotov 2022-01-31 1465 break; 26859240e4ee701 Akhmat Karakotov 2022-01-31 1466 = ^1da177e4c3f415 Linus Torvalds 2005-04-16 1467 default: ^1da177e4c3f415 Linus Torvalds 2005-04-16 1468 ret =3D -ENOPROT= OOPT; ^1da177e4c3f415 Linus Torvalds 2005-04-16 1469 break; ^1da177e4c3f415 Linus Torvalds 2005-04-16 1470 } ^1da177e4c3f415 Linus Torvalds 2005-04-16 1471 release_sock(sk); ^1da177e4c3f415 Linus Torvalds 2005-04-16 1472 return ret; ^1da177e4c3f415 Linus Torvalds 2005-04-16 1473 } 2a91525c20d3aae Eric Dumazet 2009-05-27 1474 EXPORT_SYMBOL(sock= _setsockopt); ^1da177e4c3f415 Linus Torvalds 2005-04-16 1475 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============1283130255041035405==--