lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130603155621.0cb53b1b@redhat.com>
Date:	Mon, 3 Jun 2013 15:56:21 +0200
From:	Jesper Dangaard Brouer <brouer@...hat.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	David Miller <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>,
	Jesper Dangaard Brouer <brouer@...hat.com>,
	Vimalkumar <j.vimal@...il.com>, Jiri Pirko <jpirko@...hat.com>
Subject: Re: [PATCH] net_sched: restore "overhead xxx" handling

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

> From: Eric Dumazet <edumazet@...gle.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