netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* skbuff: Copy csum instead of csum_start/csum_offset
@ 2009-05-23  8:20 Herbert Xu
  2009-05-25  7:41 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Herbert Xu @ 2009-05-23  8:20 UTC (permalink / raw)
  To: David S. Miller, netdev

Hi:

skbuff: Copy csum instead of csum_start/csum_offset

It's easier to copy the u32 csum instead of its two u16
constituents.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index cb58b4b..d429c41 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -526,8 +526,7 @@ static void __copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
 	new->sp			= secpath_get(old->sp);
 #endif
 	memcpy(new->cb, old->cb, sizeof(old->cb));
-	new->csum_start		= old->csum_start;
-	new->csum_offset	= old->csum_offset;
+	new->csum		= old->csum;
 	new->local_df		= old->local_df;
 	new->pkt_type		= old->pkt_type;
 	new->ip_summed		= old->ip_summed;

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: skbuff: Copy csum instead of csum_start/csum_offset
  2009-05-23  8:20 skbuff: Copy csum instead of csum_start/csum_offset Herbert Xu
@ 2009-05-25  7:41 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-05-25  7:41 UTC (permalink / raw)
  To: herbert; +Cc: netdev

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Sat, 23 May 2009 18:20:02 +1000

> skbuff: Copy csum instead of csum_start/csum_offset
> 
> It's easier to copy the u32 csum instead of its two u16
> constituents.
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Applied to net-next-2.6

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-25  7:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-23  8:20 skbuff: Copy csum instead of csum_start/csum_offset Herbert Xu
2009-05-25  7:41 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).