-
Notifications
You must be signed in to change notification settings - Fork 2.1k
lwip_sock: provide implementation for sock_*_recv_buf()
#13701
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
54aefea
to
1870f3e
Compare
If this can be reviewed now, just squash - there hasn't been a review yet. |
I'm not really familiar with lwip but I compared this PR with how sock_udp_recv_buf is implemented and used in gnrc and overall it looks good to me. For testing, I ran the command described in the testing procedure above and all tests completed successfully. I'm not sure how to tests using fragmented packets. Do you have an extra application written for that @miri64? Sorry, I cannot add much to the review but I can help tests it locally to confirm that it is working. |
78f11e0
to
53b5f37
Compare
Squashed |
No, not really. However, |
Can this be tested entirely on |
Yepp, the automated version of |
I reckon |
No.
As I wrote: use |
I adapted diff --git a/tests/lwip/common.h b/tests/lwip/common.h
index 4cea2573df..6d0778a6f6 100644
--- a/tests/lwip/common.h
+++ b/tests/lwip/common.h
@@ -29,7 +29,7 @@ extern "C" {
* @brief Application configuration
* @{
*/
-#define SOCK_INBUF_SIZE (256)
+#define SOCK_INBUF_SIZE (1500)
#define SERVER_MSG_QUEUE_SIZE (8)
#define SERVER_BUFFER_SIZE (64)
/** Then I started 3 terminals: Terminal 1 (
|
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.
I ran the automated tests from the PR description, the manual one from the previous comment, and some manual UDP traffic between Linux and RIOT via netcat. I wasn't able to break it. Code also looks good to me. Lets retrigger Murdock.
Contribution description
This provides an implementation for lwIP of the zero-copy receive functions (see #13616). As the implementation of sock_*_recv() now uses those functions, I only adapted the tests minimally to test the success case to acknowledge the function is there.
I am not 100% sure it is okay, not to loop over the netbuf in
sock_udp
(forsock_ip
I did not), but testing will tell.Testing procedure
Should still pass (only
LWIP_IPV6=1
is tested by the CI):Also please, please, please test with (IP) fragmented packets (so larger than MTU) for
sock_udp
withtests/lwip
. I did not have any time to test that right now, but we really should, as I removed a copying loop and replaced it just with a pointer assignment (see #13701 (comment) for procedure).Issues/PRs references
Follow-up to #13616.
Requires
#13779(merged).