diff options
author | Patrick McHardy <kaber@trash.net> | 2007-07-15 03:02:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-07-15 03:02:31 -0400 |
commit | 73ca4918fbb98311421259d82ef4ab44feeace43 (patch) | |
tree | a5ae62e5474b3d28d7205ab3170aa73ff6d5f8ac /include/net/pkt_sched.h | |
parent | f6853e2df3de82c1dac8f62ddcf3a8dfa302419e (diff) |
[NET_SCHED]: act_api: qdisc internal reclassify support
The behaviour of NET_CLS_POLICE for TC_POLICE_RECLASSIFY was to return
it to the qdisc, which could handle it internally or ignore it. With
NET_CLS_ACT however, tc_classify starts over at the first classifier
and never returns it to the qdisc. This makes it impossible to support
qdisc-internal reclassification, which in turn makes it impossible to
remove the old NET_CLS_POLICE code without breaking compatibility since
we have two qdiscs (CBQ and ATM) that support this.
This patch adds a tc_classify_compat function that handles
reclassification the old way and changes CBQ and ATM to use it.
This again is of course not fully backwards compatible with the previous
NET_CLS_ACT behaviour. Unfortunately there is no way to fully maintain
compatibility *and* support qdisc internal reclassification with
NET_CLS_ACT, but this seems like the better choice over keeping the two
incompatible options around forever.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/pkt_sched.h')
-rw-r--r-- | include/net/pkt_sched.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 5754d53d9efc..9e22526e80e7 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -89,8 +89,10 @@ static inline void qdisc_run(struct net_device *dev) | |||
89 | __qdisc_run(dev); | 89 | __qdisc_run(dev); |
90 | } | 90 | } |
91 | 91 | ||
92 | extern int tc_classify_compat(struct sk_buff *skb, struct tcf_proto *tp, | ||
93 | struct tcf_result *res); | ||
92 | extern int tc_classify(struct sk_buff *skb, struct tcf_proto *tp, | 94 | extern int tc_classify(struct sk_buff *skb, struct tcf_proto *tp, |
93 | struct tcf_result *res); | 95 | struct tcf_result *res); |
94 | 96 | ||
95 | /* Calculate maximal size of packet seen by hard_start_xmit | 97 | /* Calculate maximal size of packet seen by hard_start_xmit |
96 | routine of this device. | 98 | routine of this device. |