summaryrefslogtreecommitdiffstats
path: root/include/net/sch_generic.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2013-06-06 13:56:19 -0700
committerDavid S. Miller <davem@davemloft.net>2013-06-11 22:39:47 -0700
commit130d3d68b52097c7ae081109f700b02776adcb9c (patch)
tree08b3ab56be1de543a9c3e7cd1d9ff532221bda14 /include/net/sch_generic.h
parent45203a3b380cee28f570475c0d28c169f908c209 (diff)
downloadblackbird-op-linux-130d3d68b52097c7ae081109f700b02776adcb9c.tar.gz
blackbird-op-linux-130d3d68b52097c7ae081109f700b02776adcb9c.zip
net_sched: psched_ratecfg_precompute() improvements
Before allowing 64bits bytes rates, refactor psched_ratecfg_precompute() to get better comments and increased accuracy. rate_bps field is renamed to rate_bytes_ps, as we only have to worry about bytes per second. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Ben Greear <greearb@candelatech.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sch_generic.h')
-rw-r--r--include/net/sch_generic.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index df5676029827..6eab63363e59 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -680,7 +680,7 @@ static inline struct sk_buff *skb_act_clone(struct sk_buff *skb, gfp_t gfp_mask,
#endif
struct psched_ratecfg {
- u64 rate_bps;
+ u64 rate_bytes_ps; /* bytes per second */
u32 mult;
u16 overhead;
u8 shift;
@@ -698,7 +698,7 @@ static inline void psched_ratecfg_getrate(struct tc_ratespec *res,
const struct psched_ratecfg *r)
{
memset(res, 0, sizeof(*res));
- res->rate = r->rate_bps >> 3;
+ res->rate = r->rate_bytes_ps;
res->overhead = r->overhead;
}
OpenPOWER on IntegriCloud