-
Notifications
You must be signed in to change notification settings - Fork 7.4k
net: tcp: Change SYN FIN to use send_data_timer #90786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@hakehuang , could you please help checking it on the physical boards? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, having (in practice) two retransmission timers was indeed pretty confusing, the change looks quite reasonalable, another step in the right direction 👍
Regarding twister failure - the removed flag is still referenced in the net shell: zephyr/subsys/net/lib/shell/conn.c Line 151 in 5601af3
|
board testing is OK on mimxrt1060_evk@C, and with max-pro testing, no regression issues found. |
Thanks @rlubos , I didn't notice that during my local run. Sorry. |
The send_queue was used as SYN/FIN packet retransmission. Before the SYN/FIN being ACKed and dequeue-ed, the following packets in the send_queue cannot be sent out. That's why Zephyr had to send a FIN+ACK instead of a duplicated ACK-only in FINWAIT1, CLOSING. In fact, we can take SYN/FIN as kind of data and use the same send_data_timer for retransmission, like other OSes do. This way, the send_queue is simply used for local traffics. Benefits (in theory): 1. The code is easier, 2. TxPkt performance is better after skipping enq/deq send_queue, 3. The struct tcp{} node is a few bytes smaller, saving memory. Signed-off-by: Shrek Wang <inet_eman@outlook.com>
|
Sounds ok |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks
The send_queue was used as SYN/FIN packet retransmission. Before the SYN/FIN being ACKed and dequeue-ed, the following packets in the send_queue cannot be sent out. That's why Zephyr had to send a FIN+ACK instead of a duplicated ACK-only in FINWAIT1, CLOSING. In fact, we can take SYN/FIN as kind of data and use the same send_data_timer for retransmission, like other OSes do. This way, the send_queue is simply used for local traffics.
Benefits (in theory):