aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_prio.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-31 18:51:00 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-31 18:51:00 -0400
commit0d6caa1795090bd22ede96b84daa4600b63eee37 (patch)
tree7b69aa68f7f812bd1a13b0c5e73573a01e671ef8 /net/sched/sch_prio.c
parent88c8199b9d2f5ec0a8468a0495ba4c9656846500 (diff)
parent8072f085d79a0a73cc5a0333ffa7f0c5d35f76e0 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (41 commits) [RTNETLINK]: Fix warning for !CONFIG_KMOD [IPV4] ip_options.c: kmalloc + memset conversion to kzalloc [DECNET]: kmalloc + memset conversion to kzalloc [NET]: ethtool_perm_addr only has one implementation [NET]: ethtool ops are the only way [PPPOE]: Improve hashing function in hash_item(). [XFRM]: State selection update to use inner addresses. [IPSEC]: Ensure that state inner family is set [TCP]: Bidir flow must not disregard SACK blocks for lost marking [TCP]: Fix ratehalving with bidirectional flows [PPPOL2TP]: Add CONFIG_INET Kconfig dependency. [NET]: Page offsets and lengths need to be __u32. [AF_UNIX]: Make code static. [NETFILTER]: Make nf_ct_ipv6_skip_exthdr() static. [PKTGEN]: make get_ipsec_sa() static and non-inline [PPPoE]: move lock_sock() in pppoe_sendmsg() to the right location [PPPoX/E]: return ENOTTY on unknown ioctl requests [IPV6]: ipv6_addr_type() doesn't know about RFC4193 addresses. [NET]: Fix prio_tune() handling of root qdisc. [NET]: Fix sch_api to properly set sch->parent on the root. ...
Diffstat (limited to 'net/sched/sch_prio.c')
-rw-r--r--net/sched/sch_prio.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c
index 2d8c08493d6e..4a49db65772e 100644
--- a/net/sched/sch_prio.c
+++ b/net/sched/sch_prio.c
@@ -38,9 +38,11 @@ prio_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
38 struct prio_sched_data *q = qdisc_priv(sch); 38 struct prio_sched_data *q = qdisc_priv(sch);
39 u32 band = skb->priority; 39 u32 band = skb->priority;
40 struct tcf_result res; 40 struct tcf_result res;
41 int err;
41 42
42 *qerr = NET_XMIT_BYPASS; 43 *qerr = NET_XMIT_BYPASS;
43 if (TC_H_MAJ(skb->priority) != sch->handle) { 44 if (TC_H_MAJ(skb->priority) != sch->handle) {
45 err = tc_classify(skb, q->filter_list, &res);
44#ifdef CONFIG_NET_CLS_ACT 46#ifdef CONFIG_NET_CLS_ACT
45 switch (tc_classify(skb, q->filter_list, &res)) { 47 switch (tc_classify(skb, q->filter_list, &res)) {
46 case TC_ACT_STOLEN: 48 case TC_ACT_STOLEN:
@@ -49,11 +51,8 @@ prio_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
49 case TC_ACT_SHOT: 51 case TC_ACT_SHOT:
50 return NULL; 52 return NULL;
51 } 53 }
52
53 if (!q->filter_list ) {
54#else
55 if (!q->filter_list || tc_classify(skb, q->filter_list, &res)) {
56#endif 54#endif
55 if (!q->filter_list || err < 0) {
57 if (TC_H_MAJ(band)) 56 if (TC_H_MAJ(band))
58 band = 0; 57 band = 0;
59 band = q->prio2band[band&TC_PRIO_MAX]; 58 band = q->prio2band[band&TC_PRIO_MAX];
@@ -239,11 +238,13 @@ static int prio_tune(struct Qdisc *sch, struct rtattr *opt)
239 /* If we're multiqueue, make sure the number of incoming bands 238 /* If we're multiqueue, make sure the number of incoming bands
240 * matches the number of queues on the device we're associating with. 239 * matches the number of queues on the device we're associating with.
241 * If the number of bands requested is zero, then set q->bands to 240 * If the number of bands requested is zero, then set q->bands to
242 * dev->egress_subqueue_count. 241 * dev->egress_subqueue_count. Also, the root qdisc must be the
242 * only one that is enabled for multiqueue, since it's the only one
243 * that interacts with the underlying device.
243 */ 244 */
244 q->mq = RTA_GET_FLAG(tb[TCA_PRIO_MQ - 1]); 245 q->mq = RTA_GET_FLAG(tb[TCA_PRIO_MQ - 1]);
245 if (q->mq) { 246 if (q->mq) {
246 if (sch->handle != TC_H_ROOT) 247 if (sch->parent != TC_H_ROOT)
247 return -EINVAL; 248 return -EINVAL;
248 if (netif_is_multiqueue(sch->dev)) { 249 if (netif_is_multiqueue(sch->dev)) {
249 if (q->bands == 0) 250 if (q->bands == 0)