-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Renesas : Improve LWIP speed #7683
Conversation
For speeding up of LWIP in RZ/A1, I added four new config processes in mbed_lib.json and lwipopts.h, overriden those values. Since RZ/A1 incorporates a large memory, can actualize speeding up by running with the override value. Also those new config processes will be helpful for more customize.
@mikaleppanen Please review |
@@ -139,6 +139,26 @@ | |||
|
|||
#define LWIP_RAM_HEAP_POINTER lwip_ram_heap | |||
|
|||
// Number of simultaneously queued TCP segments. | |||
#ifdef MBED_CONF_LWIP_MEMP_NUM_TCP_SEG |
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.
Why #ifdef
If we use Mbed compilation, these values always come from mbed_lib.json
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 think that there is no setting process in mbed_lib.json
. However I'd like to set the customized value when coming from the mbed_lib.json
and set the default value when not coming. Thus, I added #ifdef
process to this file as with other elements.
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.
This is consistent with other settings - basically not setting it in the JSON lets lwIP do its own default, which sometimes is not a simple constant we could express in the JSON.
Or could we - I guess you could define something as "5 * TCP_MSS"
. Maybe we could put all lwIP's defaults in as explicit JSON? I think it was only really those derived values that put us off doing that.
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.
@kjbracey-arm
Thank you for your comments, and may I ask you a bit?
What does "5 * TCP_MSS"
indicate? is it related with the value of "tcp-snd-buf" and "tcp-wnd" ?
If so, I defined them as "8 * TCP_MSS"
(is customize value for RZ/A1) in json file.
@@ -72,6 +72,22 @@ | |||
"help": "Maximum number of open UDPSocket instances allowed, including one used internally for DNS. Each requires 84 bytes of pre-allocated RAM", | |||
"value": 4 | |||
}, | |||
"memp-num-tcp-seg": { | |||
"help": "Number of simultaneously queued TCP segments. Current default (used if null here) is set to 16 in opt.h, unless overridden by target Ethernet drivers.", | |||
"value": null |
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.
Maybe we could use default values here, instead of null
to get rid of #ifdef
in lwipopts.h
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'd like to use the customized value(32) not default value(16) against this element for speeding up of RZ/A1. Thus by setting this element as null and overriding the value for RZ/A1 at following process, the other boards excepting RZ/A1 use default value and RZ/A1 use customized value.
features/lwipstack/mbed_lib.json
Outdated
@@ -132,6 +148,11 @@ | |||
"tcpip-thread-stacksize": 1328, | |||
"default-thread-stacksize": 640, | |||
"ppp-thread-stacksize": 896, | |||
"memp-num-tcp-seg": 32, | |||
"tcp-mss": 1460, |
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.
Should this be at max 1440 to make space for ipv6 header which fixed size is 40 bytes.
@mikaleppanen Thank you for your suggestion. I updated the override value. |
@mikaleppanen Any additional step required to this PR? |
@SeppoTakalo @kjbracey-arm Any additional required step ? Could you approval if no problem ? |
@SeppoTakalo @mikaleppanen @0xc0170 |
@0xc0170 or Someone of @ARMmbed/mbed-os-ipcore |
@SeppoTakalo @mikaleppanen @kjbracey-arm |
/morph build |
@TomoYamanaka In CI now. One question while you mentioned more active, there's one bug I've checked today: #6975. Can you please review it |
Build : SUCCESSBuild number : 2925 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 2545 |
Test : FAILUREBuild number : 2676 |
/morph test |
Test : SUCCESSBuild number : 2685 |
@AnotherButler Do these config additions also need docs to go with them? |
@cmonr Yes, the storage config page needs to be updated with the additions: If general, #ifdefs should be converted to use the config system, but it sounds like there are reasons I don't really understand why we're not doing that here. |
As I understand, we use config here but need to translate the values to the lwip macros thus ifdef in this PR. @SeppoTakalo Please correct me if wrong. Can you send the PR for updating the connectivity page? |
@ARMmbed/mbed-os-ipcore Can you review please again? |
Description
For speeding up of LWIP on RZ/A1, I added four new config processes in
mbed_lib.json
andlwipopts.h
, overriden the values.Since RZ/A1 incorporates a large-capacity memory, can actualize speeding up by running with the overriden value.
Pull request type