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

Optimization: stop relaying when reply is received #3753

Merged
merged 1 commit into from
May 1, 2024

Conversation

GUVWAF
Copy link
Member

@GUVWAF GUVWAF commented Apr 30, 2024

This is a small optimization to stop relaying a direct message not only when it’s ACKed, but also when the recipient has already replied to it (e.g. for traceroute and position requests). Nodes might have the packet to be relayed still in their Tx queue when they receive the reply. At that point we can cancel this transmission.

Tested with a traceroute from 0 to 2 in the interactive simulator. On the left is the current master where node 1 relays both the request and reply. On the right is this PR where it only relays the reply (although it was received directly but node 0 doesn’t ACK the reply).

image image

@thebentern thebentern merged commit e51ee91 into meshtastic:master May 1, 2024
70 checks passed
@GUVWAF GUVWAF deleted the stopRelayOnReply branch May 1, 2024 07:49
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.

2 participants