]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tcp: fix fack_count accounting on tcp_shift_skb_data()
authorJoao Martins <joao.m.martins@oracle.com>
Mon, 10 Jun 2019 22:12:38 +0000 (23:12 +0100)
committerBrian Maly <brian.maly@oracle.com>
Tue, 11 Jun 2019 01:27:16 +0000 (21:27 -0400)
commit3909763a246b594af2e48c34027f7651ea9ba3a7
tree4bb26c75a08d5159f22fa3f1aea58f00f13808f1
parent56b70ccafe0c224a37aa0e0baf55596c65c66f9a
tcp: fix fack_count accounting on tcp_shift_skb_data()

v4.15 or since commit 737ff314563 ("tcp: use sequence distance to
detect reordering") had switched from the packet-based FACK tracking
to sequence-based.

v4.14 and older still have the old logic and hence on
tcp_skb_shift_data() needs to retain its original logic and have
@fack_count in sync. In other words, we keep the increment of pcount with
tcp_skb_pcount(skb) to later used that to update fack_count. To make it
more explicit we track the new skb that gets incremented to pcount in
@next_pcount, and we get to avoid the constant invocation of
tcp_skb_pcount(skb) all together.

Orabug: 29890820
Fixes: 1b56e4cb5dec ("tcp: limit payload size of sacked skbs")
Reported-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Reviewed-by: John Haxby <john.haxby@oracle.com>
Reviewed-by: Rao Shoaib <rao.shoaib@oracle.com>>>>
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
net/ipv4/tcp_input.c