netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Dmytro Shytyi <dmytro@shytyi.net>, kuba <kuba@kernel.org>,
	kuznet <kuznet@ms2.inr.ac.ru>, yoshfuji <yoshfuji@linux-ipv6.org>,
	liuhangbin <liuhangbin@gmail.com>, davem <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Cc: kbuild-all@lists.01.org
Subject: Re: Re: [PATCH net-next] net: Variable SLAAC: SLAAC with prefixes of arbitrary length in PIO
Date: Wed, 11 Nov 2020 09:34:24 +0800	[thread overview]
Message-ID: <202011110944.7zNVZmvB-lkp@intel.com> (raw)
In-Reply-To: <175b3433a4c.aea7c06513321.4158329434310691736@shytyi.net>

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

Hi Dmytro,

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/Dmytro-Shytyi/Re-PATCH-net-next-net-Variable-SLAAC-SLAAC-with-prefixes-of-arbitrary-length-in-PIO/20201111-014800
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 8be33ecfc1ffd2da20cc29e957e4cb6eb99310cb
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
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
        # https://github.com/0day-ci/linux/commit/0d851d20831574b490bbb131cb68f722dc2419ca
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Dmytro-Shytyi/Re-PATCH-net-next-net-Variable-SLAAC-SLAAC-with-prefixes-of-arbitrary-length-in-PIO/20201111-014800
        git checkout 0d851d20831574b490bbb131cb68f722dc2419ca
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   net/ipv6/addrconf.c: In function 'ipv6_create_tempaddr':
>> net/ipv6/addrconf.c:1329:2: error: expected expression before '__int128'
    1329 |  __int128 host_id;
         |  ^~~~~~~~
   net/ipv6/addrconf.c:1330:2: error: expected expression before '__int128'
    1330 |  __int128 net_prfx;
         |  ^~~~~~~~
   net/ipv6/addrconf.c:1331:2: error: expected expression before '__int128'
    1331 |  __int128 ipv6addr;
         |  ^~~~~~~~
   net/ipv6/addrconf.c:1332:2: error: expected expression before '__int128'
    1332 |  __int128 mask_128;
         |  ^~~~~~~~
   net/ipv6/addrconf.c:1333:2: error: expected expression before '__int128'
    1333 |  __int128 mask_host_id;
         |  ^~~~~~~~
   net/ipv6/addrconf.c:1334:2: error: expected expression before '__int128'
    1334 |  __int128 mask_net_prfx;
         |  ^~~~~~~~
>> net/ipv6/addrconf.c:1335:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
    1335 |  int i;
         |  ^~~
>> net/ipv6/addrconf.c:1338:10: error: 'mask_128' undeclared (first use in this function)
    1338 |  memset(&mask_128, 0xFF, 16);
         |          ^~~~~~~~
   net/ipv6/addrconf.c:1338:10: note: each undeclared identifier is reported only once for each function it appears in
>> net/ipv6/addrconf.c:1370:11: error: 'host_id' undeclared (first use in this function)
    1370 |   memcpy(&host_id, temp.s6_addr32, sizeof(host_id));
         |           ^~~~~~~
>> net/ipv6/addrconf.c:1371:11: error: 'net_prfx' undeclared (first use in this function)
    1371 |   memcpy(&net_prfx, addr.s6_addr, sizeof(net_prfx));
         |           ^~~~~~~~
>> net/ipv6/addrconf.c:1373:3: error: 'mask_host_id' undeclared (first use in this function); did you mean 'mask_host_id_arr'?
    1373 |   mask_host_id = ifp->prefix_len != 128 ? (mask_128 << ifp->prefix_len) : 0x0;
         |   ^~~~~~~~~~~~
         |   mask_host_id_arr
>> net/ipv6/addrconf.c:1380:3: error: 'mask_net_prfx' undeclared (first use in this function)
    1380 |   mask_net_prfx = mask_128 ^ mask_host_id;
         |   ^~~~~~~~~~~~~
