From: Jarek Poplawski <jarkao2@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: devik@cdi.cz, kaber@trash.net, netdev@vger.kernel.org
Subject: Re: [PATCH 4/3 v3] pkt_sched: sch_htb: Clean L2T()
Date: Wed, 3 Dec 2008 08:50:06 +0000 [thread overview]
Message-ID: <20081203085006.GA15262@ff.dom.local> (raw)
In-Reply-To: <20081203.002046.153795689.davem@davemloft.net>
On Wed, Dec 03, 2008 at 12:20:46AM -0800, David Miller wrote:
...
> You misunderstood me.
>
> I meant get rid of L2T completely, and just use
> "qdisc_l2t(rate, size)" directly.
>
> Macros like this one:
>
> 1) are used in only one spot
> 2) give no new information to the reader
>
> so are just extra noise.
Hmm.. I think L2T is special in sched, but no problem...
Thanks for the explanation,
Jarek P.
------------------> (take 3)
pkt_sched: sch_htb: Remove L2T()
L2T() is currently used only in one place (and has one spurious
parameter, btw), so let's: 'get rid of L2T completely, and just
use "qdisc_l2t(rate, size)" directly.' - quote & feedback from
David S. Miller.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
---
net/sched/sch_htb.c | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 80cb94d..fcd06e2 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -125,13 +125,6 @@ struct htb_class {
psched_time_t t_c; /* checkpoint time */
};
-static inline long L2T(struct htb_class *cl, struct qdisc_rate_table *rate,
- int size)
-{
- long result = qdisc_l2t(rate, size);
- return result;
-}
-
struct htb_sched {
struct Qdisc_class_hash clhash;
struct list_head drops[TC_HTB_NUMPRIO];/* active leaves (for drops) */
@@ -604,7 +597,7 @@ static void htb_charge_class(struct htb_sched *q, struct htb_class *cl,
#define HTB_ACCNT(T,B,R) toks = diff + cl->T; \
if (toks > cl->B) toks = cl->B; \
- toks -= L2T(cl, cl->R, bytes); \
+ toks -= (long) qdisc_l2t(cl->R, bytes); \
if (toks <= -cl->mbuffer) toks = 1-cl->mbuffer; \
cl->T = toks
next prev parent reply other threads:[~2008-12-03 8:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-02 8:56 [PATCH 3/3] pkt_sched: sch_htb: Clean htb_class prio and quantum fields Jarek Poplawski
2008-12-03 7:09 ` [PATCH 4/3] pkt_sched: sch_htb: Clean L2T() Jarek Poplawski
2008-12-03 7:25 ` David Miller
2008-12-03 7:54 ` [PATCH 4/3 v2] " Jarek Poplawski
2008-12-03 8:20 ` David Miller
2008-12-03 8:50 ` Jarek Poplawski [this message]
2008-12-04 5:17 ` [PATCH 4/3 v3] " David Miller
2008-12-03 10:07 ` [PATCH 5/3] pkt_sched: sch_htb: Replace HTB_ACCNT() macro with inlines Jarek Poplawski
2008-12-04 5:17 ` David Miller
2008-12-04 5:09 ` [PATCH 3/3] pkt_sched: sch_htb: Clean htb_class prio and quantum fields David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081203085006.GA15262@ff.dom.local \
--to=jarkao2@gmail.com \
--cc=davem@davemloft.net \
--cc=devik@cdi.cz \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).