提交 a41e4108 编写于 作者: F Florian Fainelli 提交者: Zheng Zengkai

skbuff: Fix build with SKB extensions disabled

stable inclusion
from stable-5.10.54
commit c9f8e17990e05b1c848a28566e3a31f7fef8ea2c
bugzilla: 175586 https://gitee.com/openeuler/kernel/issues/I4DVDU

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c9f8e17990e05b1c848a28566e3a31f7fef8ea2c

--------------------------------

commit 9615fe36 upstream.

We will fail to build with CONFIG_SKB_EXTENSIONS disabled after
8550ff8d ("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: 8550ff8d ("skbuff: Release nfct refcount on napi stolen or re-used skbs")
Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
Reviewed-by: NRoi Dayan <roid@nvidia.com>
Reviewed-by: NEric Dumazet <edumazet@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 96368520
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册