All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	Vimalkumar <j.vimal@gmail.com>, Jiri Pirko <jpirko@redhat.com>
Subject: Re: [PATCH] net_sched: restore "overhead xxx" handling
Date: Mon, 3 Jun 2013 15:56:21 +0200	[thread overview]
Message-ID: <20130603155621.0cb53b1b@redhat.com> (raw)
In-Reply-To: <1370217305.24311.104.camel@edumazet-glaptop>

On Sun, 02 Jun 2013 16:55:05 -0700
Eric Dumazet <eric.dumazet@gmail.com> wrote:

> From: Eric Dumazet <edumazet@google.com>
> 
> commit 56b765b79 ("htb: improved accuracy at high rates")
> broke the "overhead xxx" handling, as well as the "linklayer atm"
> attribute.
> 
> tc class add ... htb rate X ceil Y linklayer atm overhead 10
> 
> This patch restores the "overhead xxx" handling, for htb, tbf
> and act_police
> 
> The "linklayer atm" thing needs a separate fix.
> 
[...]
> 
> diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
> index f10818f..e7f4e21 100644
> --- a/include/net/sch_generic.h
> +++ b/include/net/sch_generic.h
> @@ -679,22 +679,26 @@ static inline struct sk_buff
> *skb_act_clone(struct sk_buff *skb, gfp_t gfp_mask, #endif
>  
>  struct psched_ratecfg {
> -	u64 rate_bps;
> -	u32 mult;
> -	u32 shift;
> +	u64	rate_bps;
> +	u32	mult;
> +	u16	overhead;
> +	u8	shift;
>  };
>  
>  static inline u64 psched_l2t_ns(const struct psched_ratecfg *r,
>  				unsigned int len)
>  {
> -	return ((u64)len * r->mult) >> r->shift;
> +	return ((u64)(len + r->overhead) * r->mult) >> r->shift;
>  }


Would it make sense to add the "overhead" in qdisc_pkt_len_init() or
qdisc_calculate_pkt_len(), thus updating qdisc_skb_cb(skb)->pkt_len
instead?  (And perhaps also address the per GSO issue).

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Sr. Network Kernel Developer at Red Hat
  Author of http://www.iptv-analyzer.org
  LinkedIn: http://www.linkedin.com/in/brouer

  parent reply	other threads:[~2013-06-03 13:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-02 23:55 [PATCH] net_sched: restore "overhead xxx" handling Eric Dumazet
2013-06-03  5:23 ` David Miller
2013-06-03 13:56 ` Jesper Dangaard Brouer [this message]
2013-06-03 14:08   ` Eric Dumazet

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=20130603155621.0cb53b1b@redhat.com \
    --to=brouer@redhat.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=j.vimal@gmail.com \
    --cc=jpirko@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.