Skip to content

gnrc/gomach : Expose configurations to Kconfig#14104

Merged
leandrolanzieri merged 19 commits intoRIOT-OS:masterfrom
akshaim:Kconfig_gomach
Jun 19, 2020
Merged

gnrc/gomach : Expose configurations to Kconfig#14104
leandrolanzieri merged 19 commits intoRIOT-OS:masterfrom
akshaim:Kconfig_gomach

Conversation

@akshaim
Copy link
Copy Markdown
Member

@akshaim akshaim commented May 20, 2020

Contribution description

This PR exposes compile configurations in GNRC:GOMACH, to Kconfig.

Testing procedure

  1. New documentation was built using doxygen

The build works fine.

  1. Header and macro was introduced to tests/gnrc_gomach/

#include "net/gnrc/gomach/gomach.h"

#define STR(x)   #x
#define SHOW_DEFINE(x) printf("%s=%s\n", #x, STR(x))


Test files can be found here .
Compiled binaries were uploaded to FIT IoT Test bed.

Default State:

Firmware Output

main(): This is RIOT! (Version: 2020.07-devel-638-g333c5-Kconfig_gomach_tests)
CONFIG_GNRC_GOMACH_CP_DURATION_US=(10U * (1000LU))
CONFIG_GNRC_GOMACH_SUPERFRAME_DURATION_US=(300LU * (1000LU))
CONFIG_GNRC_GOMACH_CP_RANDOM_END_US=(1U * (1000LU))
CONFIG_GNRC_GOMACH_CP_MIN_GAP_US=(25U * (1000LU))
CONFIG_GNRC_GOMACH_WAIT_RX_END_US=(6U * (1000LU))
CONFIG_GNRC_GOMACH_NO_TX_ISR_US=(50U * (1000LU))
CONFIG_GNRC_GOMACH_MAX_PREAM_INTERVAL_US=(6U * (1000LU))
CONFIG_GNRC_GOMACH_PREAMBLE_INTERVAL_US=(2U * (1000LU))
CONFIG_GNRC_GOMACH_BCAST_INTERVAL_US=(1U * (1000LU))
CONFIG_GNRC_GOMACH_VTDMA_SLOT_SIZE_US=(5U * (1000LU))
CONFIG_GNRC_GOMACH_TX_BUSY_THRESHOLD=(5U)
CONFIG_GNRC_GOMACH_CP_EXTEND_THRESHOLD=(5U)
CONFIG_GNRC_GOMACH_RX_DUPCHK_UNIT_LIFE=(30U)
CONFIG_GNRC_GOMACH_MAX_ALLOC_SENDER_NUM=(11U)
CONFIG_GNRC_GOMACH_REPHASELOCK_THRESHOLD=(4U)
CONFIG_GNRC_GOMACH_T2U_RETYR_THRESHOLD=(2U)
CONFIG_GNRC_GOMACH_MAX_T2U_RETYR_THRESHOLD=(10U)

Usage with menuconfig [default values]

make menuconfig

Firmware Output

main(): This is RIOT! (Version: 2020.07-devel-638-g333c5-Kconfig_gomach_tests)
CONFIG_GNRC_GOMACH_CP_DURATION_US=10000
CONFIG_GNRC_GOMACH_SUPERFRAME_DURATION_US=300000
CONFIG_GNRC_GOMACH_CP_RANDOM_END_US=1000
CONFIG_GNRC_GOMACH_CP_MIN_GAP_US=25000
CONFIG_GNRC_GOMACH_WAIT_RX_END_US=6000
CONFIG_GNRC_GOMACH_NO_TX_ISR_US=50000
CONFIG_GNRC_GOMACH_MAX_PREAM_INTERVAL_US=6000
CONFIG_GNRC_GOMACH_PREAMBLE_INTERVAL_US=2000
CONFIG_GNRC_GOMACH_BCAST_INTERVAL_US=1000
CONFIG_GNRC_GOMACH_VTDMA_SLOT_SIZE_US=5000
CONFIG_GNRC_GOMACH_TX_BUSY_THRESHOLD=5
CONFIG_GNRC_GOMACH_CP_EXTEND_THRESHOLD=5
CONFIG_GNRC_GOMACH_RX_DUPCHK_UNIT_LIFE=30
CONFIG_GNRC_GOMACH_MAX_ALLOC_SENDER_NUM=11
CONFIG_GNRC_GOMACH_REPHASELOCK_THRESHOLD=4
CONFIG_GNRC_GOMACH_T2U_RETYR_THRESHOLD=2
CONFIG_GNRC_GOMACH_MAX_T2U_RETYR_THRESHOLD=10

