Subject: Re: [bpf-next PATCH 3/3] xdp: split code for map vs non-map redirect

From: kbuild test robot <[email-masked]>
Date: Tue, 4 Sep 2018 23:39:45 +0800

Hi Jesper,

Thank you for the patch! Perhaps something to improve:

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

url:    https://github.com/0day-ci/linux/commits/Jesper-Dangaard-Brouer/XDP-micro-optimizations-for-redirect/20180903-121606
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago

   net/core/filter.c:116:48: sparse: expression using sizeof(void)
   net/core/filter.c:116:48: sparse: expression using sizeof(void)
   net/core/filter.c:210:32: sparse: cast to restricted __be16
   net/core/filter.c:210:32: sparse: cast to restricted __be16
   net/core/filter.c:210:32: sparse: cast to restricted __be16
   net/core/filter.c:210:32: sparse: cast to restricted __be16
   net/core/filter.c:210:32: sparse: cast to restricted __be16
   net/core/filter.c:210:32: sparse: cast to restricted __be16
   net/core/filter.c:210:32: sparse: cast to restricted __be16
   net/core/filter.c:210:32: sparse: cast to restricted __be16
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:410:33: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:413:33: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:416:33: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:419:33: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:422:33: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:495:27: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:498:27: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:501:27: sparse: subtraction of functions? Share your drugs
   include/linux/slab.h:631:13: sparse: undefined identifier '__builtin_mul_overflow'
   include/linux/slab.h:631:13: sparse: not a function <noident>
   include/linux/filter.h:644:16: sparse: expression using sizeof(void)
   include/linux/filter.h:644:16: sparse: expression using sizeof(void)
   include/linux/filter.h:644:16: sparse: expression using sizeof(void)
   include/linux/filter.h:644:16: sparse: expression using sizeof(void)
   net/core/filter.c:1389:39: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct sock_filter const *filter @@    got struct sockstruct sock_filter const *filter @@
   net/core/filter.c:1389:39:    expected struct sock_filter const *filter
   net/core/filter.c:1389:39:    got struct sock_filter [noderef] <asn:1>*filter
   include/linux/filter.h:644:16: sparse: expression using sizeof(void)
   net/core/filter.c:1467:39: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct sock_filter const *filter @@    got struct sockstruct sock_filter const *filter @@
   net/core/filter.c:1467:39:    expected struct sock_filter const *filter
   net/core/filter.c:1467:39:    got struct sock_filter [noderef] <asn:1>*filter
   include/linux/filter.h:644:16: sparse: expression using sizeof(void)
   include/linux/filter.h:644:16: sparse: expression using sizeof(void)
   include/linux/filter.h:644:16: sparse: expression using sizeof(void)
   net/core/filter.c:1843:43: sparse: incorrect type in argument 2 (different base types) @@    expected restricted __wsum [usertype] diff @@    got unsigned lonrestricted __wsum [usertype] diff @@
   net/core/filter.c:1843:43:    expected restricted __wsum [usertype] diff
   net/core/filter.c:1843:43:    got unsigned long long [unsigned] [usertype] to
   net/core/filter.c:1846:36: sparse: incorrect type in argument 2 (different base types) @@    expected restricted __be16 [usertype] old @@    got unsigned lonrestricted __be16 [usertype] old @@
   net/core/filter.c:1846:36:    expected restricted __be16 [usertype] old
   net/core/filter.c:1846:36:    got unsigned long long [unsigned] [usertype] from
   net/core/filter.c:1846:42: sparse: incorrect type in argument 3 (different base types) @@    expected restricted __be16 [usertype] new @@    got unsigned lonrestricted __be16 [usertype] new @@
   net/core/filter.c:1846:42:    expected restricted __be16 [usertype] new
   net/core/filter.c:1846:42:    got unsigned long long [unsigned] [usertype] to
   net/core/filter.c:1849:36: sparse: incorrect type in argument 2 (different base types) @@    expected restricted __be32 [usertype] from @@    got unsigned lonrestricted __be32 [usertype] from @@
   net/core/filter.c:1849:36:    expected restricted __be32 [usertype] from
   net/core/filter.c:1849:36:    got unsigned long long [unsigned] [usertype] from
   net/core/filter.c:1849:42: sparse: incorrect type in argument 3 (different base types) @@    expected restricted __be32 [usertype] to @@    got unsigned lonrestricted __be32 [usertype] to @@
   net/core/filter.c:1849:42:    expected restricted __be32 [usertype] to
   net/core/filter.c:1849:42:    got unsigned long long [unsigned] [usertype] to
   net/core/filter.c:1894:59: sparse: incorrect type in argument 3 (different base types) @@    expected restricted __wsum [usertype] diff @@    got unsigned lonrestricted __wsum [usertype] diff @@
   net/core/filter.c:1894:59:    expected restricted __wsum [usertype] diff
   net/core/filter.c:1894:59:    got unsigned long long [unsigned] [usertype] to
   net/core/filter.c:1897:52: sparse: incorrect type in argument 3 (different base types) @@    expected restricted __be16 [usertype] from @@    got unsigned lonrestricted __be16 [usertype] from @@
   net/core/filter.c:1897:52:    expected restricted __be16 [usertype] from
   net/core/filter.c:1897:52:    got unsigned long long [unsigned] [usertype] from
   net/core/filter.c:1897:58: sparse: incorrect type in argument 4 (different base types) @@    expected restricted __be16 [usertype] to @@    got unsigned lonrestricted __be16 [usertype] to @@
   net/core/filter.c:1897:58:    expected restricted __be16 [usertype] to
   net/core/filter.c:1897:58:    got unsigned long long [unsigned] [usertype] to
   net/core/filter.c:1900:52: sparse: incorrect type in argument 3 (different base types) @@    expected restricted __be32 [usertype] from @@    got unsigned lonrestricted __be32 [usertype] from @@
   net/core/filter.c:1900:52:    expected restricted __be32 [usertype] from
   net/core/filter.c:1900:52:    got unsigned long long [unsigned] [usertype] from
   net/core/filter.c:1900:58: sparse: incorrect type in argument 4 (different base types) @@    expected restricted __be32 [usertype] to @@    got unsigned lonrestricted __be32 [usertype] to @@
   net/core/filter.c:1900:58:    expected restricted __be32 [usertype] to
   net/core/filter.c:1900:58:    got unsigned long long [unsigned] [usertype] to
   net/core/filter.c:1946:28: sparse: incorrect type in return expression (different base types) @@    expected unsigned long long @@    got nsigned long long @@
   net/core/filter.c:1946:28:    expected unsigned long long
   net/core/filter.c:1946:28:    got restricted __wsum
   net/core/filter.c:1968:35: sparse: incorrect type in return expression (different base types) @@    expected unsigned long long @@    got restricted unsigned long long @@
   net/core/filter.c:1968:35:    expected unsigned long long
   net/core/filter.c:1968:35:    got restricted __wsum [usertype] csum
