[TCP]: Fix GSO ignorance of pkts_acked arg (cong.cntrl modules)

The code used to ignore GSO completely, passing either way too
small or zero pkts_acked when GSO skb or part of it got ACKed.
In addition, there is no need to calculate the value in the loop
but simple arithmetics after the loop is sufficient. There is
no need to handle SYN case specially because congestion control
modules are not yet initialized when FLAG_SYN_ACKED is set.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Ilpo Järvinen and committed by David S. Miller 6418204f 75202e76

+2 -2
+2 -2
net/ipv4/tcp_input.c
··· 2407 struct sk_buff *skb; 2408 __u32 now = tcp_time_stamp; 2409 int acked = 0; 2410 __s32 seq_rtt = -1; 2411 - u32 pkts_acked = 0; 2412 ktime_t last_ackt = ktime_set(0,0); 2413 2414 while ((skb = tcp_write_queue_head(sk)) && ··· 2437 */ 2438 if (!(scb->flags & TCPCB_FLAG_SYN)) { 2439 acked |= FLAG_DATA_ACKED; 2440 - ++pkts_acked; 2441 } else { 2442 acked |= FLAG_SYN_ACKED; 2443 tp->retrans_stamp = 0; ··· 2480 } 2481 2482 if (acked&FLAG_ACKED) { 2483 const struct tcp_congestion_ops *ca_ops 2484 = inet_csk(sk)->icsk_ca_ops; 2485
··· 2407 struct sk_buff *skb; 2408 __u32 now = tcp_time_stamp; 2409 int acked = 0; 2410 + int prior_packets = tp->packets_out; 2411 __s32 seq_rtt = -1; 2412 ktime_t last_ackt = ktime_set(0,0); 2413 2414 while ((skb = tcp_write_queue_head(sk)) && ··· 2437 */ 2438 if (!(scb->flags & TCPCB_FLAG_SYN)) { 2439 acked |= FLAG_DATA_ACKED; 2440 } else { 2441 acked |= FLAG_SYN_ACKED; 2442 tp->retrans_stamp = 0; ··· 2481 } 2482 2483 if (acked&FLAG_ACKED) { 2484 + u32 pkts_acked = prior_packets - tp->packets_out; 2485 const struct tcp_congestion_ops *ca_ops 2486 = inet_csk(sk)->icsk_ca_ops; 2487