All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] tcp: do not clear again skb->csum in tcp_init_nondata_skb()
@ 2017-11-03 13:18 Eric Dumazet
  2017-11-05 13:15 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2017-11-03 13:18 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Neal Cardwell

From: Eric Dumazet <edumazet@google.com>

tcp_init_nondata_skb() is fed with freshly allocated skbs.
They already have a cleared csum field, no need to clear it again.

This is based on Neal review on commit 3b11775033dc ("tcp: do not mangle
skb->cb[] in tcp_make_synack()"), noticing I did not clear skb->csum.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Neal Cardwell <ncardwell@google.com>
---
 net/ipv4/tcp_output.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 822962ece2840824db3d89993f6889780cd2ab99..0b8062274ed2bf1c2781fe7e88f0de97f6ab6e55 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -381,7 +381,6 @@ static void tcp_ecn_send(struct sock *sk, struct sk_buff *skb,
 static void tcp_init_nondata_skb(struct sk_buff *skb, u32 seq, u8 flags)
 {
 	skb->ip_summed = CHECKSUM_PARTIAL;
-	skb->csum = 0;
 
 	TCP_SKB_CB(skb)->tcp_flags = flags;
 	TCP_SKB_CB(skb)->sacked = 0;

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

* Re: [PATCH net-next] tcp: do not clear again skb->csum in tcp_init_nondata_skb()
  2017-11-03 13:18 [PATCH net-next] tcp: do not clear again skb->csum in tcp_init_nondata_skb() Eric Dumazet
@ 2017-11-05 13:15 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-11-05 13:15 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, ncardwell

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 03 Nov 2017 06:18:59 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> tcp_init_nondata_skb() is fed with freshly allocated skbs.
> They already have a cleared csum field, no need to clear it again.
> 
> This is based on Neal review on commit 3b11775033dc ("tcp: do not mangle
> skb->cb[] in tcp_make_synack()"), noticing I did not clear skb->csum.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Reported-by: Neal Cardwell <ncardwell@google.com>

Applied.

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

end of thread, other threads:[~2017-11-05 13:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-03 13:18 [PATCH net-next] tcp: do not clear again skb->csum in tcp_init_nondata_skb() Eric Dumazet
2017-11-05 13:15 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.