Usage with menuconfig

make menuconfig

Firmware Output

main(): This is RIOT! (Version: 2020.07-devel-638-g333c5-Kconfig_gomach_tests)
CONFIG_GNRC_GOMACH_CP_DURATION_US=20000
CONFIG_GNRC_GOMACH_SUPERFRAME_DURATION_US=350000
CONFIG_GNRC_GOMACH_CP_RANDOM_END_US=2000
CONFIG_GNRC_GOMACH_CP_MIN_GAP_US=55000
CONFIG_GNRC_GOMACH_WAIT_RX_END_US=5000
CONFIG_GNRC_GOMACH_NO_TX_ISR_US=30000
CONFIG_GNRC_GOMACH_MAX_PREAM_INTERVAL_US=6005
CONFIG_GNRC_GOMACH_PREAMBLE_INTERVAL_US=2005
CONFIG_GNRC_GOMACH_BCAST_INTERVAL_US=1001
CONFIG_GNRC_GOMACH_VTDMA_SLOT_SIZE_US=5000
CONFIG_GNRC_GOMACH_TX_BUSY_THRESHOLD=6
CONFIG_GNRC_GOMACH_CP_EXTEND_THRESHOLD=6
CONFIG_GNRC_GOMACH_RX_DUPCHK_UNIT_LIFE=35
CONFIG_GNRC_GOMACH_MAX_ALLOC_SENDER_NUM=12
CONFIG_GNRC_GOMACH_REPHASELOCK_THRESHOLD=6
CONFIG_GNRC_GOMACH_T2U_RETYR_THRESHOLD=1
CONFIG_GNRC_GOMACH_MAX_T2U_RETYR_THRESHOLD=11

MACROS were successfully configured.

Issues/PRs references

#12888
Merge this only after merging #14086

@leandrolanzieri leandrolanzieri added Area: Kconfig Area: Kconfig integration Area: network Area: Networking Type: new feature The issue requests / The PR implemements a new feature for RIOT labels May 20, 2020
Copy link
Copy Markdown
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.

I think that the 80 chars limit is a warning and the absolute is 100. Maybe use 100 for some place where readability is not that great with this changes.

@akshaim
Copy link
Copy Markdown
Member Author

akshaim commented Jun 17, 2020

Rebased to solve merge conflicts.

Copy link
Copy Markdown
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.

Just a nitpick. Please squash.

Add configurations to compile time configurations.

Co-authored-by: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
@akshaim
Copy link
Copy Markdown
Member Author

akshaim commented Jun 18, 2020

@leandrolanzieri Done.
BTW do you think I should make GNRC_GOMACH_PREAMBLE_DURATION_US configurable via Kconfig ?

@leandrolanzieri leandrolanzieri added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jun 19, 2020
@leandrolanzieri
Copy link
Copy Markdown
Contributor

@leandrolanzieri Done.
BTW do you think I should make GNRC_GOMACH_PREAMBLE_DURATION_US configurable via Kconfig ?

No, let's keep it like that.

Copy link
Copy Markdown
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. ACK.

@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 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 19, 2020
@leandrolanzieri leandrolanzieri added this to the Release 2020.07 milestone Jun 19, 2020
@leandrolanzieri leandrolanzieri merged commit 366ec36 into RIOT-OS:master Jun 19, 2020
@akshaim
Copy link
Copy Markdown
Member Author

akshaim commented Jun 19, 2020

Changes look good. ACK.

Thank you for the review.

@akshaim akshaim deleted the Kconfig_gomach branch June 19, 2020 09:29
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.

2 participants