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

nanocoap: implement extended tokens (RFC 8974) #19487

Merged
merged 2 commits into from
Jul 7, 2023

Conversation

benpicco
Copy link
Contributor

Contribution description

RFC8974 allows for token length of up to 65804 Byte in order to store Client state in the token.

This is easy to implement in nanoCoAP, so let's give it a try.

Testing procedure

Currently no use case is associated with this, but I extended the unit test.
Maybe we should only enable this when a pseudo-module nanocoap_token_ext is used.

Issues/PRs references

@benpicco benpicco requested a review from chrysn April 19, 2023 16:05
@github-actions github-actions bot added Area: CoAP Area: Constrained Application Protocol implementations Area: network Area: Networking Area: sys Area: System Area: tests Area: tests and testing framework labels Apr 19, 2023
Copy link
Contributor

@Teufelchen1 Teufelchen1 left a comment

Choose a reason for hiding this comment

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

💪

sys/include/net/nanocoap.h Outdated Show resolved Hide resolved
sys/include/net/nanocoap.h Show resolved Hide resolved
sys/net/application_layer/nanocoap/nanocoap.c Outdated Show resolved Hide resolved
sys/include/net/nanocoap.h Show resolved Hide resolved
sys/net/application_layer/nanocoap/nanocoap.c Outdated Show resolved Hide resolved
tests/unittests/tests-nanocoap/tests-nanocoap.c Outdated Show resolved Hide resolved
@chrysn
Copy link
Member

chrysn commented Apr 27, 2023 via email

@benpicco
Copy link
Contributor Author

As this would needlessly add 348 bytes of ROM even when not used, I hid it behind a nanocoap_token_ext pseudo-module that can be enabled by applications that need it.

@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Apr 27, 2023
@riot-ci
Copy link

riot-ci commented Apr 27, 2023

Murdock results

✔️ PASSED

c01c470 tests/unittests: nanocoap: add test for extended token

Success Failures Total Runtime
6933 0 6933 12m:16s

Artifacts

@benpicco
Copy link
Contributor Author

benpicco commented Jul 7, 2023

bors merge

bors bot added a commit that referenced this pull request Jul 7, 2023
19487: nanocoap: implement extended tokens (RFC 8974) r=benpicco a=benpicco



19781: cpu/nrf{53,9160}: add pwm support r=benpicco a=dylad

### Contribution description

This PR moves the nRF52 PWM driver to `cpu/nrf5x_common` to allow nRF9160 and nRF53 to use this driver.
IP is identical on these families.

I didn't test on nRF9160DK and I didn't test if there is any regression on nRF52-based board as I don't have any so tests are welcome !
However it works fine on nRF53-based board.


### Testing procedure

Flash the `tests/periph/pwm` test application on `nrf5340dk` or `nrf9160dk`.
You can then use the `osci` command to make the onboard LEDs "breath".
You can also attach an oscilloscope and/or logic analyzer to watch the signal.


### Issues/PRs references
~~Based on #19769~~

Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
@bors
Copy link
Contributor

bors bot commented Jul 7, 2023

Build failed (retrying...):

@bors
Copy link
Contributor

bors bot commented Jul 7, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 72ca81b into RIOT-OS:master Jul 7, 2023
@benpicco benpicco deleted the nanocoap_token_ext branch July 7, 2023 23:42
@benpicco benpicco added this to the Release 2023.07 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: CoAP Area: Constrained Application Protocol implementations Area: network Area: Networking Area: sys Area: System Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants