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

cpu/cc2538: Wait for transmission to complete before returning from send() #5915

Merged
merged 1 commit into from
Oct 10, 2016

Conversation

aeneby
Copy link
Member

@aeneby aeneby commented Oct 6, 2016

It seems that the cc2538 is capable of sending frames faster than some other radios are capable of processing them, resulting in high levels of packet loss when fragmentation is used. This PR introduces a non-blocking wait for transmission of each frame to complete before beginning construction of the next, which seems to slow things down enough to be compatible with other radios.

I would like the reviewer to please consider whether a non-blocking wait is most appropriate here, or whether we should use a blocking wait instead. Since #5803 has been merged I believe a non-blocking wait should be okay, since it will only yield to threads with higher priority, and the cc2538_rf thread should now have higher priority than the network-layer threads. Before #5803, this non-blocking wait would have yielded to the 6lo thread during sending of large multi-fragment packets, allowing 6lo to fill and overflow the message queue before cc2538_rf had a chance to process them (since it is waiting).

Fixes(?) #5786 and #5719

@PeterKietzmann PeterKietzmann added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: drivers Area: Device drivers labels Oct 7, 2016
@PeterKietzmann PeterKietzmann added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Oct 7, 2016
Copy link
Member

@smlng smlng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified by testing! Solves the issues as described, ACK and GO

@smlng smlng merged commit be38643 into RIOT-OS:master Oct 10, 2016
@aeneby aeneby deleted the send_wait_v2 branch October 11, 2016 09:00
@miri64 miri64 added this to the Release 2016.10 milestone Oct 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants