pkg/tinydtls: allow to set buffer size from application again#19892
pkg/tinydtls: allow to set buffer size from application again#19892bors[bot] merged 3 commits intoRIOT-OS:masterfrom
Conversation
There was a problem hiding this comment.
This feels a bit hacky.
If applications currently don't (can't) set DTLS_MAX_BUF directly (and we didn't document that they should, so how would they even find out) we could instead add a variable:
ifneq (,$(filter gcoap,$(USEMODULE)))
DTLS_MAX_BUF ?= $(CONFIG_GCOAP_PDU_BUF_SIZE) + 36)
else
DTLS_MAX_BUF ?= 200
endif
CFLAGS += "-DDTLS_MAX_BUF=$(DTLS_MAX_BUF)"and document that applications can just set the DTLS_MAX_BUF variable (or maybe chose a different name to avoid confusion with the CFLAG).
P.S.: I think this should be set to CONFIG_NANOCOAP_BLOCKSIZE_DEFAULT when nanocoap_dtls is used.
5e95c9b to
0e8ae62
Compare
0e8ae62 to
d721630
Compare
5d58657 to
e65f1c4
Compare
|
bors merge |
19892: pkg/tinydtls: allow to set buffer size from application again r=leandrolanzieri a=leandrolanzieri ### Contribution description Currently the buffer size on tinydtls is set in its Makefile whenever `gcoap` module is present. This limits the ability of the user to override the value. This adds a pre-check of the `CFLAGS` to see if it was set before. ### Testing procedure Try setting `CFLAGS += -DDTLS_MAX_BUF=<some_value>` on `examples/gcoap_dtls`, you should be able to override the default value without errors. ### Issues/PRs references Reported in #19838 Co-authored-by: Leandro Lanzieri <[email protected]>
|
Build failed: |
|
bors merge |
19886: cpu/efm32: fix DAC configuration r=benpicco a=gschorcht ### Contribution description The EFM32 MCU allows the reference voltage to be configured per DAC device, not per DAC channel. Also, the DAC reference voltage was defined in the configuration but not used anywhere. At the moment we have only defined one board (`stwstk6220a`) that uses the DAC, so changing the configuration interface shouldn't be critical. ### Testing procedure `tests/periph/dac` should still work for the `stwstk6220a` ``` BOARD=slwstk6220a make -j8 -C tests/periph/dac flash ``` I don't have a `stwstk6220a` board (EFM32 Series 0) so that I can't test it. I could only test it for the `sltb009a` board (EFM32 Series 1) with the change for VDAC in PR #19887. ### Issues/PRs references 19892: pkg/tinydtls: allow to set buffer size from application again r=benpicco a=leandrolanzieri ### Contribution description Currently the buffer size on tinydtls is set in its Makefile whenever `gcoap` module is present. This limits the ability of the user to override the value. This adds a pre-check of the `CFLAGS` to see if it was set before. ### Testing procedure Try setting `CFLAGS += -DDTLS_MAX_BUF=<some_value>` on `examples/gcoap_dtls`, you should be able to override the default value without errors. ### Issues/PRs references Reported in #19838 Co-authored-by: Gunar Schorcht <[email protected]> Co-authored-by: Leandro Lanzieri <[email protected]>
|
Build failed (retrying...): |
19892: pkg/tinydtls: allow to set buffer size from application again r=benpicco a=leandrolanzieri ### Contribution description Currently the buffer size on tinydtls is set in its Makefile whenever `gcoap` module is present. This limits the ability of the user to override the value. This adds a pre-check of the `CFLAGS` to see if it was set before. ### Testing procedure Try setting `CFLAGS += -DDTLS_MAX_BUF=<some_value>` on `examples/gcoap_dtls`, you should be able to override the default value without errors. ### Issues/PRs references Reported in #19838 Co-authored-by: Leandro Lanzieri <[email protected]>
|
Build failed: |
|
bors merge |
|
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. If you want to switch to GitHub's built-in merge queue, visit their help page. |
|
arg, this breaks |
| @@ -0,0 +1,4 @@ | |||
| ifneq (,$(filter nanocoap_dtls,$(USEMODULE))) | |||
| CONFIG_NANOCOAP_BLOCKSIZE_DEFAULT := $(or $(CONFIG_NANOCOAP_BLOCKSIZE_DEFAULT),2) | |||
| DTLS_MAX_BUF ?= ((1 << ($(CONFIG_NANOCOAP_BLOCKSIZE_DEFAULT) + 3)) + 36) | |||
There was a problem hiding this comment.
The handshake buffer size does not depend on the block size
Contribution description
Currently the buffer size on tinydtls is set in its Makefile whenever
gcoapmodule is present. This limits the ability of the user to override the value. This adds a pre-check of theCFLAGSto see if it was set before.Testing procedure
Try setting
CFLAGS += -DDTLS_MAX_BUF=<some_value>DTLS_MAX_BUF=<some_value>onexamples/gcoap_dtls, you should be able to override the default value without errors.Issues/PRs references
Reported in #19838