summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-10 00:04:35 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-10 00:04:35 -0800
commit25f666300625d894ebe04bac2b4b3aadb907c861 (patch)
tree47547369f2d6eb366268e85252444ecb1bdcfab5 /net/sched
parent0b6ca82af83a79f3d1001c8a0701ed34ac38126e (diff)
parent21347456abfbf5bc7fcace7327476736bbb28abe (diff)
downloadop-kernel-dev-25f666300625d894ebe04bac2b4b3aadb907c861.zip
op-kernel-dev-25f666300625d894ebe04bac2b4b3aadb907c861.tar.gz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (28 commits) [NET_SCHED] sch_htb: htb_requeue fix [IPV6]: Replace using the magic constant "1024" with IP6_RT_PRIO_USER for fc_metric. starfire: secton fix via-velocity: section fix natsemi: section fix typhoon: section fix isdn: fix section mismatch warning for ISACVer isdn: fix section mismatch warnings from hisax_cs_setup_card isdn: fix section mismatch warnings in isac.c and isar.c isdn: fix section mismatch warning in hfc_sx.c [PKT_SCHED] ematch: tcf_em_destroy robustness [PKT_SCHED]: deinline functions in meta match [SCTP]: Convert sctp_dbg_objcnt to seq files. [SCTP]: Use snmp_fold_field instead of a homebrew analogue. [IGMP]: Optimize kfree_skb in igmp_rcv. [KEY]: Convert net/pfkey to use seq files. [KEY]: Clean up proc files creation a bit. pppol2tp: fix printk warnings bnx2: section fix bnx2x: section fix ...
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/em_meta.c6
-rw-r--r--net/sched/ematch.c10
-rw-r--r--net/sched/sch_htb.c13
3 files changed, 18 insertions, 11 deletions
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c
index d417ec8..3da4129 100644
--- a/net/sched/em_meta.c
+++ b/net/sched/em_meta.c
@@ -687,8 +687,8 @@ static inline struct meta_type_ops * meta_type_ops(struct meta_value *v)
* Core
**************************************************************************/
-static inline int meta_get(struct sk_buff *skb, struct tcf_pkt_info *info,
- struct meta_value *v, struct meta_obj *dst)
+static int meta_get(struct sk_buff *skb, struct tcf_pkt_info *info,
+ struct meta_value *v, struct meta_obj *dst)
{
int err = 0;
@@ -733,7 +733,7 @@ static int em_meta_match(struct sk_buff *skb, struct tcf_ematch *m,
return 0;
}
-static inline void meta_delete(struct meta_match *meta)
+static void meta_delete(struct meta_match *meta)
{
if (meta) {
struct meta_type_ops *ops = meta_type_ops(&meta->lvalue);
diff --git a/net/sched/ematch.c b/net/sched/ematch.c
index 74ff918..b29439d 100644
--- a/net/sched/ematch.c
+++ b/net/sched/ematch.c
@@ -312,10 +312,9 @@ int tcf_em_tree_validate(struct tcf_proto *tp, struct nlattr *nla,
struct tcf_ematch_tree_hdr *tree_hdr;
struct tcf_ematch *em;
- if (!nla) {
- memset(tree, 0, sizeof(*tree));
+ memset(tree, 0, sizeof(*tree));
+ if (!nla)
return 0;
- }
err = nla_parse_nested(tb, TCA_EMATCH_TREE_MAX, nla, em_policy);
if (err < 0)
@@ -410,14 +409,15 @@ void tcf_em_tree_destroy(struct tcf_proto *tp, struct tcf_ematch_tree *tree)
if (em->ops) {
if (em->ops->destroy)
em->ops->destroy(tp, em);
- else if (!tcf_em_is_simple(em) && em->data)
- kfree((void *) em->data);
+ else if (!tcf_em_is_simple(em))
+ kfree(em->data);
module_put(em->ops->owner);
}
}
tree->hdr.nmatches = 0;
kfree(tree->matches);
+ tree->matches = NULL;
}
EXPORT_SYMBOL(tcf_em_tree_destroy);
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index e1a579ef..795c761 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -609,14 +609,14 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
/* TODO: requeuing packet charges it to policers again !! */
static int htb_requeue(struct sk_buff *skb, struct Qdisc *sch)
{
+ int ret;
struct htb_sched *q = qdisc_priv(sch);
- int ret = NET_XMIT_SUCCESS;
struct htb_class *cl = htb_classify(skb, sch, &ret);
struct sk_buff *tskb;
- if (cl == HTB_DIRECT || !cl) {
+ if (cl == HTB_DIRECT) {
/* enqueue to helper queue */
- if (q->direct_queue.qlen < q->direct_qlen && cl) {
+ if (q->direct_queue.qlen < q->direct_qlen) {
__skb_queue_head(&q->direct_queue, skb);
} else {
__skb_queue_head(&q->direct_queue, skb);
@@ -625,6 +625,13 @@ static int htb_requeue(struct sk_buff *skb, struct Qdisc *sch)
sch->qstats.drops++;
return NET_XMIT_CN;
}
+#ifdef CONFIG_NET_CLS_ACT
+ } else if (!cl) {
+ if (ret == NET_XMIT_BYPASS)
+ sch->qstats.drops++;
+ kfree_skb(skb);
+ return ret;
+#endif
} else if (cl->un.leaf.q->ops->requeue(skb, cl->un.leaf.q) !=
NET_XMIT_SUCCESS) {
sch->qstats.drops++;
OpenPOWER on IntegriCloud