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

gnrc/tcp : Expose configurations to Kconfig #14126

Merged
merged 17 commits into from
Jun 3, 2020

Conversation

akshaim
Copy link
Member

@akshaim akshaim commented May 24, 2020

Contribution description

This PR exposes compile configurations in GNRC: TCP to Kconfig.

Testing procedure

  1. New documentation was built using Doxygen

The build works fine.

  1. Header and macro was introduced to tests/gnrc_tcp/
#include "net/gnrc/tcp/config.h"
#define STR(x)   #x
#define SHOW_DEFINE(x) printf("%s=%s\n", #x, STR(x))

The test file can be found here

Compiled binaries (BOARD=samr21-xpro) were uploaded to FIT IoT Test bed.

Default State:

Firmware Output

~~}!main(): This is RIOT! (Version: 2020.07-devel-737-g0b75d-Kconfig_tcp_tests)
~~}!CONFIG_GNRC_TCP_CONNECTION_TIMEOUT_DURATION=3000000
~~}!CONFIG_GNRC_TCP_MSL=1000000
~~}!CONFIG_GNRC_TCP_MSS_MULTIPLICATOR=(1U)
~~}!CONFIG_GNRC_TCP_RCV_BUFFERS=(1U)
~~}!CONFIG_GNRC_TCP_RTO_LOWER_BOUND=(1U * (1000000LU))
~~}!CONFIG_GNRC_TCP_RTO_UPPER_BOUND=(60U * (1000000LU))
~~}!CONFIG_GNRC_TCP_RTO_GRANULARITY=(10U * (1000LU))
~~}!CONFIG_GNRC_TCP_RTO_A_DIV=(8U)
~~}!CONFIG_GNRC_TCP_RTO_B_DIV=(4U)
~~}!CONFIG_GNRC_TCP_RTO_K=(4U)
~~}!CONFIG_GNRC_TCP_PROBE_LOWER_BOUND=(1U * (1000000LU))
~~}!CONFIG_GNRC_TCP_PROBE_UPPER_BOUND=(60U * (1000000LU))
~~}!RIOT GNRC_TCP test application

Usage with menuconfig [default values]

make menuconfig

Firmware Output

!main(): This is RIOT! (Version: 2020.07-devel-737-g82bda-Kconfig_tcp_tests)
~~}!CONFIG_GNRC_TCP_CONNECTION_TIMEOUT_DURATION=120000000
~~}!CONFIG_GNRC_TCP_MSL=30000000
~~}!CONFIG_GNRC_TCP_MSS_MULTIPLICATOR=1
~~}!CONFIG_GNRC_TCP_RCV_BUFFERS=1
~~}!CONFIG_GNRC_TCP_RTO_LOWER_BOUND=1000000
~~}!CONFIG_GNRC_TCP_RTO_UPPER_BOUND=60000000
~~}!CONFIG_GNRC_TCP_RTO_GRANULARITY=10000
~~}!CONFIG_GNRC_TCP_RTO_A_DIV=8
~~}!CONFIG_GNRC_TCP_RTO_B_DIV=4
~~}!CONFIG_GNRC_TCP_RTO_K=4
~~}!CONFIG_GNRC_TCP_PROBE_LOWER_BOUND=1000000
~~}!CONFIG_GNRC_TCP_PROBE_UPPER_BOUND=60000000
~~}!RIOT GNRC_TCP test application

Usage with menuconfig

make menuconfig

Firmware Output

!main(): This is RIOT! (Version: 2020.07-devel-737-g82bda-Kconfig_tcp_tests)
~~}!CONFIG_GNRC_TCP_CONNECTION_TIMEOUT_DURATION=110000000
~~}!CONFIG_GNRC_TCP_MSL=32000000
~~}!CONFIG_GNRC_TCP_MSS_MULTIPLICATOR=2
~~}!CONFIG_GNRC_TCP_RCV_BUFFERS=2
~~}!CONFIG_GNRC_TCP_RTO_LOWER_BOUND=1200000
~~}!CONFIG_GNRC_TCP_RTO_UPPER_BOUND=62000000
~~}!CONFIG_GNRC_TCP_RTO_GRANULARITY=20000
~~}!CONFIG_GNRC_TCP_RTO_A_DIV=4
~~}!CONFIG_GNRC_TCP_RTO_B_DIV=2
~~}!CONFIG_GNRC_TCP_RTO_K=2
~~}!CONFIG_GNRC_TCP_PROBE_LOWER_BOUND=1200000
~~}!CONFIG_GNRC_TCP_PROBE_UPPER_BOUND=50000000
~~}!RIOT GNRC_TCP test application

MACROS were successfully configured.

Issues/PRs references

#12888

