lkml.org 
[lkml]   [2018]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net-next] tcp: minor optimization for calculating packets_out in tcp connect
From
Date


On 12/15/2018 01:33 AM, Yafang Shao wrote:
> When we building a syn packet, the tcp_skb_pcount(skb) is always 1,
> which is set in tcp_init_nondata_skb().
> Regarding the syn_data, it is set through
> memcpy(syn_data->cb, syn->cb, sizeof(syn->cb)),
> which is always 1 as well.
>
> So we don't need to use tcp_skb_pcount(skb), that could give us a
> little improvement.
>

I dunno, I find current code more self-documented.

This is not fast path, so I would suggest we keep it.

Thanks.

\
 
 \ /
  Last update: 2018-12-15 14:00    [W:2.719 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site