From: Florian Fainelli Date: Thu, 8 Jul 2021 04:10:51 +0000 (-0700) Subject: skbuff: Fix build with SKB extensions disabled X-Git-Tag: v5.10.54~1 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=c9f8e17990e05b1c848a28566e3a31f7fef8ea2c;p=wrapfs-3.2.y.git skbuff: Fix build with SKB extensions disabled commit 9615fe36b31d926f1c5107013b772dc226a6a7ca upstream. We will fail to build with CONFIG_SKB_EXTENSIONS disabled after 8550ff8d8c75 ("skbuff: Release nfct refcount on napi stolen or re-used skbs") since there is an unconditionally use of skb_ext_find() without an appropriate stub. Simply build the code conditionally and properly guard against both COFNIG_SKB_EXTENSIONS as well as CONFIG_NET_TC_SKB_EXT being disabled. Fixes: Fixes: 8550ff8d8c75 ("skbuff: Release nfct refcount on napi stolen or re-used skbs") Signed-off-by: Florian Fainelli Reviewed-by: Roi Dayan Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/core/dev.c b/net/core/dev.c index a44d00123702..b9d19fbb1589 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -5872,7 +5872,7 @@ static struct list_head *gro_list_prepare(struct napi_struct *napi, maclen); diffs |= skb_get_nfct(p) ^ skb_get_nfct(skb); - +#if IS_ENABLED(CONFIG_SKB_EXTENSIONS) && IS_ENABLED(CONFIG_NET_TC_SKB_EXT) 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); @@ -5881,6 +5881,7 @@ static struct list_head *gro_list_prepare(struct napi_struct *napi, if (!diffs && unlikely(skb_ext)) diffs |= p_ext->chain ^ skb_ext->chain; } +#endif NAPI_GRO_CB(p)->same_flow = !diffs; }