-
Notifications
You must be signed in to change notification settings - Fork 2k
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
net/coap: Expose configurations to Kconfig #13227
net/coap: Expose configurations to Kconfig #13227
Conversation
4f5089a
to
04f3e9a
Compare
04f3e9a
to
02ac496
Compare
Rebased to resolve conflicts. |
02ac496
to
f912723
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't include a
range
constraint onCOAP_ACK_TIMEOUT
andCOAP_RANDOM_FACTOR_1000
yet 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doxygen @ref
do not work with kconfig, maybe simply omit them in the help here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #13916
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving a note that this is being addressed in #13916
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #13916
Didn't see that 😄
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack
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
range
constraint onCOAP_ACK_TIMEOUT
andCOAP_RANDOM_FACTOR_1000
yet 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_TIMEOUT
would be 1)(So the minimum for
COAP_RANDOM_FACTOR_1000
would 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, theTODO
in 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