* [bpf-next PATCH 0/3] XDP micro optimizations for redirect @ 2018-08-31 15:26 Jesper Dangaard Brouer 2018-08-31 15:26 ` [bpf-next PATCH 1/3] xdp: unlikely instrumentation for xdp map redirect Jesper Dangaard Brouer ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: Jesper Dangaard Brouer @ 2018-08-31 15:26 UTC (permalink / raw) To: netdev; +Cc: Daniel Borkmann, Alexei Starovoitov, Jesper Dangaard Brouer This patchset contains XDP micro optimizations for the redirect core. These are not functional changes. The optimizations revolve around getting the compiler to layout the code in a way that reflect how XDP redirect is used. Today the compiler chooses to inline and uninline (static C functions) in a suboptimal way, compared to how XDP redirect can be used. Perf top clearly shows that almost everything gets inlined into the function call xdp_do_redirect. The way the compiler chooses to inlines, does not reflect how XDP redirect is used, as the compile cannot know this. --- Jesper Dangaard Brouer (3): xdp: unlikely instrumentation for xdp map redirect xdp: explicit inline __xdp_map_lookup_elem xdp: split code for map vs non-map redirect net/core/filter.c | 64 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 28 deletions(-) ^ permalink raw reply [flat|nested] 8+ messages in thread
* [bpf-next PATCH 1/3] xdp: unlikely instrumentation for xdp map redirect 2018-08-31 15:26 [bpf-next PATCH 0/3] XDP micro optimizations for redirect Jesper Dangaard Brouer @ 2018-08-31 15:26 ` Jesper Dangaard Brouer 2018-08-31 15:26 ` [bpf-next PATCH 2/3] xdp: explicit inline __xdp_map_lookup_elem Jesper Dangaard Brouer 2018-08-31 15:26 ` [bpf-next PATCH 3/3] xdp: split code for map vs non-map redirect Jesper Dangaard Brouer 2 siblings, 0 replies; 8+ messages in thread From: Jesper Dangaard Brouer @ 2018-08-31 15:26 UTC (permalink / raw) To: netdev; +Cc: Daniel Borkmann, Alexei Starovoitov, Jesper Dangaard Brouer Notice the compiler generated ASM code layout was suboptimal. It assumed map enqueue errors as the likely case, which is shouldn't. It assumed that xdp_do_flush_map() was a likely case, due to maps changing between packets, which should be very unlikely. Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> --- net/core/filter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/core/filter.c b/net/core/filter.c index c25eb36f1320..520f5e9e0b73 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -3182,7 +3182,7 @@ static int __bpf_tx_xdp_map(struct net_device *dev_rx, void *fwd, struct bpf_dtab_netdev *dst = fwd; err = dev_map_enqueue(dst, xdp, dev_rx); - if (err) + if (unlikely(err)) return err; __dev_map_insert_ctx(map, index); break; @@ -3191,7 +3191,7 @@ static int __bpf_tx_xdp_map(struct net_device *dev_rx, void *fwd, struct bpf_cpu_map_entry *rcpu = fwd; err = cpu_map_enqueue(rcpu, xdp, dev_rx); - if (err) + if (unlikely(err)) return err; __cpu_map_insert_ctx(map, index); break; @@ -3279,7 +3279,7 @@ static int xdp_do_redirect_map(struct net_device *dev, struct xdp_buff *xdp, err = -EINVAL; goto err; } - if (ri->map_to_flush && ri->map_to_flush != map) + if (ri->map_to_flush && unlikely(ri->map_to_flush != map)) xdp_do_flush_map(); err = __bpf_tx_xdp_map(dev, fwd, map, xdp, index); ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bpf-next PATCH 2/3] xdp: explicit inline __xdp_map_lookup_elem 2018-08-31 15:26 [bpf-next PATCH 0/3] XDP micro optimizations for redirect Jesper Dangaard Brouer 2018-08-31 15:26 ` [bpf-next PATCH 1/3] xdp: unlikely instrumentation for xdp map redirect Jesper Dangaard Brouer @ 2018-08-31 15:26 ` Jesper Dangaard Brouer 2018-08-31 15:26 ` [bpf-next PATCH 3/3] xdp: split code for map vs non-map redirect Jesper Dangaard Brouer 2 siblings, 0 replies; 8+ messages in thread From: Jesper Dangaard Brouer @ 2018-08-31 15:26 UTC (permalink / raw) To: netdev; +Cc: Daniel Borkmann, Alexei Starovoitov, Jesper Dangaard Brouer The compiler chooses to not-inline the function __xdp_map_lookup_elem, because it can see that it is used by both Generic-XDP and native-XDP do redirect calls (xdp_do_generic_redirect_map and xdp_do_redirect_map). The compiler cannot know that this is a bad choice, as it cannot know that a net device cannot run both XDP modes (Generic or Native) at the same time. Thus, mark this function inline, even-though we normally leave this up-to the compiler. Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> --- net/core/filter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/core/filter.c b/net/core/filter.c index 520f5e9e0b73..ec1b4eb0d3d4 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -3232,7 +3232,7 @@ void xdp_do_flush_map(void) } EXPORT_SYMBOL_GPL(xdp_do_flush_map); -static void *__xdp_map_lookup_elem(struct bpf_map *map, u32 index) +static inline void *__xdp_map_lookup_elem(struct bpf_map *map, u32 index) { switch (map->map_type) { case BPF_MAP_TYPE_DEVMAP: @@ -3275,7 +3275,7 @@ static int xdp_do_redirect_map(struct net_device *dev, struct xdp_buff *xdp, WRITE_ONCE(ri->map, NULL); fwd = __xdp_map_lookup_elem(map, index); - if (!fwd) { + if (unlikely(!fwd)) { err = -EINVAL; goto err; } @@ -3303,7 +3303,7 @@ int xdp_do_redirect(struct net_device *dev, struct xdp_buff *xdp, u32 index = ri->ifindex; int err; - if (map) + if (likely(map)) return xdp_do_redirect_map(dev, xdp, xdp_prog, map); fwd = dev_get_by_index_rcu(dev_net(dev), index); ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bpf-next PATCH 3/3] xdp: split code for map vs non-map redirect 2018-08-31 15:26 [bpf-next PATCH 0/3] XDP micro optimizations for redirect Jesper Dangaard Brouer 2018-08-31 15:26 ` [bpf-next PATCH 1/3] xdp: unlikely instrumentation for xdp map redirect Jesper Dangaard Brouer 2018-08-31 15:26 ` [bpf-next PATCH 2/3] xdp: explicit inline __xdp_map_lookup_elem Jesper Dangaard Brouer @ 2018-08-31 15:26 ` Jesper Dangaard Brouer 2018-08-31 18:37 ` Daniel Borkmann ` (2 more replies) 2 siblings, 3 replies; 8+ messages in thread From: Jesper Dangaard Brouer @ 2018-08-31 15:26 UTC (permalink / raw) To: netdev; +Cc: Daniel Borkmann, Alexei Starovoitov, Jesper Dangaard Brouer The compiler does an efficient job of inlining static C functions. Perf top clearly shows that almost everything gets inlined into the function call xdp_do_redirect. The function xdp_do_redirect end-up containing and interleaving the map and non-map redirect code. This is sub-optimal, as it would be strange for an XDP program to use both types of redirect in the same program. The two use-cases are separate, and interleaving the code just cause more instruction-cache pressure. I would like to stress (again) that the non-map variant bpf_redirect is very slow compared to the bpf_redirect_map variant, approx half the speed. Measured with driver i40e the difference is: - map redirect: 13,250,350 pps - non-map redirect: 7,491,425 pps For this reason, the function name of the non-map variant of redirect have been called xdp_do_redirect_slow. This hopefully gives a hint when using perf, that this is not the optimal XDP redirect operating mode. Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> --- net/core/filter.c | 52 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/net/core/filter.c b/net/core/filter.c index ec1b4eb0d3d4..c4ad1b93167f 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -3170,6 +3170,32 @@ static int __bpf_tx_xdp(struct net_device *dev, return 0; } +/* non-static to avoid inline by compiler */ +int xdp_do_redirect_slow(struct net_device *dev, struct xdp_buff *xdp, + struct bpf_prog *xdp_prog, struct bpf_redirect_info *ri) +{ + struct net_device *fwd; + u32 index = ri->ifindex; + int err; + + fwd = dev_get_by_index_rcu(dev_net(dev), index); + ri->ifindex = 0; + if (unlikely(!fwd)) { + err = -EINVAL; + goto err; + } + + err = __bpf_tx_xdp(fwd, NULL, xdp, 0); + if (unlikely(err)) + goto err; + + _trace_xdp_redirect(dev, xdp_prog, index); + return 0; +err: + _trace_xdp_redirect_err(dev, xdp_prog, index, err); + return err; +} + static int __bpf_tx_xdp_map(struct net_device *dev_rx, void *fwd, struct bpf_map *map, struct xdp_buff *xdp, @@ -3264,9 +3290,9 @@ void bpf_clear_redirect_map(struct bpf_map *map) } static int xdp_do_redirect_map(struct net_device *dev, struct xdp_buff *xdp, - struct bpf_prog *xdp_prog, struct bpf_map *map) + struct bpf_prog *xdp_prog, struct bpf_map *map, + struct bpf_redirect_info *ri) { - struct bpf_redirect_info *ri = this_cpu_ptr(&bpf_redirect_info); u32 index = ri->ifindex; void *fwd = NULL; int err; @@ -3299,29 +3325,11 @@ int xdp_do_redirect(struct net_device *dev, struct xdp_buff *xdp, { struct bpf_redirect_info *ri = this_cpu_ptr(&bpf_redirect_info); struct bpf_map *map = READ_ONCE(ri->map); - struct net_device *fwd; - u32 index = ri->ifindex; - int err; if (likely(map)) - return xdp_do_redirect_map(dev, xdp, xdp_prog, map); + return xdp_do_redirect_map(dev, xdp, xdp_prog, map, ri); - fwd = dev_get_by_index_rcu(dev_net(dev), index); - ri->ifindex = 0; - if (unlikely(!fwd)) { - err = -EINVAL; - goto err; - } - - err = __bpf_tx_xdp(fwd, NULL, xdp, 0); - if (unlikely(err)) - goto err; - - _trace_xdp_redirect(dev, xdp_prog, index); - return 0; -err: - _trace_xdp_redirect_err(dev, xdp_prog, index, err); - return err; + return xdp_do_redirect_slow(dev, xdp, xdp_prog, ri); } EXPORT_SYMBOL_GPL(xdp_do_redirect); ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [bpf-next PATCH 3/3] xdp: split code for map vs non-map redirect 2018-08-31 15:26 ` [bpf-next PATCH 3/3] xdp: split code for map vs non-map redirect Jesper Dangaard Brouer @ 2018-08-31 18:37 ` Daniel Borkmann 2018-09-04 15:39 ` [RFC PATCH] xdp: xdp_do_redirect_slow() can be static kbuild test robot 2018-09-04 15:39 ` [bpf-next PATCH 3/3] xdp: split code for map vs non-map redirect kbuild test robot 2 siblings, 0 replies; 8+ messages in thread From: Daniel Borkmann @ 2018-08-31 18:37 UTC (permalink / raw) To: Jesper Dangaard Brouer, netdev; +Cc: Alexei Starovoitov On 08/31/2018 05:26 PM, Jesper Dangaard Brouer wrote: > The compiler does an efficient job of inlining static C functions. > Perf top clearly shows that almost everything gets inlined into the > function call xdp_do_redirect. > > The function xdp_do_redirect end-up containing and interleaving the > map and non-map redirect code. This is sub-optimal, as it would be > strange for an XDP program to use both types of redirect in the same > program. The two use-cases are separate, and interleaving the code > just cause more instruction-cache pressure. > > I would like to stress (again) that the non-map variant bpf_redirect > is very slow compared to the bpf_redirect_map variant, approx half the > speed. Measured with driver i40e the difference is: > > - map redirect: 13,250,350 pps > - non-map redirect: 7,491,425 pps > > For this reason, the function name of the non-map variant of redirect > have been called xdp_do_redirect_slow. This hopefully gives a hint > when using perf, that this is not the optimal XDP redirect operating mode. > > Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> > --- > net/core/filter.c | 52 ++++++++++++++++++++++++++++++---------------------- > 1 file changed, 30 insertions(+), 22 deletions(-) > > diff --git a/net/core/filter.c b/net/core/filter.c > index ec1b4eb0d3d4..c4ad1b93167f 100644 > --- a/net/core/filter.c > +++ b/net/core/filter.c > @@ -3170,6 +3170,32 @@ static int __bpf_tx_xdp(struct net_device *dev, > return 0; > } > > +/* non-static to avoid inline by compiler */ > +int xdp_do_redirect_slow(struct net_device *dev, struct xdp_buff *xdp, Nit: should be 'static noinline' in that case then. > + struct bpf_prog *xdp_prog, struct bpf_redirect_info *ri) > +{ > + struct net_device *fwd; > + u32 index = ri->ifindex; > + int err; > + > + fwd = dev_get_by_index_rcu(dev_net(dev), index); > + ri->ifindex = 0; > + if (unlikely(!fwd)) { > + err = -EINVAL; > + goto err; > + } > + > + err = __bpf_tx_xdp(fwd, NULL, xdp, 0); > + if (unlikely(err)) > + goto err; > + > + _trace_xdp_redirect(dev, xdp_prog, index); > + return 0; > +err: > + _trace_xdp_redirect_err(dev, xdp_prog, index, err); > + return err; > +} > + > static int __bpf_tx_xdp_map(struct net_device *dev_rx, void *fwd, > struct bpf_map *map, > struct xdp_buff *xdp, > @@ -3264,9 +3290,9 @@ void bpf_clear_redirect_map(struct bpf_map *map) > } > > static int xdp_do_redirect_map(struct net_device *dev, struct xdp_buff *xdp, > - struct bpf_prog *xdp_prog, struct bpf_map *map) > + struct bpf_prog *xdp_prog, struct bpf_map *map, > + struct bpf_redirect_info *ri) > { > - struct bpf_redirect_info *ri = this_cpu_ptr(&bpf_redirect_info); > u32 index = ri->ifindex; > void *fwd = NULL; > int err; > @@ -3299,29 +3325,11 @@ int xdp_do_redirect(struct net_device *dev, struct xdp_buff *xdp, > { > struct bpf_redirect_info *ri = this_cpu_ptr(&bpf_redirect_info); > struct bpf_map *map = READ_ONCE(ri->map); > - struct net_device *fwd; > - u32 index = ri->ifindex; > - int err; > > if (likely(map)) > - return xdp_do_redirect_map(dev, xdp, xdp_prog, map); > + return xdp_do_redirect_map(dev, xdp, xdp_prog, map, ri); > > - fwd = dev_get_by_index_rcu(dev_net(dev), index); > - ri->ifindex = 0; > - if (unlikely(!fwd)) { > - err = -EINVAL; > - goto err; > - } > - > - err = __bpf_tx_xdp(fwd, NULL, xdp, 0); > - if (unlikely(err)) > - goto err; > - > - _trace_xdp_redirect(dev, xdp_prog, index); > - return 0; > -err: > - _trace_xdp_redirect_err(dev, xdp_prog, index, err); > - return err; > + return xdp_do_redirect_slow(dev, xdp, xdp_prog, ri); > } > EXPORT_SYMBOL_GPL(xdp_do_redirect); > > ^ permalink raw reply [flat|nested] 8+ messages in thread
* [RFC PATCH] xdp: xdp_do_redirect_slow() can be static 2018-08-31 15:26 ` [bpf-next PATCH 3/3] xdp: split code for map vs non-map redirect Jesper Dangaard Brouer 2018-08-31 18:37 ` Daniel Borkmann @ 2018-09-04 15:39 ` kbuild test robot 2018-09-04 15:39 ` [bpf-next PATCH 3/3] xdp: split code for map vs non-map redirect kbuild test robot 2 siblings, 0 replies; 8+ messages in thread From: kbuild test robot @ 2018-09-04 15:39 UTC (permalink / raw) To: Jesper Dangaard Brouer Cc: kbuild-all, netdev, Daniel Borkmann, Alexei Starovoitov, Jesper Dangaard Brouer Fixes: 974efdb08a35 ("xdp: split code for map vs non-map redirect") Signed-off-by: kbuild test robot <fengguang.wu@intel.com> --- filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/filter.c b/net/core/filter.c index 45ea00b..95454f3 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -3171,7 +3171,7 @@ static int __bpf_tx_xdp(struct net_device *dev, } /* non-static to avoid inline by compiler */ -int xdp_do_redirect_slow(struct net_device *dev, struct xdp_buff *xdp, +static int xdp_do_redirect_slow(struct net_device *dev, struct xdp_buff *xdp, struct bpf_prog *xdp_prog, struct bpf_redirect_info *ri) { struct net_device *fwd; ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [bpf-next PATCH 3/3] xdp: split code for map vs non-map redirect 2018-08-31 15:26 ` [bpf-next PATCH 3/3] xdp: split code for map vs non-map redirect Jesper Dangaard Brouer 2018-08-31 18:37 ` Daniel Borkmann 2018-09-04 15:39 ` [RFC PATCH] xdp: xdp_do_redirect_slow() can be static kbuild test robot @ 2018-09-04 15:39 ` kbuild test robot 2018-09-04 16:57 ` Jesper Dangaard Brouer 2 siblings, 1 reply; 8+ messages in thread From: kbuild test robot @ 2018-09-04 15:39 UTC (permalink / raw) To: Jesper Dangaard Brouer Cc: kbuild-all, netdev, Daniel Borkmann, Alexei Starovoitov, Jesper Dangaard Brouer 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [bpf-next PATCH 3/3] xdp: split code for map vs non-map redirect 2018-09-04 15:39 ` [bpf-next PATCH 3/3] xdp: split code for map vs non-map redirect kbuild test robot @ 2018-09-04 16:57 ` Jesper Dangaard Brouer 0 siblings, 0 replies; 8+ messages in thread From: Jesper Dangaard Brouer @ 2018-09-04 16:57 UTC (permalink / raw) To: kbuild test robot Cc: kbuild-all, netdev, Daniel Borkmann, Alexei Starovoitov, brouer On Tue, 4 Sep 2018 23:39:45 +0800 kbuild test robot <lkp@intel.com> wrote: > Hi Jesper, > > Thank you for the patch! Perhaps something to improve: Daniel is faster than kbuild test-robot, and have already pointed this out, and it should be fixed in V2. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-09-04 21:24 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-08-31 15:26 [bpf-next PATCH 0/3] XDP micro optimizations for redirect Jesper Dangaard Brouer 2018-08-31 15:26 ` [bpf-next PATCH 1/3] xdp: unlikely instrumentation for xdp map redirect Jesper Dangaard Brouer 2018-08-31 15:26 ` [bpf-next PATCH 2/3] xdp: explicit inline __xdp_map_lookup_elem Jesper Dangaard Brouer 2018-08-31 15:26 ` [bpf-next PATCH 3/3] xdp: split code for map vs non-map redirect Jesper Dangaard Brouer 2018-08-31 18:37 ` Daniel Borkmann 2018-09-04 15:39 ` [RFC PATCH] xdp: xdp_do_redirect_slow() can be static kbuild test robot 2018-09-04 15:39 ` [bpf-next PATCH 3/3] xdp: split code for map vs non-map redirect kbuild test robot 2018-09-04 16:57 ` Jesper Dangaard Brouer
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).