Re: [PATCH net-next] tcp: minor optimization around tcp_hdr() usage in receive path

From: David Miller
Date: Thu May 31 2018 - 13:23:57 EST


From: Yafang Shao <laoar.shao@xxxxxxxxx>
Date: Tue, 29 May 2018 23:27:31 +0800

> This is additional to the
> commit ea1627c20c34 ("tcp: minor optimizations around tcp_hdr() usage").
> At this point, skb->data is same with tcp_hdr() as tcp header has not
> been pulled yet. So use the less expensive one to get the tcp header.
>
> Remove the third parameter of tcp_rcv_established() and put it into
> the function body.
>
> Furthermore, the local variables are listed as a reverse christmas tree :)
>
> Cc: Eric Dumazet <edumazet@xxxxxxxxxx>
> Signed-off-by: Yafang Shao <laoar.shao@xxxxxxxxx>

Applied, thanks.