>> net/ipv6/addrconf.c:1383:3: error: 'ipv6addr' undeclared (first use in this function); did you mean 'ipv6_hdr'?
    1383 |   ipv6addr = net_prfx | host_id;
         |   ^~~~~~~~
         |   ipv6_hdr
   net/ipv6/addrconf.c: In function 'addrconf_prefix_rcv_add_addr':
   net/ipv6/addrconf.c:2626:3: error: expected expression before '__int128'
    2626 |   __int128 mask_128;
         |   ^~~~~~~~
   net/ipv6/addrconf.c:2627:3: error: expected expression before '__int128'
    2627 |   __int128 mask_net_prfx;
         |   ^~~~~~~~
   net/ipv6/addrconf.c:2628:3: error: expected expression before '__int128'
    2628 |   __int128 net_prfx;
         |   ^~~~~~~~
   net/ipv6/addrconf.c:2629:3: error: expected expression before '__int128'
    2629 |   __int128 curr_net_prfx;
         |   ^~~~~~~~
   net/ipv6/addrconf.c:2630:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
    2630 |   int hostid_len;
         |   ^~~
   net/ipv6/addrconf.c:2634:11: error: 'mask_128' undeclared (first use in this function)
    2634 |   memset(&mask_128, 0xFF, 16);
         |           ^~~~~~~~
   net/ipv6/addrconf.c:2642:4: error: 'mask_net_prfx' undeclared (first use in this function)
    2642 |    mask_net_prfx = pinfo->prefix_len != 128 ? (mask_128 << pinfo->prefix_len) : 0x0;
         |    ^~~~~~~~~~~~~
   net/ipv6/addrconf.c:2650:12: error: 'net_prfx' undeclared (first use in this function)
    2650 |    memcpy(&net_prfx, pinfo->prefix.s6_addr32, 16);
         |            ^~~~~~~~
>> net/ipv6/addrconf.c:2654:12: error: 'curr_net_prfx' undeclared (first use in this function)
    2654 |    memcpy(&curr_net_prfx, ifp->addr.s6_addr32, 16);
         |            ^~~~~~~~~~~~~
>> net/ipv6/addrconf.c:2630:7: warning: variable 'hostid_len' set but not used [-Wunused-but-set-variable]
    2630 |   int hostid_len;
         |       ^~~~~~~~~~
   net/ipv6/addrconf.c: In function 'ipv6_generate_address_variable_plen':
   net/ipv6/addrconf.c:3424:2: error: expected expression before '__int128'
    3424 |  __int128 host_id;
         |  ^~~~~~~~
   net/ipv6/addrconf.c:3425:2: error: expected expression before '__int128'
    3425 |  __int128 net_prfx;
         |  ^~~~~~~~
   net/ipv6/addrconf.c:3426:2: error: expected expression before '__int128'
    3426 |  __int128 ipv6addr;
         |  ^~~~~~~~
   net/ipv6/addrconf.c:3427:2: error: expected expression before '__int128'
    3427 |  __int128 mask_128;
         |  ^~~~~~~~
   net/ipv6/addrconf.c:3428:2: error: expected expression before '__int128'
    3428 |  __int128 mask_host_id;
         |  ^~~~~~~~
   net/ipv6/addrconf.c:3429:2: error: expected expression before '__int128'
    3429 |  __int128 mask_net_prfx;
         |  ^~~~~~~~
   net/ipv6/addrconf.c:3430:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
    3430 |  int i;
         |  ^~~
   net/ipv6/addrconf.c:3433:10: error: 'mask_128' undeclared (first use in this function)
    3433 |  memset(&mask_128, 0xFF, 16);
         |          ^~~~~~~~
   net/ipv6/addrconf.c:3477:10: error: 'host_id' undeclared (first use in this function)
    3477 |  memcpy(&host_id, temp.s6_addr32, 16);
         |          ^~~~~~~
   net/ipv6/addrconf.c:3478:10: error: 'net_prfx' undeclared (first use in this function)
    3478 |  memcpy(&net_prfx, address->s6_addr32, 16);
         |          ^~~~~~~~
   net/ipv6/addrconf.c:3480:2: error: 'mask_host_id' undeclared (first use in this function); did you mean 'mask_host_id_arr'?
    3480 |  mask_host_id = rcvd_prfx_len != 128 ? (mask_128 << rcvd_prfx_len) : 0x0;
         |  ^~~~~~~~~~~~
         |  mask_host_id_arr
   net/ipv6/addrconf.c:3487:2: error: 'mask_net_prfx' undeclared (first use in this function)
    3487 |  mask_net_prfx = mask_128 ^ mask_host_id;
         |  ^~~~~~~~~~~~~
   net/ipv6/addrconf.c:3490:2: error: 'ipv6addr' undeclared (first use in this function); did you mean 'ipv6_hdr'?
    3490 |  ipv6addr = net_prfx | host_id;
         |  ^~~~~~~~
         |  ipv6_hdr

