From 1c46d6dbc82a65198344424a736b9800d1387213 Mon Sep 17 00:00:00 2001 From: Swati Singh Date: Tue, 5 Sep 2023 10:08:26 +0530 Subject: [PATCH] net: skbuff: Fix compile error when recycler is disabled consume_skb recycle function should be enclosed within CONFIG_SKB_RECYCLER macro. Change-Id: I1703919d8da10102951ec3795eb63cf7ecf9a44b Signed-off-by: Swati Singh --- net/core/skbuff.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index fb1490150718..796a4a2df604 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -1179,6 +1179,7 @@ EXPORT_SYMBOL(skb_tx_error); * Functions identically to kfree_skb, but kfree_skb assumes that the frame * is being dropped after a failure and notes that */ +#ifdef CONFIG_SKB_RECYCLER void consume_skb(struct sk_buff *skb) { if (!skb_unref(skb)) @@ -1224,6 +1225,7 @@ void consume_skb(struct sk_buff *skb) kfree_skbmem(skb); } EXPORT_SYMBOL(consume_skb); +#endif /** * consume_skb_list_fast - free a list of skbs -- 2.34.1