-
Notifications
You must be signed in to change notification settings - Fork 423
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
RFC 9177: Add in Q-Block support #611
Conversation
5f3dcdd
to
4c8724a
Compare
ccea6a3
to
c1b26e6
Compare
a299b31
to
9a107d4
Compare
cc3fba8
to
94c0c0d
Compare
dfdf33f
to
6c36084
Compare
9cb00b2
to
b5d02c1
Compare
3eaf1bd
to
de8bd4d
Compare
daec8e9
to
cd1e06f
Compare
adebcb7
to
edb5501
Compare
628cba0
to
8bdd77e
Compare
5b4b413
to
d098bcf
Compare
dfa5550
to
1b59514
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 did a first quick review, and this looks good to me. There is a bit of garbled whitespace that could be cleaned up later. Also, there are some changes that do not directly relate to this PR but I think it would be too difficult to strip them out at this stage.
src/block.c
Outdated
coap_delete_pdu(session->saved_pdu); | ||
session->saved_pdu = actual; | ||
return coap_send_internal(session, pdu); | ||
if ((mid = coap_send_internal(session, pdu)) == COAP_INVALID_MID) |
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.
This looks much cleaner now. I suggest the following to make the code a bit more readable (as done in other parts):
mid = coap_send_internal(....);
if (mid != COAP_INVALID_MID) {
session->remote_test_mid = mid;
}
return mid;
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.
Updated with suggestion
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.
Better. But now it reads:
if (x)
return x;
do_y();
return x;
Which looks a bit weird. But feel free to keep it this way since it is neither wrong nor overly complex.
examples/coap-client.c: examples/coap-server.c: Add in Q-Block intelligence. include/coap3/block.h include/coap3/coap_block_internal.h include/coap3/coap_event.h Add in Q-Block references. Add in new functions coap_block_check_q_block1_xmit() coap_block_check_q_block2_xmit() coap_send_q_blocks() coap_send_q_block1() coap_send_q_block2() coap_block_drop_resp_q_block_xmit() coap_block_drop_resp_q_block2_crcv() coap_q_block_is_supported() include/coap3/coap_session.h: Add in new Congestion Control defaults and ability to configure them. include/coap3/pdu.h: Add in the new options. libcoap-3.map: libcoap-3.sym: Expose external Congestion Control functions. man/coap-client.txt.in: man/coap-server.txt.in: man/coap_block.txt.in: man/coap_handler.txt.in: man/coap_recovery.txt.in: man/coap.txt.in: Add in Q-Block information. src/block.c: Add in the new functions to support Q-Block. src/coap_debug.c: Output the new options as appropriate. src/coap_io.c: Check for Q-Block transmission timeouts. src/coap_session.c: Add in the Congestion Control support. src/net.c: src/resource.c: Add in Q-Block support. configure.ac CMakeLists.txt Add in support for enabling/disabling Q-Block support (enabled by default).
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.
LGTM
Thanks for doing the review. |
examples/client.c:
examples/coap-server.c:
Add in Q-Block intelligence.
include/coap2/block.h
include/coap2/coap_block_internal.h
include/coap2/coap_event.h
Add in Q-Block references.
Add in new functions
coap_block_check_q_block1_xmit()
coap_block_check_q_block2_xmit()
coap_send_q_blocks()
coap_send_q_block1()
coap_send_q_block2()
coap_block_drop_resp_q_block_xmit()
coap_block_drop_resp_q_block2_crcv()
include/coap2/coap_session.h:
Add in new Congestion Control defaults and ability to configure them.
include/coap2/coap_subscribe_internal.h:
include/coap2/resource.h:
Support Q-Block2 as well for subscriptions.
include/coap2/pdu.h:
Add in the new options.
libcoap-2.map:
libcoap-2.sym:
Expose external Congestion Control functions.
man/coap-client.txt.in:
man/coap-server.txt.in:
man/coap_block.txt.in:
man/coap_handler.txt.in:
Add in Q-Block information.
src/block.c:
Add in the new functions to support Q-Block.
src/coap_debug.c:
Output the new options as appropriate.
src/coap_io.c:
Check for Q-Block transmission timeouts.
src/coap_session.c:
Add in the Congestion Control support.
src/net.c:
src/pdu.c:
src/resource.c:
Add in Q-Block support.