Skip to content
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

Modify network detection on QNX to delay SD #841

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kheaactua
Copy link
Contributor

Overview

Introducing a simple_connector to mimic the netlink_connector (in a very limited way) on QNX. This PR is not intended to be merged upstream, but instead serves as a discussion topic and example.

Description

Implemented a "simple_connector" to mimic the netlink_connector available on Linux. This connector, along with vsomeip3.5.4 introduction of the RS_DELAYED_RESUME routing state, allows us to delay SD until the network is available.

The simple_connector works by using QNX's waitfor to wait for a file whose creation indicates network availability. This file is created externally.

The simple_connector does not continue to monitor the network. It simply notifies the routing_manager the first time the network is available.

That said, the interface does allow for easy extension in the future

This behaviour is controlled with the env vars
VSOMEIP_USE_ASYNCHRONOUS_SD and VSOMEIP_WAIT_FOR_INTERFACE.

An alternative implementation would be to use PPS, but that isn't available by default on our deployment of QNX 7.

This implementation has a reduced foot print from earlier implementations and also does not modify any interfaces.

Notes

  • There is no timeout on the waitfor. The original implementation had a configurable timeout, however because timing out left us in an error state anyways, this timeout was removed (raised to numeric_limits<int>::max() = ~45 days, give or take.)
  • This capability was previously implemented in Control SD sync/async behaviour with env var on QNX #710 for 3.4.10, however that change had a huge footprint and fundamentally altered the startup process making it hard to maintain

Implemented a "simple_connector" to mimic the netlink_connector
available on Linux.  This connector, along with vsomeip3.5.4
introduction of the RS_DELAYED_RESUME routing state, allows us to delay
SD until the network is available.

The simple_connector works by using QNX's waitfor to wait for a file
whose creation indicates network availability.  This file is created
externally.

The simple_connector does not continue to monitor the network.  It
simply notifies the routing_manager the first time the network is
available.

That said, the interface does allow for easy extension in the future

This behaviour is controlled with the env vars
VSOMEIP_USE_ASYNCHRONOUS_SD and VSOMEIP_WAIT_FOR_INTERFACE.

An alternative implementation would be to use PPS, but that isn't
available by default on our deployment of QNX 7.

This implementation has a reduced foot print from earlier
implementations and also does not modify any interfaces.

Notes:
- There is no timeout on the waitfor.  The original implementation had a
  configurable timeout, however because timing out left us in an error
  state anyways, this timeout was removed (raised to
  numeric_limits<int>::max() = ~45 days, give or take.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant