Re: [PATCH bpf-next 4/9] xdp: Implement chain call logic to support multiple programs on one interface

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

 



Hi "Toke,

I love your patch! Yet something to improve:

[auto build test ERROR on bpf-next/master]

url:    https://github.com/0day-ci/linux/commits/Toke-H-iland-J-rgensen/xdp-Support-multiple-programs-on-a-single-interface-through-chain-calls/20191003-005238
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: sparc64-allnoconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=sparc64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   In file included from include/net/sock.h:59:0,
                    from include/linux/tcp.h:19,
                    from include/linux/ipv6.h:87,
                    from include/net/ipv6.h:12,
                    from include/linux/sunrpc/clnt.h:28,
                    from include/linux/nfs_fs.h:32,
                    from arch/sparc/kernel/sys_sparc32.c:25:
   include/linux/filter.h: In function 'bpf_prog_run_xdp':
   include/linux/filter.h:725:10: error: implicit declaration of function 'bpf_xdp_chain_map_get_prog' [-Werror=implicit-function-declaration]
      prog = bpf_xdp_chain_map_get_prog(chain_map, prog->aux->id, ret);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/filter.h:725:8: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
      prog = bpf_xdp_chain_map_get_prog(chain_map, prog->aux->id, ret);
           ^
   cc1: all warnings being treated as errors

vim +725 include/linux/filter.h

   695	
   696	#define BPF_XDP_MAX_CHAIN_CALLS 32
   697	static __always_inline u32 bpf_prog_run_xdp(const struct bpf_prog *prog,
   698						    struct xdp_buff *xdp)
   699	{
   700		/* Caller needs to hold rcu_read_lock() (!), otherwise program
   701		 * can be released while still running, or map elements could be
   702		 * freed early while still having concurrent users. XDP fastpath
   703		 * already takes rcu_read_lock() when fetching the program, so
   704		 * it's not necessary here anymore.
   705		 */
   706	
   707		int i = BPF_XDP_MAX_CHAIN_CALLS;
   708		struct bpf_map *chain_map;
   709		u32 ret;
   710	
   711		chain_map = rcu_dereference(xdp->rxq->dev->xdp_chain_map);
   712		if (!chain_map)
   713			return BPF_PROG_RUN(prog, xdp);
   714	
   715		do {
   716			if (!--i) {
   717				ret = XDP_ABORTED;
   718				goto out;
   719			}
   720	
   721			ret = BPF_PROG_RUN(prog, xdp);
   722			if (ret == XDP_ABORTED)
   723				goto out;
   724	
 > 725			prog = bpf_xdp_chain_map_get_prog(chain_map, prog->aux->id, ret);
   726		} while(prog);
   727	
   728	out:
   729		return ret;
   730	}
   731	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[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