Re: [PATCH v2 net-next] tcp: avoid expensive pskb_expand_head() calls

Eric Dumazet
2012-04-19T12:44:57Z

On Thu, 2012-04-19 at 14:57 +0300, Ilpo Järvinen wrote:

> I'm not concerned of the output side, that seems to work because
> of the in tcp_retransmit_skb getting rid of the extra first.
>
> The ACK input stuff is more interesting, e.g., this one in
> tcp_mark_head_lost:
>
> err = tcp_fragment(sk, skb, (packets - oldcnt) * mss, mss);
>
> It splits from TCP_SKB_CB(skb)->seq + (packets - oldcnt) * mss whereas
> I think the desired point would be: TCP_SKB_CB(skb)->seq + offset_ack +
> (packets - oldcnt) * mss?
>
> ...There is similar case in sacktag code too while it's aligning to mss
> boundaries in tcp_match_skb_to_sack.

Hmm yes, so maybe its safer to update TCP_SKB_CB(skb)->seq in
tcp_tso_acked() (as well as offset_ack) and make needed adjustements in
tcp_fragment() if we find offset_ack being not null.