Thread (45 messages) 45 messages, 7 authors, 2017-06-14

Re: [patch net-next v3 01/10] net: sched: move tc_classify function to cls_api.c

From: Jiri Pirko <jiri@resnulli.us>
Date: 2017-05-16 21:05:17

Tue, May 16, 2017 at 11:03:14PM CEST, xiyou.wangcong@gmail.com wrote:
On Tue, May 16, 2017 at 2:00 PM, Jiri Pirko [off-list ref] wrote:
quoted
Tue, May 16, 2017 at 10:25:35PM CEST, xiyou.wangcong@gmail.com wrote:
quoted
On Tue, May 16, 2017 at 10:27 AM, Jiri Pirko [off-list ref] wrote:
quoted
From: Jiri Pirko <redacted>

Move tc_classify function to cls_api.c where it belongs, rename it to
fit the namespace.
It is not a pure move, you silently remove the CONFIG_NET_CLS_ACT
macros in tc_classify(). Probably not buggy, just redundancy when
actions are not compiled.
Plese see include/net/pkt_cls.h in this patch.

If CONFIG_NET_CLS_ACT is not defined, there is a stub there.
I am sure it is not NET_CLS_ACT:
Oh, will fix this. Thanks.

#ifdef CONFIG_NET_CLS
void tcf_destroy_chain(struct tcf_proto __rcu **fl);
+int tcf_classify(struct sk_buff *skb, const struct tcf_proto *tp,
+                struct tcf_result *res, bool compat_mode);
+
#else
static inline void tcf_destroy_chain(struct tcf_proto __rcu **fl)
{
}
+
+static inline int tcf_classify(struct sk_buff *skb, const struct tcf_proto *tp,
+                              struct tcf_result *res, bool compat_mode)
+{
+       return TC_ACT_UNSPEC;
+}
#endif
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help