netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH v3 2/2] hfsc: add link layer overhead adaption
Date: Tue, 08 Jul 2008 17:59:06 +0200	[thread overview]
Message-ID: <48738ECA.9050703@trash.net> (raw)
In-Reply-To: <20080708141135.174942dv1q2og4o4@hayate.ip6>

Jussi Kivilinna wrote:
> Quoting "Patrick McHardy" <kaber@trash.net>:
>>
>> This means HFSC will use other packet sizes as inner qdiscs, policers,
>> statistics etc, which I don't like very much. My original patch used
>> the size tables to calculate the size when enqueing to the root qdisc
>> and stored it in the cb, so all qdiscs in the hierarchy can use the
>> same size.
>
> With this patch I have tried to make HFSC support link layer emulation 
> in same way as done in HTB with rate table, so that overhead is 
> defined on leaf qdisc (if have understood right).

The difference is that with this approach you are actually
able to make the entire qdisc hierarchy use the same size
for calculations/statistics/etc. The rate tables only work
in TBF based qdiscs and policers (which was always one of
my complaints).

>
> I have used this patch to have different overhead between qdisc leafs 
> to account for extra overhead of ipv6-in-ipv4 tunnel (redirecting 
> traffic to IMQ device and filtering ipv4&ipv6 to corresponding leafs). 
> If overhead/linklayer is defined on root qdisc, this wouldn't be 
> possible?

You could override the size in inner classes and qdiscs.
Having an optional size table per qdisc would make this
consistent from a user perspective with the top-level
size calculation. (And I agree that including tunnel
overhead makes sense).

>
> I'm not too happy about statistics being affected either, I'll look in 
> to it.
>
>>> @@ -987,9 +997,11 @@ hfsc_change_usc(struct hfsc_class *cl, struct  
>>> tc_service_curve *usc,
>>> }
>>>  static const struct nla_policy hfsc_policy[TCA_HFSC_MAX + 1] = {
>>> -    [TCA_HFSC_RSC]    = { .len = sizeof(struct tc_service_curve) },
>>> -    [TCA_HFSC_FSC]    = { .len = sizeof(struct tc_service_curve) },
>>> -    [TCA_HFSC_USC]    = { .len = sizeof(struct tc_service_curve) },
>>> +    [TCA_HFSC_RSC]        = { .len = sizeof(struct 
>>> tc_service_curve) },
>>> +    [TCA_HFSC_FSC]        = { .len = sizeof(struct 
>>> tc_service_curve) },
>>> +    [TCA_HFSC_USC]        = { .len = sizeof(struct 
>>> tc_service_curve) },
>>> +    [TCA_HFSC_SZOPTS]    = { .len = sizeof(struct tc_sizespec) },
>>> +    [TCA_HFSC_STAB]        = { .type = NLA_BINARY, .len = 
>>> TC_STAB_SIZE },
>>
>> Why are these two separate attributes?
>
> I copied qdisc_get_rtab() to qdisc_get_stab() and qdisc_get_rtab uses 
> nla_data(tab) to get the buffer. Should use single attribute instead?
> I have worked on patch that would merge qdisc_get_rtab/stab to generic 
> qdisc_get_xtab supporting both types of link layer emulation tables. 
> With single attribute here, patch wouldn't work so easily.

Right, I forgot that rtabs also use two attribures. Well,
usually they use one attribute and one structure embedded in
their base structure, but only because they were using RTABs
from the beginning. So that looks OK.



  reply	other threads:[~2008-07-08 16:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-03 22:03 [PATCH v3 1/2] net_sched: add size table functions Jussi Kivilinna
2008-07-03 22:03 ` [PATCH v3 2/2] hfsc: add link layer overhead adaption Jussi Kivilinna
2008-07-07 11:53   ` Patrick McHardy
2008-07-08 11:11     ` Jussi Kivilinna
2008-07-08 15:59       ` Patrick McHardy [this message]
2008-07-09 17:42         ` Jussi Kivilinna
2008-07-06  6:31 ` [PATCH v3 1/2] net_sched: add size table functions David Miller
2008-07-06 20:24   ` Patrick McHardy

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=48738ECA.9050703@trash.net \
    --to=kaber@trash.net \
    --cc=jussi.kivilinna@mbnet.fi \
    --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).