X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fnet%2Fsch_generic.h;h=2761c905504e076db7de2bea084142bb2f290679;hb=292f1c7ff6cc10516076ceeea45ed11833bb71c7;hp=1540f9c2fcf4b555780087e48850911659009c25;hpb=a2faf2fc534f57ba26bc4d613795236ed4f5fb1c;p=pandora-kernel.git diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 1540f9c2fcf4..2761c905504e 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -195,7 +195,7 @@ struct tcf_proto_ops { unsigned long (*get)(struct tcf_proto*, u32 handle); void (*put)(struct tcf_proto*, unsigned long); - int (*change)(struct sk_buff *, + int (*change)(struct net *net, struct sk_buff *, struct tcf_proto*, unsigned long, u32 handle, struct nlattr **, unsigned long *); @@ -679,4 +679,23 @@ static inline struct sk_buff *skb_act_clone(struct sk_buff *skb, gfp_t gfp_mask, } #endif +struct psched_ratecfg { + u64 rate_bps; + u32 mult; + u32 shift; +}; + +static inline u64 psched_l2t_ns(const struct psched_ratecfg *r, + unsigned int len) +{ + return ((u64)len * r->mult) >> r->shift; +} + +extern void psched_ratecfg_precompute(struct psched_ratecfg *r, u32 rate); + +static inline u32 psched_ratecfg_getrate(const struct psched_ratecfg *r) +{ + return r->rate_bps >> 3; +} + #endif