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

Add and expose settings for SD find debounce as config options #716

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tommyhaley
Copy link

In this change a configurable initial debounce
interval for SD find as well as a configurable
number of initial debounces are introduced. This
implies that services requested in the initial
debounce phase will at most wait for an initial
debounce interval before being included in a SD
find debounce. After the initial debounce phase is completed, all subsequent SD find debounces will
use the default debounce interval.

Added and exposed options:

  • find_initial_debounce_reps
  • find_initial_debounce_time

Exposed option:

  • find_debounce_time

@tommyhaley tommyhaley marked this pull request as ready for review June 5, 2024 12:05
@tommyhaley
Copy link
Author

@GenivivSOMEIPmaintainer How to get attention from maintainer/reviewer?

@lutzbichler
Copy link
Collaborator

Could you please add some comment on why this is needed?

@tommyhaley
Copy link
Author

It is not trivial to ensure that the SD Find messages associated with a given someip application is included in the 1st SD Find sent out by the vsomeip router and the 2nd SD message is typically sent out significantly later (by default debounce is 500 ms).

This change provides the possibility to debounce a configurable number of "initial SD Find" at a higher rate than default rate, which is important for vsomeip applications with requirements to get their SD Find sent out "early".

If the vsomeip application didn't manage to register (and request service) at the vsomeip router before the 1st SD Find debounce but shortly after, then the 2nd SD Find debounce (which will include the requested service) will be sent out only e.g. 100 ms later than the 1st SD Find debounce (and 400 ms earlier compared with if default debounce rate was used).

See examples below where where I.W. denote "Random Initial Wait"

Default debounce (timer 500 ms)
|I.W. |..................................................|..................................................|..................................................|...

Three initial debounces (timer 100 ms)
|I.W. |..........|..........|..........|..................................................|..................................................|..................................................|...

@duartenfonseca
Copy link
Collaborator

duartenfonseca commented Nov 19, 2024

hi @tommyhaley a9df07e this commit adds some of the changes you requested.
this way you can change the sd find debounce time for a service.
would this be enough for your needs or you have to add the rest to have it working correctly?

@tommyhaley
Copy link
Author

hi @tommyhaley a9df07e this commit adds some of the changes you requested. this way you can change the sd find debounce time for a service. would this be enough for your needs or you have to add the rest to have it working correctly?

No, it is most likely not sufficient, as it only exposes SD Find Debounce Time as config option but not allowing for SD Find Initial Debounce Time and SD Find Initial Debounce Reps.

@duartenfonseca
Copy link
Collaborator

@tommyhaley will test and try to add the changes internally. can you fix the merge conflicts?

@tommyhaley tommyhaley force-pushed the expose_sd_find_debounce_options branch 3 times, most recently from 60f2e3d to 9a6ec73 Compare December 11, 2024 14:37
@tommyhaley
Copy link
Author

Merge conflicts have been resolved. Sorry for the delay @duartenfonseca

@tommyhaley tommyhaley force-pushed the expose_sd_find_debounce_options branch from 9a6ec73 to 6fd7768 Compare December 11, 2024 15:20
@tommyhaley
Copy link
Author

Pushed multple times to resolve compilation issues. Now I think all compilations are resolved. Please check again @duartenfonseca

@duartenfonseca
Copy link
Collaborator

@tommyhaley there was an update on documentation, and now that part of the documentation is added on a different place which caused the new conflict.
please add:

  • find_initial_debounce_reps - Number of initial debounces using find_initial_debounce_time. This can be used to modify the number of sent messages during initial part of startup (valid values: 0 - 2^8-1). The default setting is 0.
  • find_initial_debounce_time - Time which the stack collects new service requests before they enter the repetition phase. This can be used to modify the
    number of sent messages during initial part of startup. The default setting is 200ms.

at documentation/vsomeipConfiguration.md instead.

thanks!

Tommy Andersson and others added 2 commits January 7, 2025 10:18
In this change a configurable initial debounce
interval for SD find as well as a configurable
number of initial debounces are introduced. This
implies that services requested in the initial
debounce phase will at most wait for an initial
debounce interval before being included in a SD
find debounce. After the initial debounce phase is
completed, all subsequent SD find debounces will
use the default debounce interval.

Added and exposed options:
* find_initial_debounce_reps
* find_initial_debounce_time
…ons"

Changed find_initial_debounce_reps from uint32_t to uint8_t
Simplified propsed logic change in service_discovery_impl

This commit should be squashed into previous.
@tommyhaley tommyhaley force-pushed the expose_sd_find_debounce_options branch from 6fd7768 to 2e5808f Compare January 7, 2025 09:20
@tommyhaley
Copy link
Author

@duartenfonseca merge conflicts has been resolved

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.

3 participants