[netdev/net][ppc][bisected 8550ff8] build fails net/core/dev.c:6020:19: error: dereferencing pointer

Roi Dayan roid at nvidia.com
Fri Jul 9 00:16:22 AEST 2021



On 2021-07-08 9:29 AM, Abdul Haleem wrote:
> Greetings
> 
> netdev's net branch fails to build on my PowerPC box with error
> 
> net/core/dev.c: In function 'gro_list_prepare':
> net/core/dev.c:6015:51: error: 'TC_SKB_EXT' undeclared (first use in this function); did you mean 'TC_U32_EAT'?
>      struct tc_skb_ext *skb_ext = skb_ext_find(skb, TC_SKB_EXT);
>                                                     ^~~~~~~~~~
>                                                     TC_U32_EAT
> net/core/dev.c:6015:51: note: each undeclared identifier is reported only once for each function it appears in
> net/core/dev.c:6020:19: error: dereferencing pointer to incomplete type 'struct tc_skb_ext'
>       diffs |= p_ext->chain ^ skb_ext->chain;
>                     ^~
> make[2]: *** [scripts/Makefile.build:273: net/core/dev.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[1]: *** [scripts/Makefile.build:516: net/core] Error 2
> make[1]: *** Waiting for unfinished jobs....
> make: *** [Makefile:1847: net] Error 2
> make: *** Waiting for unfinished jobs...
> 
> Which was included due to below commit
> 
> commit 8550ff8d8c75416e984d9c4b082845e57e560984
> Author: Paul Blakey <paulb at nvidia.com  <mailto:paulb at nvidia.com>>
> Date:   Mon Jul 5 13:54:51 2021 +0300
> 
>      skbuff: Release nfct refcount on napi stolen or re-used skbs
>      
>      When multiple SKBs are merged to a new skb under napi GRO,
>      or SKB is re-used by napi, if nfct was set for them in the
>      driver, it will not be released while freeing their stolen
>      head state or on re-use.
>      
>      Release nfct on napi's stolen or re-used SKBs, and
>      in gro_list_prepare, check conntrack metadata diff.
>      
>      Fixes: 5c6b94604744 ("net/mlx5e: CT: Handle misses after executing CT action")
>      Reviewed-by: Roi Dayan <roid at nvidia.com  <mailto:roid at nvidia.com>>
>      Signed-off-by: Paul Blakey <paulb at nvidia.com  <mailto:paulb at nvidia.com>>
>      Signed-off-by: David S. Miller <davem at davemloft.net  <mailto:davem at davemloft.net>>
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index c253c2aafe97..177a5aec0b6b 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -6008,6 +6008,18 @@ static void gro_list_prepare(const struct list_head *head,
>                          diffs = memcmp(skb_mac_header(p),
>                                         skb_mac_header(skb),
>                                         maclen);
> +
> +               diffs |= skb_get_nfct(p) ^ skb_get_nfct(skb);
> +
> +               if (!diffs) {
> +                       struct tc_skb_ext *skb_ext = skb_ext_find(skb, TC_SKB_EXT);
> +                       struct tc_skb_ext *p_ext = skb_ext_find(p, TC_SKB_EXT);
> +
> +                       diffs |= (!!p_ext) ^ (!!skb_ext);
> +                       if (!diffs && unlikely(skb_ext))
> +                               diffs |= p_ext->chain ^ skb_ext->chain;
> +               }
> +
>                  NAPI_GRO_CB(p)->same_flow = !diffs;
>          }
>   }
> 
> kernel config is attached
> 
> @paul, could you please have a look into this ?
> 
> -- 
> Regard's
> 
> Abdul Haleem
> IBM Linux Technology Center
> 

Hi,

This looks the same reason as Floarian fixed,
missing CONFIG_SKB_EXTENSIONS and CONFIG_NET_TC_SKB_EXT.
Fix was sent by Floarian titled "[PATCH net] skbuff: Fix build with SKB 
extensions disabled".

Thanks,
Roi


More information about the Linuxppc-dev mailing list