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: Mon, 07 Jul 2008 13:53:24 +0200	[thread overview]
Message-ID: <487203B4.4030701@trash.net> (raw)
In-Reply-To: <20080703220317.30053.87947.stgit@fate.lan>

Jussi Kivilinna wrote:
> CBQ and HTB have options for emulating overhead of underlying link layer
> (mpu/overhead/linklayer options). This patch makes sch_hfsc use size table
> to emulate link layer overhead.
> 
> Patch uses size table to convert packet length to emulated link layer packet
> length. Converted packet length is passed to hfsc calculations instead of
> real. If size table isn't passed to kernel, hfsc works as before.
> 
> +/* convert packet length to link layer packet length */
> +static unsigned int get_linklayer_len(struct hfsc_class *cl, unsigned int len)
> +{
> +	if (unlikely(!len) || likely(!cl->stab))
> +		return len;
> +	return qdisc_linklayer_sz(cl->stab, len);
> +}

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.

> @@ -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?

  reply	other threads:[~2008-07-07 11:53 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 [this message]
2008-07-08 11:11     ` Jussi Kivilinna
2008-07-08 15:59       ` Patrick McHardy
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=487203B4.4030701@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).