mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 13:13:08 +08:00
tcp: Reset wb_nack to zero when it hits TCP fast retransmit threshold
The modification is to solve the problem that the opposite end cannot receive the retransmission message, and the protocol stack no longer sends retransmission messages Signed-off-by: wangchen <wangchen41@xiaomi.com>
This commit is contained in:
@@ -600,6 +600,12 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
|
||||
{
|
||||
/* Fast retransmission has been triggered */
|
||||
|
||||
#ifndef CONFIG_NET_TCP_CC_NEWRENO
|
||||
/* Reset counter */
|
||||
|
||||
TCP_WBNACK(wrb) = 0;
|
||||
#endif
|
||||
|
||||
if ((flags & TCP_NEWDATA) != 0)
|
||||
{
|
||||
FAR uint8_t *buf = dev->d_buf;
|
||||
@@ -619,7 +625,6 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
|
||||
* driver to send the message and marked as rexmit
|
||||
*/
|
||||
|
||||
TCP_WBNACK(wrb) = 0;
|
||||
conn->timeout = true;
|
||||
|
||||
netdev_txnotify_dev(conn->dev);
|
||||
@@ -653,11 +658,6 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
|
||||
/* Do fast retransmit */
|
||||
|
||||
rexmitno = ackno;
|
||||
#ifndef CONFIG_NET_TCP_CC_NEWRENO
|
||||
/* Reset counter */
|
||||
|
||||
TCP_WBNACK(wrb) = 0;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user