[patch net-next] sched: have stub for tcf_destroy_chain in case NET_CLS is not configured

Subsystems: networking [general], tc subsystem, the rest

STALE3475d

3 messages, 3 authors, 2017-02-15 · open the first message on its own page

[patch net-next] sched: have stub for tcf_destroy_chain in case NET_CLS is not configured

From: Jiri Pirko <jiri@resnulli.us>
Date: 2017-02-15 10:57:53

From: Jiri Pirko <redacted>

This fixes broken build for !NET_CLS:

net/built-in.o: In function `fq_codel_destroy':
/home/sab/linux/net-next/net/sched/sch_fq_codel.c:468: undefined reference to `tcf_destroy_chain'

Fixes: cf1facda2f61 ("sched: move tcf_proto_destroy and tcf_destroy_chain helpers into cls_api")
Reported-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Jiri Pirko <redacted>
---
 include/net/pkt_cls.h | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index 71b266c..be5c12a 100644
--- a/include/net/pkt_cls.h
+++ b/include/net/pkt_cls.h
@@ -17,7 +17,13 @@ struct tcf_walker {
 int register_tcf_proto_ops(struct tcf_proto_ops *ops);
 int unregister_tcf_proto_ops(struct tcf_proto_ops *ops);
 
+#ifdef CONFIG_NET_CLS
 void tcf_destroy_chain(struct tcf_proto __rcu **fl);
+#else
+static inline void tcf_destroy_chain(struct tcf_proto __rcu **fl)
+{
+}
+#endif
 
 static inline unsigned long
 __cls_set_class(unsigned long *clp, unsigned long cl)
-- 
2.7.4

Re: [patch net-next] sched: have stub for tcf_destroy_chain in case NET_CLS is not configured

From: Sabrina Dubroca <sd@queasysnail.net>
Date: 2017-02-15 17:17:22

2017-02-15, 11:57:50 +0100, Jiri Pirko wrote:
From: Jiri Pirko <redacted>

This fixes broken build for !NET_CLS:

net/built-in.o: In function `fq_codel_destroy':
/home/sab/linux/net-next/net/sched/sch_fq_codel.c:468: undefined reference to `tcf_destroy_chain'

Fixes: cf1facda2f61 ("sched: move tcf_proto_destroy and tcf_destroy_chain helpers into cls_api")
Reported-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Jiri Pirko <redacted>
Thanks for the fix.

Tested-by: Sabrina Dubroca <sd@queasysnail.net>

-- 
Sabrina

Re: [patch net-next] sched: have stub for tcf_destroy_chain in case NET_CLS is not configured

From: David Miller <davem@davemloft.net>
Date: 2017-02-15 17:23:08

From: Jiri Pirko <jiri@resnulli.us>
Date: Wed, 15 Feb 2017 11:57:50 +0100
From: Jiri Pirko <redacted>

This fixes broken build for !NET_CLS:

net/built-in.o: In function `fq_codel_destroy':
/home/sab/linux/net-next/net/sched/sch_fq_codel.c:468: undefined reference to `tcf_destroy_chain'

Fixes: cf1facda2f61 ("sched: move tcf_proto_destroy and tcf_destroy_chain helpers into cls_api")
Reported-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Jiri Pirko <redacted>
Applied, thanks Jiri.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help