diff options
author | Sowmini Varadhan <sowmini.varadhan@oracle.com> | 2018-01-18 16:11:07 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-22 15:43:54 -0500 |
commit | b589513e6354a5fd6934823b7fd66bffad41137a (patch) | |
tree | 0d9e892d669ca556ac5ce566d949aa16ae6f0d9a /net/rds/tcp_send.c | |
parent | ab18a9c9ca27f8208c4960a1b25e8475b9f9dda5 (diff) |
rds: tcp: compute m_ack_seq as offset from ->write_seq
rds-tcp uses m_ack_seq to track the tcp ack# that indicates
that the peer has received a rds_message. The m_ack_seq is
used in rds_tcp_is_acked() to figure out when it is safe to
drop the rds_message from the RDS retransmit queue.
The m_ack_seq must be calculated as an offset from the right
edge of the in-flight tcp buffer, i.e., it should be based on
the ->write_seq, not the ->snd_nxt.
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/tcp_send.c')
-rw-r--r-- | net/rds/tcp_send.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rds/tcp_send.c b/net/rds/tcp_send.c index dc860d1bb608..9b76e0fa1722 100644 --- a/net/rds/tcp_send.c +++ b/net/rds/tcp_send.c | |||
@@ -86,7 +86,7 @@ int rds_tcp_xmit(struct rds_connection *conn, struct rds_message *rm, | |||
86 | * m_ack_seq is set to the sequence number of the last byte of | 86 | * m_ack_seq is set to the sequence number of the last byte of |
87 | * header and data. see rds_tcp_is_acked(). | 87 | * header and data. see rds_tcp_is_acked(). |
88 | */ | 88 | */ |
89 | tc->t_last_sent_nxt = rds_tcp_snd_nxt(tc); | 89 | tc->t_last_sent_nxt = rds_tcp_write_seq(tc); |
90 | rm->m_ack_seq = tc->t_last_sent_nxt + | 90 | rm->m_ack_seq = tc->t_last_sent_nxt + |
91 | sizeof(struct rds_header) + | 91 | sizeof(struct rds_header) + |
92 | be32_to_cpu(rm->m_inc.i_hdr.h_len) - 1; | 92 | be32_to_cpu(rm->m_inc.i_hdr.h_len) - 1; |
@@ -98,7 +98,7 @@ int rds_tcp_xmit(struct rds_connection *conn, struct rds_message *rm, | |||
98 | rm->m_inc.i_hdr.h_flags |= RDS_FLAG_RETRANSMITTED; | 98 | rm->m_inc.i_hdr.h_flags |= RDS_FLAG_RETRANSMITTED; |
99 | 99 | ||
100 | rdsdebug("rm %p tcp nxt %u ack_seq %llu\n", | 100 | rdsdebug("rm %p tcp nxt %u ack_seq %llu\n", |
101 | rm, rds_tcp_snd_nxt(tc), | 101 | rm, rds_tcp_write_seq(tc), |
102 | (unsigned long long)rm->m_ack_seq); | 102 | (unsigned long long)rm->m_ack_seq); |
103 | } | 103 | } |
104 | 104 | ||