zephyr/subsys
Robert Lubos df152ab59f net: coap: Add initial tx time to coap_pending structure
So far, coap_pending structure kept track only of the timeout interval
between two consecutive retransmissions. Calculations inside
`coap_pending_next_to_expire` relied only on this value. This approach
gives incorrect results though, in case multiple messages are pending
for retransmission.

For instance, assuming initial retransmission timeout is set to 2
seconds. If some message had been retransmitted already, its timeout
would be increased to 4 seconds. Any new message added to the pending
list would have a retransmission timeout set to 2 seconds, and will be
returned as a first message to expire, no matter how long the initial
message was already on the list.

To resolve this, add a `t0` field to the coap_pending structure. This
field is initialized to the initial transmission time, and is increased
on each retransmission by the retransmission timeout.
`coap_pending_next_to_expire` uses this value to calculate absolute
time, when the next retransmission should take place, and based on this
information returns correctly first pending message to expire.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-04-28 09:50:45 +03:00
..
bluetooth Bluetooth: host: Include RPAs in enhanced conn complete logging 2020-04-27 19:02:48 +02:00
canbus net: buf: Move LEGACY_TIMEOUT_API selection to specific subsystems 2020-04-03 23:17:53 +03:00
console kernel/timeout: Make timeout arguments an opaque type 2020-03-31 19:40:47 -04:00
cpp kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
debug kconfig: Rename CONFIG_FLOAT to CONFIG_FPU 2020-04-27 19:03:44 +02:00
dfu global: Replace BUILD_ASSERT_MSG() with BUILD_ASSERT() 2020-03-31 07:18:06 +02:00
disk timeout: Fix up API usage 2020-03-31 19:40:47 -04:00
fb subsys/cfb: move MSB_FIRST down to font capabilities 2020-04-27 13:27:03 +02:00
fs nvs: fix return with held lock 2020-04-06 22:09:12 -04:00
jwt kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
logging soc: arm: replace DT_CPU_CLOCK_FREQUENCY with new dt macros 2020-04-23 23:55:37 -05:00
mgmt mgmt: smp: add UDP transport for SMP 2020-04-17 10:16:25 +03:00
net net: coap: Add initial tx time to coap_pending structure 2020-04-28 09:50:45 +03:00
power power: device: reduce space required to identify pm-capable devices 2020-04-27 15:36:48 +02:00
random drivers: entropy: replace CONFIG_ENTROPY_NAME with DT macro 2020-04-13 09:14:21 -05:00
settings settings: settings_register static table does not need mutex 2020-02-08 10:07:38 +02:00
shell shell: Refactor command getters 2020-04-23 18:30:41 +02:00
stats cleanup: include/: move stats.h to stats/stats.h 2019-06-27 22:55:49 -04:00
storage kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
testsuite timeout: Fix up API usage 2020-03-31 19:40:47 -04:00
tracing timeout: Fix up API usage 2020-03-31 19:40:47 -04:00
usb Bluetooth: hci_raw: Move buffer management to common place 2020-04-20 21:59:47 +03:00
CMakeLists.txt tracing: move tracing under subsys/ 2020-02-07 15:58:05 -05:00
Kconfig tracing: move tracing under subsys/ 2020-02-07 15:58:05 -05:00