-
Notifications
You must be signed in to change notification settings - Fork 3k
LWIP PBUF_POOL_BUFSIZE increased to fit also IPv6 header #6139
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
LWIP PBUF_POOL_BUFSIZE increased to fit also IPv6 header #6139
Conversation
@kjbracey-arm, @mikaleppanen, please review |
That's lwip core code - I'd rather we didn't mess with it locally. So should we pull the equivalent logic into our lwipopts.h - effectively take over and not rely on its default? As this stands it would make sense as a patch to submit to lwIP though... |
@kjbracey-arm , @mikaleppanen, changes moved outside LWIP. Lets look for that upstreaming later. |
IPv6 header requires 20 more bytes compared to IPv4 header.
@@ -150,6 +150,12 @@ | |||
#ifdef MBED_CONF_LWIP_PBUF_POOL_BUFSIZE | |||
#undef PBUF_POOL_BUFSIZE |
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 undef wants to come out of the ifdef, as you're now explicitly setting it in all cases.
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.
A fix provided. I think I grasped what you were looking for here. Each driver needs to be able to set the PBUF_POOL_BUFSIZE explicitly. In the same manner as PBUF_POOL_SIZE is set.
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.
Ah, that wasn't actually what I meant, but you're right, that's consistent.
@@ -150,6 +150,12 @@ | |||
#ifdef MBED_CONF_LWIP_PBUF_POOL_BUFSIZE | |||
#undef PBUF_POOL_BUFSIZE | |||
#define PBUF_POOL_BUFSIZE MBED_CONF_LWIP_PBUF_POOL_BUFSIZE | |||
#else |
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.
Could also use #elif
here. Not sure if it's better or worse, but consider it.
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.
Duly noted.
The test case is executed succesfully when usage of wrong channel is detected
/morph build |
Build : SUCCESSBuild number : 1193 Triggering tests/morph test |
@@ -150,6 +150,12 @@ | |||
#ifdef MBED_CONF_LWIP_PBUF_POOL_BUFSIZE | |||
#undef PBUF_POOL_BUFSIZE |
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.
Ah, that wasn't actually what I meant, but you're right, that's consistent.
/morph uvisor-test |
Test : SUCCESSBuild number : 996 |
Exporter Build : SUCCESSBuild number : 867 |
IPv6 header requires 20 more bytes compared to IPv4 header.
Description
To avoid using multiple buffers increase LWIP PBUF_POOL_BUFSIZE. This change increases the default size(IPv4) by 20 bytes required by IPv6 header.
Fixed a Greentea test case WIFI-CONNECT-PARAMS-CHANNEL-FAIL on the side. To make the test case to succeed invalid channel number must be used instead of valid one.
Status
READY
Migrations
If this PR changes any APIs or behaviors, give a short description of what API users should do when this PR is merged.
NO
Related PRs
List related PRs against other branches:
Todos
Deploy notes
Notes regarding the deployment of this PR. These should note any required changes in the build environment, tools, compilers and so on.
Steps to test or reproduce
Outline the steps to test or reproduce the PR here.