vim +/__int128 +1329 net/ipv6/addrconf.c

  1313	
  1314	static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, bool block)
  1315	{
  1316		struct inet6_dev *idev = ifp->idev;
  1317		unsigned long tmp_tstamp, age;
  1318		unsigned long regen_advance;
  1319		unsigned long now = jiffies;
  1320		s32 cnf_temp_preferred_lft;
  1321		struct inet6_ifaddr *ift;
  1322		struct ifa6_config cfg;
  1323		long max_desync_factor;
  1324	
  1325		struct in6_addr temp, addr;
  1326	
  1327		int ret = 0;
  1328	
> 1329		__int128 host_id;
  1330		__int128 net_prfx;
  1331		__int128 ipv6addr;
  1332		__int128 mask_128;
  1333		__int128 mask_host_id;
  1334		__int128 mask_net_prfx;
> 1335		int i;
  1336		unsigned char mask_host_id_arr[128];
  1337	
> 1338		memset(&mask_128, 0xFF, 16);
  1339		write_lock_bh(&idev->lock);
  1340	
  1341	retry:
  1342		in6_dev_hold(idev);
  1343		if (idev->cnf.use_tempaddr <= 0) {
  1344			write_unlock_bh(&idev->lock);
  1345			pr_info("%s: use_tempaddr is disabled\n", __func__);
  1346			in6_dev_put(idev);
  1347			ret = -1;
  1348			goto out;
  1349		}
  1350		spin_lock_bh(&ifp->lock);
  1351		if (ifp->regen_count++ >= idev->cnf.regen_max_retry) {
  1352			idev->cnf.use_tempaddr = -1;	/*XXX*/
  1353			spin_unlock_bh(&ifp->lock);
  1354			write_unlock_bh(&idev->lock);
  1355			pr_warn("%s: regeneration time exceeded - disabled temporary address support\n",
  1356				__func__);
  1357			in6_dev_put(idev);
  1358			ret = -1;
  1359			goto out;
  1360		}
  1361		in6_ifa_hold(ifp);
  1362	
  1363		if (ifp->prefix_len == 64) {
  1364			memcpy(addr.s6_addr, ifp->addr.s6_addr, 8);
  1365			ipv6_gen_rnd_iid(&addr);
  1366		} else if (ifp->prefix_len > 0 && ifp->prefix_len <= 128) {
  1367			memcpy(addr.s6_addr, ifp->addr.s6_addr, 16);
  1368			get_random_bytes(temp.s6_addr32, 16);
  1369	
> 1370			memcpy(&host_id, temp.s6_addr32, sizeof(host_id));
> 1371			memcpy(&net_prfx, addr.s6_addr, sizeof(net_prfx));
  1372	
> 1373			mask_host_id = ifp->prefix_len != 128 ? (mask_128 << ifp->prefix_len) : 0x0;
  1374			memcpy(mask_host_id_arr, &mask_host_id, 16);
  1375			for (i = 0; i < 128; i++)
  1376				mask_host_id_arr[i] = reverse_bits(mask_host_id_arr[i]);
  1377			memcpy(&mask_host_id, mask_host_id_arr, 16);
  1378			host_id = host_id & mask_host_id;
  1379	
> 1380			mask_net_prfx = mask_128 ^ mask_host_id;
  1381			net_prfx = net_prfx & mask_net_prfx;
  1382	
> 1383			ipv6addr = net_prfx | host_id;
  1384			memcpy(addr.s6_addr, &ipv6addr, 16);
  1385		}
  1386		age = (now - ifp->tstamp) / HZ;
  1387	
  1388		regen_advance = idev->cnf.regen_max_retry *
  1389				idev->cnf.dad_transmits *
  1390				max(NEIGH_VAR(idev->nd_parms, RETRANS_TIME), HZ/100) / HZ;
  1391	
  1392		/* recalculate max_desync_factor each time and update
  1393		 * idev->desync_factor if it's larger
  1394		 */
  1395		cnf_temp_preferred_lft = READ_ONCE(idev->cnf.temp_prefered_lft);
  1396		max_desync_factor = min_t(__u32,
  1397					  idev->cnf.max_desync_factor,
  1398					  cnf_temp_preferred_lft - regen_advance);
  1399	
  1400		if (unlikely(idev->desync_factor > max_desync_factor)) {
  1401			if (max_desync_factor > 0) {
  1402				get_random_bytes(&idev->desync_factor,
  1403						 sizeof(idev->desync_factor));
  1404				idev->desync_factor %= max_desync_factor;
  1405			} else {
  1406				idev->desync_factor = 0;
  1407			}
  1408		}
  1409	
  1410		memset(&cfg, 0, sizeof(cfg));
  1411		cfg.valid_lft = min_t(__u32, ifp->valid_lft,
  1412				      idev->cnf.temp_valid_lft + age);
  1413		cfg.preferred_lft = cnf_temp_preferred_lft + age - idev->desync_factor;
  1414		cfg.preferred_lft = min_t(__u32, ifp->prefered_lft, cfg.preferred_lft);
  1415	
  1416		cfg.plen = ifp->prefix_len;
  1417		tmp_tstamp = ifp->tstamp;
  1418		spin_unlock_bh(&ifp->lock);
  1419	
  1420		write_unlock_bh(&idev->lock);
  1421	
  1422		/* A temporary address is created only if this calculated Preferred
  1423		 * Lifetime is greater than REGEN_ADVANCE time units.  In particular,
  1424		 * an implementation must not create a temporary address with a zero
  1425		 * Preferred Lifetime.
  1426		 * Use age calculation as in addrconf_verify to avoid unnecessary
  1427		 * temporary addresses being generated.
  1428		 */
  1429		age = (now - tmp_tstamp + ADDRCONF_TIMER_FUZZ_MINUS) / HZ;
  1430		if (cfg.preferred_lft <= regen_advance + age) {
  1431			in6_ifa_put(ifp);
  1432			in6_dev_put(idev);
  1433			ret = -1;
  1434			goto out;
  1435		}
  1436	
  1437		cfg.ifa_flags = IFA_F_TEMPORARY;
  1438		/* set in addrconf_prefix_rcv() */
  1439		if (ifp->flags & IFA_F_OPTIMISTIC)
  1440			cfg.ifa_flags |= IFA_F_OPTIMISTIC;
  1441	
  1442		cfg.pfx = &addr;
  1443		cfg.scope = ipv6_addr_scope(cfg.pfx);
  1444	
  1445		ift = ipv6_add_addr(idev, &cfg, block, NULL);
  1446		if (IS_ERR(ift)) {
  1447			in6_ifa_put(ifp);
  1448			in6_dev_put(idev);
  1449			pr_info("%s: retry temporary address regeneration\n", __func__);
  1450			write_lock_bh(&idev->lock);
  1451			goto retry;
  1452		}
  1453	
  1454		spin_lock_bh(&ift->lock);
  1455		ift->ifpub = ifp;
  1456		ift->cstamp = now;
  1457		ift->tstamp = tmp_tstamp;
  1458		spin_unlock_bh(&ift->lock);
  1459	
  1460		addrconf_dad_start(ift);
  1461		in6_ifa_put(ift);
  1462		in6_dev_put(idev);
  1463	out:
  1464		return ret;
  1465	}
  1466	

