Re: [PATCH] net: bpf: type fixes for __be16/__be32
From: Martin Lau
Date: Thu Oct 17 2019 - 13:13:44 EST
On Wed, Oct 16, 2019 at 12:16:35PM +0100, Ben Dooks (Codethink) wrote:
> In bpf_skb_load_helper_8_no_cache and
> bpf_skb_load_helper_16_no_cache they
> read a u16/u32 where actually these
> are __be16 and __be32.
>
> Fix the following by making the types
> match:
>
> net/core/filter.c:215:32: warning: cast to restricted __be16
> net/core/filter.c:215:32: warning: cast to restricted __be16
> net/core/filter.c:215:32: warning: cast to restricted __be16
> net/core/filter.c:215:32: warning: cast to restricted __be16
> net/core/filter.c:215:32: warning: cast to restricted __be16
> net/core/filter.c:215:32: warning: cast to restricted __be16
> net/core/filter.c:215:32: warning: cast to restricted __be16
> net/core/filter.c:215:32: warning: cast to restricted __be16
> net/core/filter.c:242:32: warning: cast to restricted __be32
> net/core/filter.c:242:32: warning: cast to restricted __be32
> net/core/filter.c:242:32: warning: cast to restricted __be32
> net/core/filter.c:242:32: warning: cast to restricted __be32
> net/core/filter.c:242:32: warning: cast to restricted __be32
> net/core/filter.c:242:32: warning: cast to restricted __be32
> net/core/filter.c:242:32: warning: cast to restricted __be32
> net/core/filter.c:242:32: warning: cast to restricted __be32
> net/core/filter.c:242:32: warning: cast to restricted __be32
> net/core/filter.c:242:32: warning: cast to restricted __be32
> net/core/filter.c:242:32: warning: cast to restricted __be32
> net/core/filter.c:242:32: warning: cast to restricted __be32
Acked-by: Martin KaFai Lau <kafai@xxxxxx>