Skip to content

Complete 'continuous' Online Check Mode Implementation.

Grant Erickson connman 3 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest60 patches 1 replyIn review
  2. v260 patches 0 repliesSuperseded
  3. v160 patches 0 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/60service: Change return type of '__connman_service_wispr_start'.src/connman.h src/service.c+10 -20 replies
2/60service: Sanity check the 'type' param in '__connman_service_wispr_start'.src/service.c+9 -10 replies
3/60service: Rename 'online_check_enabled_check'.src/service.c+4 -30 replies
4/60service: Change return type of 'start_online_check'.src/service.c+24 -40 replies
5/60service: Change return type of 'start_wispr_if_connected'.src/service.c+12 -20 replies
6/60service: Introduce and use online check 'active' state.src/service.c+92 -00 replies
7/60service: Document 'online_check_state' 'active' member.src/service.c+3 -00 replies
8/60service: Document 'online_check_is_active'.src/service.c+22 -00 replies
9/60service: Document 'online_check_active_set_value'.src/service.c+22 -00 replies
10/60service: Document 'online_check_active_{clear,set}'.src/service.c+42 -00 replies
11/60service: Rename 'start_wispr_if_connected'.src/service.c+7 -70 replies
12/60service: Refactor 'start_online_check_if_connected'.src/service.c+49 -140 replies
13/60service: Document 'start_online_check_if_connected_with_type'.src/service.c+34 -00 replies
14/60service: Add an explicit conditional for IPv6 in 'reschedule_online_check'.src/service.c+3 -10 replies
15/60session: Add service identifier to 'DBG' in four functions.src/service.c+16 -60 replies
16/60service: Add online check failure service error enumeration and string.include/service.h src/service.c+12 -90 replies
17/60doc/service: Document online check failure service error.doc/service-api.txt include/service.h+9 -10 replies
18/60service: Introduce and use online check 'failures/successes' state.src/service.c+2 -00 replies
19/60service: Document 'online_check_state' 'failures/successes' members.src/service.c+10 -00 replies
20/60main: Introduce the 'OnlineCheck{Failures,Successes}Threshold' settings.src/main.c+51 -00 replies
21/60doc: Document the 'OnlineCheck{Failures,Successes}Threshold' settings.doc/connman.conf.5.in src/main.conf+76 -00 replies
22/60service: Add per-service online check failure threshold state.src/service.c+1 -00 replies
23/60service: Document 'connman_service' 'online_check_failures_met_threshold' member.src/service.c+6 -00 replies
24/60service: Document 'connman_service' 'online_check_state_ipv{4,6}' members.src/service.c+8 -00 replies
25/60service: Move 'set_error' forward declaration earlier in the source.src/service.c+2 -30 replies
26/60service: Capture IP configuration state by value rather than by pointer.src/service.c+6 -50 replies
27/60service: Complete 'continuous' online check mode implementation.src/service.c+643 -180 replies
28/60service: Document 'online_check_failures_threshold_was_met'.src/service.c+17 -00 replies
29/60service: Document 'online_check_failures_threshold_was_met_set_value'.src/service.c+14 -00 replies
30/60service: Document 'online_check_failures_threshold_was_met_{set,clear}'.src/service.c+23 -00 replies
31/60service: Document 'online_check_counter_reset'.src/service.c+7 -00 replies
32/60service: Document 'online_check_{failures,successes}_reset'.src/service.c+24 -00 replies
33/60service: Document 'online_check_state_reset'.src/service.c+16 -00 replies
34/60service: Document 'online_check_counters_log'.src/service.c+20 -00 replies
35/60service: Document 'online_check_counter_threshold_is_met'.src/service.c+32 -00 replies
36/60service: Document 'is_online_check_failure_threshold_met_predicate'.src/service.c+26 -00 replies
37/60service: Document 'online_check_failures_threshold_is_met'.src/service.c+20 -00 replies
38/60service: Document 'is_online_check_success_threshold_met_predicate'.src/service.c+26 -00 replies
39/60service: Document 'online_check_successes_threshold_is_met'.src/service.c+20 -00 replies
40/60service: Document 'online_check_counter_increment_and_log'.src/service.c+18 -00 replies
41/60service: Document 'online_check_log_success'.src/service.c+14 -00 replies
42/60service: Document 'continuous_online_check_log_{counter,failures,successes}_threshold_met'.src/service.c+51 -00 replies
43/60service: Document 'handle_{continuous,oneshot}_online_check_success'.src/service.c+61 -00 replies
44/60service: Document 'online_check_log_failure'.src/service.c+16 -00 replies
45/60service: Document 'handle_{continuous,oneshot}_online_check_failure'.src/service.c+81 -00 replies
46/60service: Add @sa documentation references.src/service.c+7 -00 replies
47/60service: Document the internals of 'service_compare'.src/service.c+44 -00 replies
48/60service: Document interval assignment in '__connman_service_wispr_start'.src/service.c+5 -00 replies
49/60service: Document 'downgrade_connected_services'.src/service.c+13 -00 replies
50/60service: Document 'service_schedule_changed'.src/service.c+9 -00 replies
51/60service: Document 'service_route_changed'.src/service.c+19 -00 replies
52/60service: Add function parameter to 'default_changed' and 'service_list_sort'.src/service.c+37 -160 replies
53/60service: Add @sa documentation reference to 'current_default'.src/service.c+1 -00 replies
54/60service: Add 'DBG' to 'downgrade_connected_services'.src/service.c+2 -00 replies
55/60main/service: Introduce 'OnlineCheckMode' setting.src/connman.h src/main.c src/service.c+82 -00 replies
56/60service: Leverage 'OnlineCheckMode' setting.src/connman.h src/service.c+100 -200 replies
57/60doc: Document the 'OnlineCheckMode' setting.README doc/connman.conf.5.in src/main.conf+203 -670 replies
58/60main: Add comments tags for online check-related settings.src/main.c+13 -10 replies
59/60main: Consolidate logging of online check-related settings.src/main.c+40 -70 replies
60/60main: Add deprecation warnings for 'EnableOnlineCheck' and 'EnableOnlineToReadyTransition'.src/main.c+8 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 00/60] Complete 'continuous' Online Check Mode Implementation.

This completes the implementation of 'EnableOnlineToReadyTransition' begun by Emmanuel Vautrin with commit f0bd0e8fe578 ("service: Add online to ready transition feature").

When asserted along with 'EnableOnlineCheck', 'EnableOnlineToReadyTransition' effects what can be thought of as a "continuous" online check mode, which is different from the "one-shot" online check mode when 'EnableOnlineToReadyTransition' is not asserted but 'EnableOnlineCheck' is. Effectively, these two Booleans encode three online check modes:

1. None (!EnableOnlineCheck)
2. One-shot (EnableOnlineCheck && !EnableOnlineToReadyTransition)
3. Continuous (EnableOnlineCheck && EnableOnlineToReadyTransition)

With this change, these three modes are formalized and introduced as a new 'OnlineCheckMode' configuration setting which is intended to eventually deprecate 'EnableOnlineCheck' (long-term) and 'EnableOnlineToReadyTransition' (short-term, as it never made it beyond the EXPERIMENTAL designation).

In "none" mode, as has been the case historically, there are no "online" HTTP-based Internet reachability checks. Any connected service and the manager state will terminate at the "ready" state and will not progress to "online".

In "one-shot" mode, as has been the case historically, there is a single, one-shot "online" HTTP-based Internet reachability check for the default service. When the check succeeds, the associated service and the manager state will terminate at the "online" state. When the check fails, subsequent checks will be rescheduled according to "OnlineCheckIntervalStyle", "OnlineCheckInitialInterval", and "OnlineCheckMaxInterval" and will continue indefinitely until one succeeds or until the service is disconnected.

In "continuous" mode, which is finalized with this change, there are ongoing "online" HTTP-based Internet reachability check for the default service. As with "one-shot" mode, when the first check succeeds, the associated service and the manager state will terminate at the "online" state. Thereafter, subsequent checks will be scheduled according to "OnlineCheckIntervalStyle" and "OnlineCheckMaxInterval". When the check fails, subsequent checks will be rescheduled according to "OnlineCheckIntervalStyle", "OnlineCheckInitialInterval", and "OnlineCheckMaxInterval". This is largely unchanged. However, what is new with this change is that when and if "OnlineCheckFailuresThreshold" is met, the service and manager state will be demoted to "ready" and the service will have its "Error" property set to "online-check-failed" while subsequent checks will continue. In the interim, if available, another service may be promoted to the default service and online checks will be initiated for it. When and if, for the demoted service, "OnlineCheckSuccessesThreshold" is met, the service "Error" property will be cleared and the service state promoted to "online", potentially causing it to become the default service again.

