linux-kernel-test/net/xfrm
Jean Delvare eefa390628 [NET]: Clean up sk_buff walkers.
I noticed recently that, in skb_checksum(), "offset" and "start" are
essentially the same thing and have the same value throughout the
function, despite being computed differently. Using a single variable
allows some cleanups and makes the skb_checksum() function smaller,
more readable, and presumably marginally faster.

We appear to have many other "sk_buff walker" functions built on the
exact same model, so the cleanup applies to them, too. Here is a list
of the functions I found to be affected:

net/appletalk/ddp.c:atalk_sum_skb()
net/core/datagram.c:skb_copy_datagram_iovec()
net/core/datagram.c:skb_copy_and_csum_datagram()
net/core/skbuff.c:skb_copy_bits()
net/core/skbuff.c:skb_store_bits()
net/core/skbuff.c:skb_checksum()
net/core/skbuff.c:skb_copy_and_csum_bit()
net/core/user_dma.c:dma_skb_copy_datagram_iovec()
net/xfrm/xfrm_algo.c:skb_icv_walk()
net/xfrm/xfrm_algo.c:skb_to_sgvec()

OTOH, I admit I'm a bit surprised, the cleanup is rather obvious so I'm
really wondering if I am missing something. Can anyone please comment
on this?

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-26 00:44:22 -07:00
..
Kconfig [PFKEYV2]: CONFIG_NET_KEY_MIGRATE option 2007-02-08 13:15:05 -08:00
Makefile [XFRM]: Extract common hashing code into xfrm_hash.[ch] 2006-09-22 15:08:49 -07:00
xfrm_algo.c [NET]: Clean up sk_buff walkers. 2007-04-26 00:44:22 -07:00
xfrm_hash.c [XFRM]: Extract common hashing code into xfrm_hash.[ch] 2006-09-22 15:08:49 -07:00
xfrm_hash.h [XFRM] STATE: Use destination address for src hash. 2006-10-04 00:31:02 -07:00
xfrm_input.c [SK_BUFF]: Introduce skb_transport_header(skb) 2007-04-25 22:25:31 -07:00
xfrm_policy.c [NET]: cleanup extra semicolons 2007-04-25 22:29:24 -07:00
xfrm_state.c [XFRM]: Export SAD info. 2007-04-26 00:10:29 -07:00
xfrm_user.c [XFRM]: Export SAD info. 2007-04-26 00:10:29 -07:00