Re: [PATCH v2 net-next 2/2] tcp: fix the error count of tcpInSegs

From: Yafang Shao
Date: Mon Sep 10 2018 - 06:57:18 EST


On Mon, Sep 10, 2018 at 2:32 AM, Eric Dumazet <edumazet@xxxxxxxxxx> wrote:
> On Sat, Sep 8, 2018 at 8:14 PM Yafang Shao <laoar.shao@xxxxxxxxx> wrote:
>>
>> In RFC1213, the tcpInSegs is the total number of segments received.
>> While currently it is the total number of SKBs received.
>> The number of SKBs may be not equal with the numer of segments because of
>> GRO.
>> So fix this error count.
>>
>
> We have discussed this in the past and the consensus was it was too
> late to change this.
>
> IP counters have the same issue, so after your patch, we would have
> quite a difference between transport and network layers.
>
> Adding all these max_t(u16, 1, skb_shinfo(skb)->gso_segs)) everywhere add a cost

May be we could give a comment here why we do it like this, otherwise
it may make a misunderstanding.

Thanks
Yafang