Re: [PATCH bpf v3 2/2] bpf: sockmap, add af_unix test with both sockets in map

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi John,

kernel test robot noticed the following build errors:

[auto build test ERROR on bpf/master]

url:    https://github.com/intel-lab-lkp/linux/commits/John-Fastabend/bpf-sockmap-af_unix-stream-sockets-need-to-hold-ref-for-pair-sock/20231128-235707
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git master
patch link:    https://lore.kernel.org/r/20231128155515.9302-3-john.fastabend%40gmail.com
patch subject: [PATCH bpf v3 2/2] bpf: sockmap, add af_unix test with both sockets in map
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231129/202311290745.tAZIyCyC-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311290745.tAZIyCyC-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   tools/testing/selftests/bpf/prog_tests/sockmap_listen.c: In function 'pairs_redir_to_connected':
>> tools/testing/selftests/bpf/prog_tests/sockmap_listen.c:1355:13: error: 'nop_madfd' undeclared (first use in this function); did you mean 'nop_mapfd'?
    1355 |         if (nop_madfd >= 0) {
         |             ^~~~~~~~~
         |             nop_mapfd
   tools/testing/selftests/bpf/prog_tests/sockmap_listen.c:1355:13: note: each undeclared identifier is reported only once for each function it appears in


vim +1355 tools/testing/selftests/bpf/prog_tests/sockmap_listen.c

  1338	
  1339	static void pairs_redir_to_connected(int cli0, int peer0, int cli1, int peer1,
  1340					     int sock_mapfd, int nop_mapfd,
  1341					     int verd_mapfd, enum redir_mode mode)
  1342	{
  1343		const char *log_prefix = redir_mode_str(mode);
  1344		unsigned int pass;
  1345		int err, n;
  1346		u32 key;
  1347		char b;
  1348	
  1349		zero_verdict_count(verd_mapfd);
  1350	
  1351		err = add_to_sockmap(sock_mapfd, peer0, peer1);
  1352		if (err)
  1353			return;
  1354	
> 1355		if (nop_madfd >= 0) {
  1356			err = add_to_sockmap(nop_mapfd, cli0, cli1);
  1357			if (err)
  1358				return;
  1359		}
  1360	
  1361		n = write(cli1, "a", 1);
  1362		if (n < 0)
  1363			FAIL_ERRNO("%s: write", log_prefix);
  1364		if (n == 0)
  1365			FAIL("%s: incomplete write", log_prefix);
  1366		if (n < 1)
  1367			return;
  1368	
  1369		key = SK_PASS;
  1370		err = xbpf_map_lookup_elem(verd_mapfd, &key, &pass);
  1371		if (err)
  1372			return;
  1373		if (pass != 1)
  1374			FAIL("%s: want pass count 1, have %d", log_prefix, pass);
  1375	
  1376		n = recv_timeout(mode == REDIR_INGRESS ? peer0 : cli0, &b, 1, 0, IO_TIMEOUT_SEC);
  1377		if (n < 0)
  1378			FAIL_ERRNO("%s: recv_timeout", log_prefix);
  1379		if (n == 0)
  1380			FAIL("%s: incomplete recv", log_prefix);
  1381	}
  1382	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux