[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130530095253.GA8461@uio.no>
Date: Thu, 30 May 2013 11:52:53 +0200
From: "Steinar H. Gunderson" <sgunderson@...foot.com>
To: Jesper Dangaard Brouer <jbrouer@...hat.com>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
Toke Høiland-Jørgensen <toke@...e.dk>,
Mike Frysinger <vapier@...too.org>,
Jiri Benc <jbenc@...hat.com>, Jiri Pirko <jpirko@...hat.com>,
netdev@...r.kernel.org, bloat@...ts.bufferbloat.net,
Patrick McHardy <kaber@...sh.net>,
Steven Barth <cyrus@...nwrt.org>,
"russell-tcatm@...art.id.au" <russell-tcatm@...art.id.au>,
David Miller <davem@...hat.com>,
Jussi Kivilinna <jussi.kivilinna@...et.fi>,
Felix Fietkau <nbd@....name>, Michal Soltys <soltys@....info>
Subject: Re: [Bloat] tc linklayer ADSL calc broken after commit 56b765b79
(htb: improved accuracy at high rates)
On Thu, May 30, 2013 at 11:15:47AM +0200, Jesper Dangaard Brouer wrote:
> int pkt_len = skb->len + (encap_overhead * gso_segments);
> int wire_sz = DIV_ROUND_UP(pkt_len,48)*53;
>
> (I suspect, that the compiler might even optimize and remove any
> real divisions, I bet Eric can tell us.)
FWIW, GCC can change divisions by integer constants (even signed divisions)
to some multiplies and shifts, by way of some number theory magic.
/* Steinar */
--
Homepage: http://www.sesse.net/
--
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