net:use help function of skb_checksum_start_offset to calculate offset
Subsystems (3)
PATCH 1/3 net:use help function of skb_checksum_start_offset to calculate offset
Although these are equivalent, but the skb_checksum_start_offset() is more readable.
--- drivers/net/tile/tilepro.c | 2 +- net/ipv6/udp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/tile/tilepro.c +1 -1
@@ -1930,7 +1930,7 @@ static int tile_net_tx(struct sk_buff *skb, struct net_device *dev)unsigned int len = skb->len;unsigned char *data = skb->data; -unsigned int csum_start = skb->csum_start -skb_headroom (skb); +unsigned int csum_start =skb_checksum_start_offset (skb);lepp_frag_t frags[LEPP_MAX_FRAGS ];
net/ipv6/udp.c +1 -1
@@ -1328,7 +1328,7 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb, u32 features)/* Do software UFO. Complete and fill in the UDP checksum as HW cannot * do checksum of UDP packets sent as multiple IP fragments. */ - offset = skb->csum_start -skb_headroom (skb); + offset =skb_checksum_start_offset (skb); csum =skb_checksum (skb, offset, skb->len- offset,0 ); offset += skb->csum_offset; *(__sum16 *)(skb->data + offset) =csum_fold (csum);
Signature · 1 line
1.6.3.3
From: Shan Wei <[email protected]>
Date: Fri, 22 Apr 2011 19:07:41 +0800
Quoted 3 lines
Although these are equivalent, but the
skb_checksum_start_offset()is more readable.Signed-off-by Shan Wei <[email protected]>
Applied.
Quoted 27 lines · Shan Wei
Although these are equivalent, but the
skb_checksum_start_offset()is more readable.Signed-off-by Shan Wei <[email protected]>--- drivers/net/tile/tilepro.c | 2 +- net/ipv6/udp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/net/tile/tilepro.c +1
-1@@ -1930,7 +1930,7 @@ static int tile_net_tx(struct sk_buff *skb, struct net_device *dev)unsigned int len = skb->len;unsigned char *data = skb->data; -unsigned int csum_start = skb->csum_start -skb_headroom (skb); +unsigned int csum_start =skb_checksum_start_offset (skb);lepp_frag_t frags[LEPP_MAX_FRAGS ];net/ipv6/udp.c +0
-0
net/ipv6/udp.c static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb, u32 features) · line 1334
Quoted 8 lines
net/ipv6/udp.c +1
-1@@ -1328,7 +1328,7 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb, u32 features)/* Do software UFO. Complete and fill in the UDP checksum as HW cannot * do checksum of UDP packets sent as multiple IP fragments. */ - offset = skb->csum_start -skb_headroom (skb); + offset =skb_checksum_start_offset (skb); csum =skb_checksum (skb, offset, skb->len- offset,0 ); offset += skb->csum_offset; *(__sum16 *)(skb->data + offset) =csum_fold (csum);
I took the drivers/net/tile/ change into my tree, but I'll defer to David or some other net person to take the net/ipv6/udp.c change. Thanks!
Signature · 2 lines
Chris Metcalf, Tilera Corp. http://www.tilera.com
David Miller
maintainerFrom: Chris Metcalf <[email protected]>
Date: Mon, 2 May 2011 18:20:01 -0400
Quoted 2 lines
I took the
drivers/net/tile/change into my tree, but I'll defer to David or some other net person to take thenet/ipv6/udp.cchange. Thanks!
I took them both into my tree. Didn't you see my reply?
Quoted 6 lines · David Miller
From: Chris Metcalf <[email protected]>
Date: Mon, 2 May 2011 18:20:01 -0400Quoted 2 lines
I took the
drivers/net/tile/change into my tree, but I'll defer to David or some other net person to take thenet/ipv6/udp.cchange. Thanks!I took them both into my tree. Didn't you see my reply?
I did, but I didn't see the change yet in .39-rc5, so I figured it would be harmless to also take it into the tile tree. And, I thought you might have just taken the platform-independent part of the change. I'll revert the tile part of the change out of my tree. Thanks!
Signature · 2 lines
Chris Metcalf, Tilera Corp. http://www.tilera.com
David Miller
maintainerFrom: Chris Metcalf <[email protected]>
Date: Mon, 2 May 2011 18:29:11 -0400
Quoted 10 lines · David Miller
Quoted 6 lines
From: Chris Metcalf <[email protected]>
Date: Mon, 2 May 2011 18:20:01 -0400Quoted 2 lines
I took the
drivers/net/tile/change into my tree, but I'll defer to David or some other net person to take thenet/ipv6/udp.cchange. Thanks!I took them both into my tree. Didn't you see my reply?
I did, but I didn't see the change yet in .39-rc5, so I figured it would be harmless to also take it into the tile tree.
This change will show up in net-next-2.6 and as a consequence linux-2.6-next