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/ _______________________________________________ Bloat mailing list [email protected] https://lists.bufferbloat.net/listinfo/bloat
