diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-03-19 04:47:30 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-03-19 04:47:30 -0400 |
commit | 0d4a42f6bd298e826620585e766a154ab460617a (patch) | |
tree | 406d8f7778691d858dbe3e48e4bbb10e99c0a58a /include/net/sch_generic.h | |
parent | d62b4892f3d9f7dd2002e5309be10719d6805b0f (diff) | |
parent | a937536b868b8369b98967929045f1df54234323 (diff) |
Merge tag 'v3.9-rc3' into drm-intel-next-queued
Backmerge so that I can merge Imre Deak's coalesced sg entries fixes,
which depend upon the new for_each_sg_page introduce in
commit a321e91b6d73ed011ffceed384c40d2785cf723b
Author: Imre Deak <imre.deak@intel.com>
Date: Wed Feb 27 17:02:56 2013 -0800
lib/scatterlist: add simple page iterator
The merge itself is just two trivial conflicts:
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/net/sch_generic.h')
-rw-r--r-- | include/net/sch_generic.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 1540f9c2fcf4..f10818fc8804 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -195,7 +195,7 @@ struct tcf_proto_ops { | |||
195 | 195 | ||
196 | unsigned long (*get)(struct tcf_proto*, u32 handle); | 196 | unsigned long (*get)(struct tcf_proto*, u32 handle); |
197 | void (*put)(struct tcf_proto*, unsigned long); | 197 | void (*put)(struct tcf_proto*, unsigned long); |
198 | int (*change)(struct sk_buff *, | 198 | int (*change)(struct net *net, struct sk_buff *, |
199 | struct tcf_proto*, unsigned long, | 199 | struct tcf_proto*, unsigned long, |
200 | u32 handle, struct nlattr **, | 200 | u32 handle, struct nlattr **, |
201 | unsigned long *); | 201 | unsigned long *); |
@@ -339,11 +339,10 @@ static inline struct Qdisc_class_common * | |||
339 | qdisc_class_find(const struct Qdisc_class_hash *hash, u32 id) | 339 | qdisc_class_find(const struct Qdisc_class_hash *hash, u32 id) |
340 | { | 340 | { |
341 | struct Qdisc_class_common *cl; | 341 | struct Qdisc_class_common *cl; |
342 | struct hlist_node *n; | ||
343 | unsigned int h; | 342 | unsigned int h; |
344 | 343 | ||
345 | h = qdisc_class_hash(id, hash->hashmask); | 344 | h = qdisc_class_hash(id, hash->hashmask); |
346 | hlist_for_each_entry(cl, n, &hash->hash[h], hnode) { | 345 | hlist_for_each_entry(cl, &hash->hash[h], hnode) { |
347 | if (cl->classid == id) | 346 | if (cl->classid == id) |
348 | return cl; | 347 | return cl; |
349 | } | 348 | } |
@@ -679,4 +678,23 @@ static inline struct sk_buff *skb_act_clone(struct sk_buff *skb, gfp_t gfp_mask, | |||
679 | } | 678 | } |
680 | #endif | 679 | #endif |
681 | 680 | ||
681 | struct psched_ratecfg { | ||
682 | u64 rate_bps; | ||
683 | u32 mult; | ||
684 | u32 shift; | ||
685 | }; | ||
686 | |||
687 | static inline u64 psched_l2t_ns(const struct psched_ratecfg *r, | ||
688 | unsigned int len) | ||
689 | { | ||
690 | return ((u64)len * r->mult) >> r->shift; | ||
691 | } | ||
692 | |||
693 | extern void psched_ratecfg_precompute(struct psched_ratecfg *r, u32 rate); | ||
694 | |||
695 | static inline u32 psched_ratecfg_getrate(const struct psched_ratecfg *r) | ||
696 | { | ||
697 | return r->rate_bps >> 3; | ||
698 | } | ||
699 | |||
682 | #endif | 700 | #endif |