-
Couldn't load subscription status.
- Fork 8.2k
net: context: tcp: set the pkt appdatalen info when sending packets #73
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
This is related to commit "net: tcp: Make sure ACK timer is not run if cancelled" which did not set the cancel flag when the timer was cancelled from tcp.c. Signed-off-by: Jukka Rissanen <[email protected]>
When adding link-local address to the cache the type needs to be properly set as net_ipv6_addr_create_iid will attempt to use it when generating the IPv6 address. Jira: ZEP-2077 Signed-off-by: Luiz Augusto von Dentz <[email protected]>
|
@simple2017 : Thanks for resubmitting this from gerrit! Perhaps you could fill in your name in Github profile, so it was easier to recognize you ;-). @jukkar , @tbursztyka : So, do you guys agree with @nashif's RFC that all patches should be submitted against master? Otherwise, we'll keeping having issues with stray commits like this. |
This is submitted against master which is fine, we all agree on this. |
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.
The patch itself looks ok. I would like to get the commit message a bit better, perhaps something like this (feel free to edit the message as needed and remember not to exceed the max line length in commit msg)
net: context: Set TCP app data len when sending packet
When we send TCP data segment, we need to set the length of the application data by calling net_pkt_set_appdatalen(). This is done so that sequence number can be properly advanced when we receive ACK to that pending packet.
|
@jukkar :
Yes, just seems to be submitted from net branch against master, why a couple of extra commits. Hopefully net branch will be fully flushed to master. |
|
Thanks all, @pfalcon @jukkar Maybe I should close this pull request and follow your advice to reopen a pull request against the master branch. Because I found some extra commits included in my single commit when using net branch. In the new pull request I will modify the commit message format errors and patch-check problem. |
Those extra commits are really annoying, but I think we can safely ignore them at this point. |
No need to close this PR. Just fix the commit message issues and whatever is needed to make Shippable happy. So please re-submit this PR with fixes. |
|
@jukkar OK, I got it, thanks a lot. |
|
@simple2017 : Please squash your 2 commits together (but use the most recent commit message of course). |
When we send TCP data segment, we need to set the length of the application data by calling net_pkt_set_appdatalen(). This is done so that sequence number can be properly advanced when we receive ACK to that pending packet. Signed-off-by: xiaorui hu <[email protected]>
|
Ok, based on IRC discussion with @jukkar that it would be nice to understand effect of this change better (i.e. know what it fixes and what doesn't), I played with it today. I first tried to do fault injection on packet receive path, verifying that it works as expected for HTTP client type load. Then my idea was that maybe it would work for HTTP server style too, by dropping peer's ACKs, thus triggering Zephyr to do rexmits, and trigger bad things. But that didn't really work. So, I went for fault inject on send path too, and that immediately showed the effect of the change. So, without this change, with send pkt drop I saw with a test server in MicroPython: At which point no further data were received, connection just hanged, and Wireshark showed rexmits storm, but all in vain. With this patch, the output was below, as expected from the server. For reference, my test patch is at https://github.com/pfalcon/zephyr/commits/net-pkt-fault-inject |
|
Next test - problem I repeated with HTTP client connection to http://archive.ubuntu.com - expectedly, doesn't help, as it's client (recv) application. |
|
Final test I wanted to perform. It's my understanding that @jukkar wondered whether this change would improve TCP behavior of https://gerrit.zephyrproject.org/r/#/c/13077/ . Though I may miss something, and he meant another test. Anyway, I tried it, and well, for it patch doesn't have any visible effect, after few packets, processing still deadlocks. Anyway, I see that @simple2017 has squashed 2 commits together, so this should be ready to merge, and make pretty good improvements already. |
|
@simple2017 : Great work, congrats on your first patch merged! ;-) Hope it will be easier next time, looking forward to new IP stack fixes that you found. |
# Conflicts: # dts/bindings/serial/st,stm32-uart-base.yaml # subsys/net/ip/net_if.c
when received an ACK, we need the pkt appdatalen info to calculate seq which determine these packets should be released.