-
Notifications
You must be signed in to change notification settings - Fork 707
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integration of Suspend/Resume related fixes
Mutex and flag changes: Move endpoints state_ update to be after the shutdown_and_close as this function forces the state_ to be CLOSED. This could lead to re connections not happening; Set linger to the tcp and local_tcp server endpoint connections, as this is not longer done on suspend; Removed routing_stop_mutex_ (from rmc::stop, rmc::on_net_state_change, rmc::on_message) if_state_running_ and sd_route_set_ are now atomic; Removed state_mutex_ and state_ is now atomic. This was needed as it could cause a lock inversion with the sender_mutex_ and receiver_mutex_; state_mutex_ was being reused for several other collections, and so the following mutexes were added: pending_offers_mutex_, requests_mutex_, requests_to_debounce_mutex_, pending_event_registrations_mutex_, state_condition_mutex_, register_application_timer_mutex_; pending_sd_offers_mutex_ is now recursive_mutex because it is also needed in the rmi::set_routing_state, to resolve any offers that were left pending after resuming; Fix deadlock on rmc::on_net_state_change, which could lock sender_mutex_ and then call on_disconnect which would lock the same mutex; Functional changes: Added function remove_known_client() which erases Known_clients_. routing_manager_base::remove_local will now call remove_known_client to keep the list updated; rmi::set_routing_state will now initialize the service info of any remaining pending_sd_offers_. Before, services that were internally offered while the resume was not ready were not being offered externally; Added a new state RS_DELAYED_RESUME. This state will be set instead of RS_RESUMED if either the if_state_running_ or (when service discovery is enabled) sd_route_set_ are not set. On state RS_SUSPEND the endpoint_manager_impl::suspend will no longer be called, as this could lead to sockets getting suck in ACCEPT4 (after resuming) if the ecu suspended while vsomeip was stil closing sockets; On state RS_RESUME, in endpoint_manager_impl::resume only the client endpoints will be restarted. Restarting server endpoints resulted in a service discovery reboot detection being wrongly triggered; Refactor rmi::on_net_interface_or_route_state_changed, to both simplify the logic and integrated the new RS_DELAYED_RESUME state; Created new function rmi::is_external_routing_ready() to simplify checks on if_state_running_ and sd_route_set_.
- Loading branch information
Rui Graça
authored and
Duarte Fonseca
committed
Jan 9, 2025
1 parent
72d7492
commit ade0d62
Showing
18 changed files
with
355 additions
and
383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.