diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/filter.c | 3 | ||||
-rw-r--r-- | net/core/xdp.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index ce255e0a2f..15d850ea7d 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -87,6 +87,9 @@ #include "dev.h" +/* Keep the struct bpf_fib_lookup small so that it fits into a cacheline */ +static_assert(sizeof(struct bpf_fib_lookup) == 64, "struct bpf_fib_lookup size check"); + static const struct bpf_func_proto * bpf_sk_base_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog); diff --git a/net/core/xdp.c b/net/core/xdp.c index 41693154e4..022c12059c 100644 --- a/net/core/xdp.c +++ b/net/core/xdp.c @@ -295,10 +295,8 @@ static struct xdp_mem_allocator *__xdp_reg_mem_model(struct xdp_mem_info *mem, mutex_lock(&mem_id_lock); ret = __mem_id_init_hash_table(); mutex_unlock(&mem_id_lock); - if (ret < 0) { - WARN_ON(1); + if (ret < 0) return ERR_PTR(ret); - } } xdp_alloc = kzalloc(sizeof(*xdp_alloc), gfp); |