>> net/core/filter.c:3174:5: sparse: symbol 'xdp_do_redirect_slow' was not declared. Should it be static?
   net/core/filter.c:3914:41: sparse: expression using sizeof(void)
   net/core/filter.c:3918:41: sparse: expression using sizeof(void)
   net/core/filter.c:3922:46: sparse: expression using sizeof(void)
   net/core/filter.c:3922:46: sparse: expression using sizeof(void)
   net/core/filter.c:3990:47: sparse: expression using sizeof(void)
   net/core/filter.c:4213:17: sparse: incorrect type in assignment (different base types) @@    expected unsigned int [unsigned] [usertype] spi @@    got unsigned int [unsigned] [usertype] spi @@
   net/core/filter.c:4213:17:    expected unsigned int [unsigned] [usertype] spi
   net/core/filter.c:4213:17:    got restricted __be32 const [usertype] spi
   net/core/filter.c:4221:33: sparse: incorrect type in assignment (different base types) @@    expected unsigned int [unsigned] [usertype] remote_ipv4 @@    got unsigned int [unsigned] [usertype] remote_ipv4 @@
   net/core/filter.c:4221:33:    expected unsigned int [unsigned] [usertype] remote_ipv4
   net/core/filter.c:4221:33:    got restricted __be32 const [usertype] a4
   net/core/filter.c:5447:27: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:5450:27: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:5453:27: sparse: subtraction of functions? Share your drugs
   include/linux/slab.h:631:13: sparse: call with no type!

Please review and possibly fold the followup patch.

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