aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorJonas Bonn <jonas@southpole.se>2010-11-25 02:30:32 +0000
committerDavid S. Miller <davem@davemloft.net>2010-11-28 11:16:38 -0800
commit6a632625c7da7594d059b88dae0e9c591af147ba (patch)
treed062b16340e3b2d10575ad06882cdbaa1c6014b5 /include/net/xfrm.h
parentethoc: fix function return type (diff)
downloadlinux-dev-6a632625c7da7594d059b88dae0e9c591af147ba.tar.xz
linux-dev-6a632625c7da7594d059b88dae0e9c591af147ba.zip
ethoc: remove division from loops
Calculating the BD entry using a modulus operation isn't optimal, especially inside the loop. This patch removes the modulus operations in favour of: i) simply checking for wrapping in the case of cur_rx ii) forcing num_tx to be a power of two and using it to mask out the entry from cur_tx The also prevents possible issues related overflow of the cur_rx and cur_tx counters. Signed-off-by: Jonas Bonn <jonas@southpole.se> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/xfrm.h')
0 files changed, 0 insertions, 0 deletions