* [PATCH RFC] tcp: Do not reload skb pointer after skb_gro_receive().
@ 2018-06-12 1:00 David Miller
2018-06-12 2:59 ` Eric Dumazet
0 siblings, 1 reply; 2+ messages in thread
From: David Miller @ 2018-06-12 1:00 UTC (permalink / raw)
To: netdev; +Cc: edumazet
This is not necessary. skb_gro_receive() will never change what
'head' points to.
In it's original implementation (see commit 71d93b39e52e ("net: Add
skb_gro_receive")), it did:
====================
+ *head = nskb;
+ nskb->next = p->next;
+ p->next = NULL;
====================
This sequence was removed in commit 58025e46ea2d ("net: gro: remove
obsolete code from skb_gro_receive()")
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/ipv4/tcp_offload.c b/net/ipv4/tcp_offload.c
index 4d58e2ce0b5b..8cc7c3487330 100644
--- a/net/ipv4/tcp_offload.c
+++ b/net/ipv4/tcp_offload.c
@@ -268,8 +268,6 @@ struct sk_buff **tcp_gro_receive(struct sk_buff **head, struct sk_buff *skb)
goto out_check_final;
}
- p = *head;
- th2 = tcp_hdr(p);
tcp_flag_word(th2) |= flags & (TCP_FLAG_FIN | TCP_FLAG_PSH);
out_check_final:
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH RFC] tcp: Do not reload skb pointer after skb_gro_receive().
2018-06-12 1:00 [PATCH RFC] tcp: Do not reload skb pointer after skb_gro_receive() David Miller
@ 2018-06-12 2:59 ` Eric Dumazet
0 siblings, 0 replies; 2+ messages in thread
From: Eric Dumazet @ 2018-06-12 2:59 UTC (permalink / raw)
To: David Miller, netdev; +Cc: edumazet
On 06/11/2018 06:00 PM, David Miller wrote:
>
> This is not necessary. skb_gro_receive() will never change what
> 'head' points to.
>
> In it's original implementation (see commit 71d93b39e52e ("net: Add
> skb_gro_receive")), it did:
>
> ====================
> + *head = nskb;
> + nskb->next = p->next;
> + p->next = NULL;
> ====================
>
> This sequence was removed in commit 58025e46ea2d ("net: gro: remove
> obsolete code from skb_gro_receive()")
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
SGTM, thanks David !
Signed-off-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-12 2:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-12 1:00 [PATCH RFC] tcp: Do not reload skb pointer after skb_gro_receive() David Miller
2018-06-12 2:59 ` Eric Dumazet
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).