---
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: 53504 bytes --]

  reply	other threads:[~2020-11-11  1:35 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <175b25d0c79.f8ce5734515834.1635475016968827598@shytyi.net>
2020-11-10 17:45 ` [PATCH net-next] net: Variable SLAAC: SLAAC with prefixes of arbitrary length in PIO Dmytro Shytyi
2020-11-11  1:34   ` kernel test robot [this message]
2020-11-11 20:37     ` [PATCH net-next V2] " Dmytro Shytyi
2020-11-12 15:44     ` [PATCH net-next V3] " Dmytro Shytyi
2020-11-12 16:55       ` Hideaki Yoshifuji
2020-11-13  1:50         ` Dmytro Shytyi
2020-11-13  0:21       ` Jakub Kicinski
2020-11-13  1:50         ` Dmytro Shytyi
2020-11-13  1:56       ` [PATCH net-next V4] " Dmytro Shytyi
2020-11-13 12:38         ` Hideaki Yoshifuji
2020-11-13 19:09           ` Dmytro Shytyi
2020-11-13 19:36         ` [PATCH net-next V5] " Dmytro Shytyi
2020-11-17 20:43           ` Jakub Kicinski
2020-11-18 13:41             ` Dmytro Shytyi
2020-11-18 15:50               ` Jakub Kicinski
2020-11-18 15:56                 ` Dmytro Shytyi
2020-11-19 13:37             ` [PATCH net-next V6] " Dmytro Shytyi
2020-11-19 18:44               ` Jakub Kicinski
2020-11-19 19:31                 ` Dmytro Shytyi
2020-11-20  1:20                   ` Jakub Kicinski
2020-11-20  9:26                   ` [PATCH net-next V7] " Dmytro Shytyi
2020-11-23 13:26                     ` Hideaki Yoshifuji
2020-11-27 16:54                       ` Dmytro Shytyi
2020-12-09  3:27                     ` [PATCH net-next V8] " Dmytro Shytyi
2020-12-16  0:00                       ` David Miller
2020-12-16 14:01                         ` Dmytro Shytyi
2020-12-16 17:28                           ` Jakub Kicinski
2020-12-16 21:56                             ` Dmytro Shytyi
2020-12-16 22:01                       ` [PATCH net-next V9] " Dmytro Shytyi
2020-12-19  2:03                         ` Jakub Kicinski
2020-12-19  2:40                           ` Maciej Żenczykowski
2021-07-12 13:39                             ` Dmytro Shytyi
2021-07-12 16:42                               ` Dmytro Shytyi
2021-07-12 17:51                                 ` Erik Kline
2021-07-13 18:47                                   ` Dmytro Shytyi
     [not found]                                   ` <191421fdb45.105ccb455117398.7522619910466771280@shytyi.net>
2024-08-11 17:16                                     ` Dmytro Shytyi
2024-08-12 16:34                                       ` Maciej Żenczykowski
2024-08-12 17:39                                         ` Dmytro Shytyi
2024-08-18  4:48                                           ` Erik Kline
2024-08-18 11:27                                             ` Dmytro Shytyi
2024-08-18 11:42                                             ` Lorenzo Colitti
2021-07-10 19:24                           ` Dmytro Shytyi
2021-07-12 13:23                             ` Dmytro Shytyi
2021-10-13 23:03                         ` [PATCH net-next V10] " Dmytro Shytyi
2021-10-13 23:20                           ` Dmytro Shytyi
2021-10-14 18:26                             ` Erik Kline
2021-10-14 21:36                               ` Dmytro Shytyi
2021-10-14 13:20                           ` kernel test robot
2020-11-13  0:24     ` [PATCH net-next] " Jakub Kicinski
2020-11-13  0:32       ` [kbuild-all] " Li, Philip
2020-11-13  0:51         ` Jakub Kicinski
2020-11-13  1:01           ` Li, Philip
2020-11-13  1:43       ` Dave Hansen
2020-11-13  1:53         ` Jakub Kicinski
2020-11-13  2:01           ` Dave Hansen

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=202011110944.7zNVZmvB-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=dmytro@shytyi.net \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuhangbin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.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 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).