Subject: Re: [PATCH iproute2] Re: HTB accuracy for high speed

From: Jarek Poplawski <[email-masked]>
Date: Wed, 3 Jun 2009 09:54:12 +0000

On Wed, Jun 03, 2009 at 09:53:11AM +0200, Patrick McHardy wrote:
...
> The necessary changes are
> really trivial, all you need to do when changing the scaling factors
> is to increase SM_MASK and decrease ISM_MASK accordingly.

OK, looks like it's really enough and I was confused with some
rounding, thanks Patrick.

Antonio, could you give this patch a try (with all the previous) and
repeat those HFSC tests you did before (plus maybe a few tries with
lower rates)?

Thanks,
Jarek P.
---

 net/sched/sch_hfsc.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 5022f9c..7c53a36 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -384,8 +384,9 @@ cftree_update(struct hfsc_class *cl)
  *
  *  1.024us/byte  78.125     7.8125     0.78125    0.078125   0.0078125
  */
-#define	SM_SHIFT	20
-#define	ISM_SHIFT	18
+#define	PSCHED_SHIFT	6	/* TODO: move to pkt_sched.h */
+#define	SM_SHIFT	(30 - PSCHED_SHIFT)
+#define	ISM_SHIFT	(8 + PSCHED_SHIFT)
 
 #define	SM_MASK		((1ULL << SM_SHIFT) - 1)
 #define	ISM_MASK	((1ULL << ISM_SHIFT) - 1)