Grant Erickson (60):
service: Change return type of '__connman_service_wispr_start'.
service: Sanity check the 'type' param in
'__connman_service_wispr_start'.
service: Rename 'online_check_enabled_check'.
service: Change return type of 'start_online_check'.
service: Change return type of 'start_wispr_if_connected'.
service: Introduce and use online check 'active' state.
service: Document 'online_check_state' 'active' member.
service: Document 'online_check_is_active'.
service: Document 'online_check_active_set_value'.
service: Document 'online_check_active_{clear,set}'.
service: Rename 'start_wispr_if_connected'.
service: Refactor 'start_online_check_if_connected'.
service: Document 'start_online_check_if_connected_with_type'.
service: Add an explicit conditional for IPv6 in
'reschedule_online_check'.
session: Add service identifier to 'DBG' in four functions.
service: Add online check failure service error enumeration and
string.
doc/service: Document online check failure service error.
service: Introduce and use online check 'failures/successes' state.
service: Document 'online_check_state' 'failures/successes' members.
main: Introduce the 'OnlineCheck{Failures,Successes}Threshold'
settings.
doc: Document the 'OnlineCheck{Failures,Successes}Threshold' settings.
service: Add per-service online check failure threshold state.
service: Document 'connman_service'
'online_check_failures_met_threshold' member.
service: Document 'connman_service' 'online_check_state_ipv{4,6}'
members.
service: Move 'set_error' forward declaration earlier in the source.
service: Capture IP configuration state by value rather than by
pointer.
service: Complete 'continuous' online check mode implementation.
service: Document 'online_check_failures_threshold_was_met'.
service: Document 'online_check_failures_threshold_was_met_set_value'.
service: Document
'online_check_failures_threshold_was_met_{set,clear}'.
service: Document 'online_check_counter_reset'.
service: Document 'online_check_{failures,successes}_reset'.
service: Document 'online_check_state_reset'.
service: Document 'online_check_counters_log'.
service: Document 'online_check_counter_threshold_is_met'.
service: Document 'is_online_check_failure_threshold_met_predicate'.
service: Document 'online_check_failures_threshold_is_met'.
service: Document 'is_online_check_success_threshold_met_predicate'.
service: Document 'online_check_successes_threshold_is_met'.
service: Document 'online_check_counter_increment_and_log'.
service: Document 'online_check_log_success'.
service: Document
'continuous_online_check_log_{counter,failures,successes}_threshold_met'.
service: Document 'handle_{continuous,oneshot}_online_check_success'.
service: Document 'online_check_log_failure'.
service: Document 'handle_{continuous,oneshot}_online_check_failure'.
service: Add @sa documentation references.
service: Document the internals of 'service_compare'.
service: Document interval assignment in
'__connman_service_wispr_start'.
service: Document 'downgrade_connected_services'.
service: Document 'service_schedule_changed'.
service: Document 'service_route_changed'.
service: Add function parameter to 'default_changed' and
'service_list_sort'.
service: Add @sa documentation reference to 'current_default'.
service: Add 'DBG' to 'downgrade_connected_services'. main/service: Introduce 'OnlineCheckMode' setting.
service: Leverage 'OnlineCheckMode' setting.
doc: Document the 'OnlineCheckMode' setting.
main: Add comments tags for online check-related settings.
main: Consolidate logging of online check-related settings.
main: Add deprecation warnings for 'EnableOnlineCheck' and
'EnableOnlineToReadyTransition'.

 README                |   91 +-
 doc/connman.conf.5.in |   85 +-
 doc/service-api.txt   |    3 +-
 include/service.h     |   26 +-
 src/connman.h         |   18 +-
 src/main.c            |  177 +++-
 src/main.conf         |  122 ++-
 src/service.c         | 2133 ++++++++++++++++++++++++++++++++++++-----
 8 files changed, 2356 insertions(+), 299 deletions(-)
Signature · 1 line
2.42.0