Sitelet https://github.com/iputils/iputils/pull/459
Skip to content

clockdiff: Set ppoll timeout minimum to 1ms - #459

Closed
caibingcheng wants to merge 1 commit into
iputils:masterfrom
caibingcheng:master
Closed

caibingcheng wants to merge 1 commit into
iputils:masterfrom
caibingcheng:master

Conversation

@caibingcheng

Copy link
Copy Markdown
Contributor

This is an improvement suggestion.

The ppoll timeout gets dynamically updated while receiving messages. However, if the network environment is good, the timeout gradually decreases to zero, which causes the ppoll to easily timeout and ultimately results in a 'host down' error. To address this, I suggest modifying the code to set the minimum timeout to 1ms. Additionally, by calculating using clockdiff, even in asymmetric network conditions, the error caused by a 1ms timeout would be only 0.5ms, which is lower than the clockdiff precision. Alternatively, a smaller timeout could also be used.

Signed-off-by: caibingcheng <jack_cbc@163.com>
@pevik

pevik commented Apr 26, 2023

Copy link
Copy Markdown
Contributor

Sounds reasonable to me. @nmeyerhans WDYT?

Reviewed-by: Petr Vorel <pvorel@suse.cz>

@nmeyerhans
nmeyerhans self-requested a review May 5, 2023 18:10
@nmeyerhans

Copy link
Copy Markdown
Contributor

Actually, this seems to be fixing the same issue as #380, but with a different approach. Need to look at the two PRs more closely to decide which one is the right approach.

@pevik pevik mentioned this pull request May 24, 2023
@pevik pevik closed this in 471942d May 26, 2023
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