@akshaim akshaim force-pushed the Kconfig_tcp branch 2 times, most recently from 2c8a0ae to 8269a26 Compare May 24, 2020 05:54
@benpicco benpicco added the Area: Kconfig Area: Kconfig integration label May 24, 2020
sys/include/net/gnrc/tcp/config.h Outdated Show resolved Hide resolved
sys/include/net/gnrc/tcp/config.h Outdated Show resolved Hide resolved
sys/include/net/gnrc/tcp/config.h Outdated Show resolved Hide resolved
sys/net/gnrc/transport_layer/tcp/gnrc_tcp.c Outdated Show resolved Hide resolved
@leandrolanzieri leandrolanzieri added Area: network Area: Networking Type: new feature The issue requests / The PR implemements a new feature for RIOT labels May 25, 2020
@miri64 miri64 requested a review from brummer-simon May 25, 2020 11:44
Copy link
Member

@brummer-simon brummer-simon left a comment

Choose a reason for hiding this comment

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

The changes did not break any existing tests (tested on "native" and "nucleo-f401re") and the custom configurations are propagated into the binary. From a technical point of view it works good, however there are some descriptions value descriptions that are a bit misleading.

If you fix those the PR is fine by me.

sys/include/net/gnrc/tcp/config.h Show resolved Hide resolved
sys/include/net/gnrc/tcp/config.h Show resolved Hide resolved
sys/include/net/gnrc/tcp/config.h Show resolved Hide resolved
sys/net/gnrc/transport_layer/tcp/Kconfig Show resolved Hide resolved
sys/net/gnrc/transport_layer/tcp/Kconfig Outdated Show resolved Hide resolved
sys/net/gnrc/transport_layer/tcp/Kconfig Outdated Show resolved Hide resolved
sys/net/gnrc/transport_layer/tcp/Kconfig Show resolved Hide resolved
Copy link
Member

@brummer-simon brummer-simon left a comment

Choose a reason for hiding this comment

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

I have some small change requests aside from that good work.

sys/include/net/gnrc/tcp/config.h Show resolved Hide resolved
sys/net/gnrc/transport_layer/tcp/Kconfig Show resolved Hide resolved
@akshaim
Copy link
Member Author

akshaim commented Jun 1, 2020

I have some small change requests aside from that good work.

Thank you for the comments. I have updated the file. Introduced a new symbol to make sure that the default configuration remains intact. Directly configuring the CONFIG_GNRC_TCP_DEFAULT_WINDOW via menuconfig does not have a dependency on GNRC_TCP_MSS_MULTIPLICATOR.

Copy link
Member

@brummer-simon brummer-simon left a comment

Choose a reason for hiding this comment

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

I have tested this PR on "native" and on "nucleo-f401re". The test suite works as expected an all configured values are present in the resulting binary. From my point of view, this PR can be merged, although I don't have the rights to do that.

@akshaim - Thanks for adding the Kconfig support.

@akshaim
Copy link
Member Author

akshaim commented Jun 2, 2020

I have tested this PR on "native" and on "nucleo-f401re". The test suite works as expected an all configured values are present in the resulting binary. From my point of view, this PR can be merged, although I don't have the rights to do that.

@akshaim - Thanks for adding the Kconfig support.

Thanks @brummer-simon for the review. @leandrolanzieri Should I squash now ?

@leandrolanzieri
Copy link
Contributor

I have tested this PR on "native" and on "nucleo-f401re". The test suite works as expected an all configured values are present in the resulting binary. From my point of view, this PR can be merged, although I don't have the rights to do that.
@akshaim - Thanks for adding the Kconfig support.

Thanks @brummer-simon for the review. @leandrolanzieri Should I squash now ?

Yes please

@akshaim
Copy link
Member Author

akshaim commented Jun 2, 2020

I have tested this PR on "native" and on "nucleo-f401re". The test suite works as expected an all configured values are present in the resulting binary. From my point of view, this PR can be merged, although I don't have the rights to do that.
@akshaim - Thanks for adding the Kconfig support.

Thanks @brummer-simon for the review. @leandrolanzieri Should I squash now ?

Yes please

Done. I have reordered the commit history, to make better sense of, but github displays commits by order of author date.

@leandrolanzieri leandrolanzieri added Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jun 2, 2020
Copy link
Contributor

@leandrolanzieri leandrolanzieri left a comment

Choose a reason for hiding this comment

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

Changes look good and @brummer-simon confirmed that this works properly. ACK.

@leandrolanzieri leandrolanzieri added Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines labels Jun 2, 2020
@leandrolanzieri leandrolanzieri added this to the Release 2020.07 milestone Jun 2, 2020
@leandrolanzieri leandrolanzieri merged commit 7262b1d into RIOT-OS:master Jun 3, 2020
@akshaim
Copy link
Member Author

akshaim commented Jun 3, 2020

Thanks @leandrolanzieri

@akshaim akshaim deleted the Kconfig_tcp branch June 3, 2020 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Kconfig Area: Kconfig integration Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines Type: new feature The issue requests / The PR implemements a new feature for RIOT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants