Skip to content

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

Merged
merged 3 commits into from
Feb 21, 2018
Merged

LWIP PBUF_POOL_BUFSIZE increased to fit also IPv6 header #6139

merged 3 commits into from
Feb 21, 2018

Conversation

VeijoPesonen
Copy link
Contributor

@VeijoPesonen VeijoPesonen commented Feb 20, 2018

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:

branch PR

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.

@VeijoPesonen
Copy link
Contributor Author

@kjbracey-arm, @mikaleppanen, please review

@kjbracey
Copy link
Contributor

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...

@VeijoPesonen
Copy link
Contributor Author

@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
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Duly noted.

Veijo Pesonen added 2 commits February 20, 2018 16:09
@0xc0170
Copy link
Contributor

0xc0170 commented Feb 21, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Feb 21, 2018

Build : SUCCESS

Build number : 1193
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6139/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@@ -150,6 +150,12 @@
#ifdef MBED_CONF_LWIP_PBUF_POOL_BUFSIZE
#undef PBUF_POOL_BUFSIZE
Copy link
Contributor

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.

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 21, 2018

/morph uvisor-test

@mbed-ci
Copy link

mbed-ci commented Feb 21, 2018

@mbed-ci
Copy link

mbed-ci commented Feb 21, 2018

@0xc0170 0xc0170 merged commit 5c7cd1f into ARMmbed:master Feb 21, 2018
@VeijoPesonen VeijoPesonen deleted the eth_n_wifi-drv_n_tc_fixes branch February 22, 2018 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants