Skip to content
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

net: Fix a couple of large TCP segment issues #101

Merged
merged 2 commits into from
Nov 4, 2013
Merged

net: Fix a couple of large TCP segment issues #101

merged 2 commits into from
Nov 4, 2013

Conversation

adamgreen
Copy link
Contributor

This pull request contains two commits I made to correct issues that were reported by mbed user S K UCI in this forum posting: http://mbed.org/forum/mbed/topic/4354/?page=2#comment-22657 This test is a very good stress test of the mbed networking stack. It might be good to have it added to the official mbed test suite for the networking stack. In particular it sends a bunch of different sized buffers down to the stack quite quickly. This exercises the lwIP code which will link multiple pbufs into a single segment when timing allows. It was this linking of various sized pbufs into the same TCP segment which exposed both of the bugs fixed in this pull request.

Edit: I forgot to mention that I did test these fixes by running a number of local TCP/UDP tests that people have given me to reproduce other issues in the past. In addition, I ran the official mbed NET_1 test too.

tcp_write() would incorrectly byte swap the checksum 1 too many times
when concatenating a pbuf to an existing TCP segment if the number of
bytes in the concatenated data was odd.  I hit this issue when I tried
to reproduce a lost segment issue reported by a mbed user in this forum
thread: http://mbed.org/forum/mbed/topic/4354/?page=2#comment-22657
If lwIP placed more than 2 pbufs in a TCP segment, the ethernet driver
would fail to send it as it didn't have enough Tx descriptors.  The
maximum number of pbufs outstanding for transmit that lwIP keeps is
defined by the TCP_SND_QUEUELEN macro.  I modifed the value of
LPC_NUM_BUFF_TXDESCS to take advantage of this lwIP value.  The +1
takes into account that LPC_EMAC->TxProduceIndex ==
LPC->TxConsumeIndex is reserved for indicating that the queue is empty
so a full queue uses one less than the maximum count.
emilmont added a commit that referenced this pull request Nov 4, 2013
net: Fix a couple of large TCP segment issues
@emilmont emilmont merged commit 8222bde into ARMmbed:master Nov 4, 2013
@adamgreen adamgreen deleted the netFixLargeSegmentIssues branch November 4, 2013 08:51
@adamgreen
Copy link
Contributor Author

Thanks!

deepakvenugopal added a commit to deepakvenugopal/mbed-os that referenced this pull request Aug 9, 2018
…656a

cbe656a Fix 'unused variable' compiler - warning (ARMmbed#103)
1599c6b CoAP blockwise transfer support (ARMmbed#94)
40abace Update memory allocation and adjust trace (ARMmbed#102)
fc7bec3 Update unit test stub (ARMmbed#101)
4091f1b Check for coap_security_handler_connect_non_blocking return value (ARMmbed#100)

git-subtree-dir: features/nanostack/coap-service
git-subtree-split: cbe656a
yossi2le pushed a commit to yossi2le/mbed-os that referenced this pull request Jan 2, 2019
* Add notes on implementation of tests
* add comment about active header location
* Add component diagram and more detail on testapp flow
linlingao added a commit to linlingao/mbed-os that referenced this pull request Jul 12, 2019
artokin pushed a commit to artokin/mbed-os that referenced this pull request Aug 24, 2020
…from 293edc63b8..ae4ef1b197

ae4ef1b197 Merge pull request ARMmbed#101 from ARMmbed/sync_with_mbed_os_master
dd57078cf8 (via Mbed OS)resolved astyle - coding format.
f62ac25b09 (via Mbed OS)fixed the preprocessor guards
63cc85e983 Follow Mbed OS coding style

git-subtree-dir: connectivity/drivers/802.15.4_RF/atmel-rf-driver
git-subtree-split: ae4ef1b197698749ce030c39d84e222ac4b4cd0e
artokin pushed a commit to artokin/mbed-os that referenced this pull request Jun 22, 2021
…25669d6b1

425669d6b1 Merge remote-tracking branch 'origin/master' into release_for_mbed_os
e99f2124dd Merge pull request ARMmbed#104 from PelionIoT/move_ns_trace
eb0d23a210 Move ns_trace.h to mbed-trace folder
d96ad6923c Merge pull request ARMmbed#102 from PelionIoT/add_ns_trace
72bc311b9b Moved ns_trace.h from nanostack-libservice
e060c630f3 Moved ns_trace.h from nanostack-libservice
ead8b30353 Merge pull request ARMmbed#101 from TeroJaasko/fix_use_after_free_bug_on_tr_array
8a06eff8ca tr_array: fix use after free error after mbed_trace_free() is called

git-subtree-dir: features/frameworks/mbed-trace
git-subtree-split: 425669d6b18046ab65d23d0e395b5a6a433be5bd
artokin pushed a commit to artokin/mbed-os that referenced this pull request Jun 28, 2021
…25669d6b1

425669d6b1 Merge remote-tracking branch 'origin/master' into release_for_mbed_os
e99f2124dd Merge pull request ARMmbed#104 from PelionIoT/move_ns_trace
eb0d23a210 Move ns_trace.h to mbed-trace folder
d96ad6923c Merge pull request ARMmbed#102 from PelionIoT/add_ns_trace
72bc311b9b Moved ns_trace.h from nanostack-libservice
e060c630f3 Moved ns_trace.h from nanostack-libservice
ead8b30353 Merge pull request ARMmbed#101 from TeroJaasko/fix_use_after_free_bug_on_tr_array
8a06eff8ca tr_array: fix use after free error after mbed_trace_free() is called

git-subtree-dir: features/frameworks/mbed-trace
git-subtree-split: 425669d6b18046ab65d23d0e395b5a6a433be5bd
artokin added a commit to artokin/mbed-os that referenced this pull request Dec 2, 2021
…c343e4e2cc..ee958668e3

ee958668e3 Reorganize CMakeFiles based on target (ARMmbed#105)
2584ce4151 Merge pull request ARMmbed#104 from PelionIoT/cmake_add_interface_lib
0bdb64c4bf Update unit tests readme to not use "make check"
245f487472 Update the make command in run_unit_tests script
c297519298 Allow tests to be built by "make all" and remove "check" custom target
289cc6f657 Add test_all option
b66d49364e Added interface library
8e890fbbc6 Fix ns_nvm_helper unit tests (ARMmbed#103)
93fc3fe6b5 Merge pull request ARMmbed#102 from PelionIoT/add_test_readme
848585c8e1 Added readme to test folder
a7dc930933 Merge pull request ARMmbed#101 from PelionIoT/cmake_refactor
032bfecce8 Added UT CI support for GTest
9e8bda84b8 Removed test from make all. Now tests can be build with make check.
17d4bde2c8 Add CPP flags for unittest coverage
bec5b33544 Licence added
454140f974 Fix ut coverage
ca9e1e49f1 CMake improvements
9585b3d67a Fix compilation warnings from dynmem_test.cpp
4ef3fa12ba Remove CXX 11 requirement
a6d275db50 Add root directory to public include directories
2036a7431a Added CMake support + UT -> GTest

git-subtree-dir: connectivity/libraries/nanostack-libservice
git-subtree-split: ee958668e3e4b373ec4e2ee8425b7631fec2d80a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants