-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CVPN-956: handling of Full error on tun io-uring send
Treating tun io-uring Full error as OK scenario. It is effectively the same scenario as a buffer in a network switch/router filling up so dropping the traffic is appropriate, higher level protocols (e.g. TCP) running over the tunnel will use their congestion control algorithms to adjust their send rate.
- Loading branch information
1 parent
ba85d90
commit a8864d9
Showing
5 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,5 +26,6 @@ pub use iouring::IOUring; | |
|
||
pub use tun::Tun; | ||
|
||
mod metrics; | ||
mod utils; | ||
pub use utils::is_file_path_valid; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
use metrics::counter; | ||
|
||
const METRIC_TUN_IOURING_DATA_DROPPED: &str = "tun_iouring_data_dropped"; | ||
|
||
/// Counter for "sending into a full channel" type of error ([`async_channel::TrySendError::Full`]) | ||
pub(crate) fn tun_iouring_data_dropped() { | ||
counter!(METRIC_TUN_IOURING_DATA_DROPPED).increment(1); | ||
} |