net/coap: Expose configurations to Kconfig#13227
Conversation
4f5089a to
04f3e9a
Compare
04f3e9a to
02ac496
Compare
|
Rebased to resolve conflicts. |
02ac496 to
f912723
Compare
miri64
left a comment
There was a problem hiding this comment.
I didn't include a
rangeconstraint onCOAP_ACK_TIMEOUTandCOAP_RANDOM_FACTOR_1000yet as I am not sure which would be a valid maximum. […]
Maybe @kb2ma can help here?
Also, I made use of a 'feature' symbol (
HAS_PROTOCOL_COAP) which indicates in a generic way that there is a module that provides this, as this options are generic. When nanocoap has its own Kconfig file then it should be selected from there.
Not really sure what you mean by that? Does this mean that nanocoap and gcoap would become mutually exclusive? oO
No, this does not do that. It just indicates that there is CoAP implementation using this options. The reasoning was, that these options are defined 'generic CoAP options' for RIOT, so I did not want to make them depend on |
Sorry, no recommendation for max values. I have not had occasion to change them myself. |
|
Please rebase! |
f912723 to
a03c9c1
Compare
|
Rebased and removed the |
| @ref CONFIG_COAP_ACK_TIMEOUT and | ||
| (@ref CONFIG_COAP_ACK_TIMEOUT * @ref CONFIG_COAP_RANDOM_FACTOR_1000 / 1000). |
There was a problem hiding this comment.
The doxygen @ref do not work with kconfig, maybe simply omit them in the help here.
There was a problem hiding this comment.
I know Kconfig files are not generating documentation yet, but I plan to do so in the future. So this is just so we don't lose track of references that are currently on the docs.
There was a problem hiding this comment.
Is there a way to add the marker so that it doesn't show up in the kconfig help?
There was a problem hiding this comment.
Leaving a note that this is being addressed in #13916
|
Does it make sense to add a note to the help descriptions that the default values are copied from the RFC? |
Yes. I added a reference to https://tools.ietf.org/html/rfc7252#section-4.8 now. |
|
Please Squash |
COAP_ACK_TIMEOUT is moved to the compile time configuration macro namespace.
COAP_RANDOM_FACTOR_1000 is moved to the compile time configuration macro namespace.
COAP_MAX_RETRANSMIT is moved to the compile time configuration macro namespace.
58232ee to
eeea9b7
Compare
Squashed |
|
Thanks for reviewing ! |
Contribution description
This moves the configuration macros for our generic CoAP options to the
CONFIG_namespace, and exposes them to Kconfig.I didn't include a
rangeconstraint onCOAP_ACK_TIMEOUTandCOAP_RANDOM_FACTOR_1000yet as I am not sure which would be a valid maximum. According to RFC 7252, section 4.8.1:(So the minimum for
COAP_ACK_TIMEOUTwould be 1)(So the minimum for
COAP_RANDOM_FACTOR_1000would be 1000)Also, I made use of a 'feature' symbol (
HAS_PROTOCOL_COAP) which indicates in a generic way that there is a module that provides this, as this options are generic.When nanocoap has its own Kconfig file then it should be selected from there.Edit: If #13243 is merged first, theTODOin the Kconfig file should be removed.Testing procedure
examples/gcoap. By default everything should still work the same.Issues/PRs references
Part of #12888
Related to #13243