]> git.baikalelectronics.ru Git - kernel.git/commit
tcp_probe: avoid modulus operation and wrap fix
authorStephen Hemminger <shemminger@vyatta.com>
Mon, 25 Jan 2010 23:47:50 +0000 (15:47 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Jan 2010 23:47:50 +0000 (15:47 -0800)
commit7176d334a2ffdb79f5eceeed340325c3aedfe291
treeea963e08a132523327986c99ea63768593d5701a
parent30fcd435b8e4a74d88725e72133a49ec0e74211e
tcp_probe: avoid modulus operation and wrap fix

By rounding up the buffer size to power of 2, several expensive
modulus operations can be avoided.  This patch also solves a bug where
the gap need when ring gets full was not being accounted for.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_probe.c