]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
sched: have stub for tcf_destroy_chain in case NET_CLS is not configured
authorJiri Pirko <jiri@mellanox.com>
Wed, 15 Feb 2017 10:57:50 +0000 (11:57 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Feb 2017 17:22:48 +0000 (12:22 -0500)
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 <jiri@mellanox.com>
Tested-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/pkt_cls.h

index 71b266cd63d4b0a79a81139d0e4eb890f93d1a09..be5c12a5c3755088d7322f16c915b469b28aa753 100644 (file)
@@ -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)