Revert "tcp: add receive queue awareness in tcp_rcv_space_adjust()"
This reverts commit 84c156a351 which is
commit ea33537d82921e71f852ea2ed985acc562125efe upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: I438e7a8dcf78ccb7c402de534598663642cb2fc3
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -337,7 +337,7 @@ struct tcp_sock {
|
||||
} rcv_rtt_est;
|
||||
/* Receiver queue space */
|
||||
struct {
|
||||
int space;
|
||||
u32 space;
|
||||
u32 seq;
|
||||
u64 time;
|
||||
} rcvq_space;
|
||||
|
||||
@@ -752,7 +752,8 @@ static inline void tcp_rcv_rtt_measure_ts(struct sock *sk,
|
||||
void tcp_rcv_space_adjust(struct sock *sk)
|
||||
{
|
||||
struct tcp_sock *tp = tcp_sk(sk);
|
||||
int time, inq, copied;
|
||||
u32 copied;
|
||||
int time;
|
||||
|
||||
trace_tcp_rcv_space_adjust(sk);
|
||||
|
||||
@@ -763,9 +764,6 @@ void tcp_rcv_space_adjust(struct sock *sk)
|
||||
|
||||
/* Number of bytes copied to user in last RTT */
|
||||
copied = tp->copied_seq - tp->rcvq_space.seq;
|
||||
/* Number of bytes in receive queue. */
|
||||
inq = tp->rcv_nxt - tp->copied_seq;
|
||||
copied -= inq;
|
||||
if (copied <= tp->rcvq_space.space)
|
||||
goto new_measure;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user