]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
commitf81074f86176605bfbfafb9944e27628a4e26ce6
treeea963e08a132523327986c99ea63768593d5701a
parent4f9a91c81273b66afe0b6a9be460b47581b28246
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