This commit is contained in:
GroovieGermanikus 2024-12-05 15:50:02 +01:00
parent 2e0b85d526
commit 7653428b68
No known key found for this signature in database
GPG Key ID: 5B6EB831A5CD2015
1 changed files with 1 additions and 9 deletions

View File

@ -97,7 +97,6 @@ fn send_to_gso_pacing(
panic!("send_to_gso() should not be called on non-linux platforms"); panic!("send_to_gso() should not be called on non-linux platforms");
} }
/// Send packets using sendmsg() with pacing but without GSO. /// Send packets using sendmsg() with pacing but without GSO.
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
fn send_to_pacing( fn send_to_pacing(
@ -120,13 +119,7 @@ fn send_to_pacing(
let send_time = std_time_to_u64(&send_info.at); let send_time = std_time_to_u64(&send_info.at);
let cmsg_txtime = ControlMessage::TxTime(&send_time); let cmsg_txtime = ControlMessage::TxTime(&send_time);
match sendmsg( match sendmsg(sockfd, &iov, &[cmsg_txtime], MsgFlags::empty(), Some(&dst)) {
sockfd,
&iov,
&[cmsg_txtime],
MsgFlags::empty(),
Some(&dst),
) {
Ok(v) => Ok(v), Ok(v) => Ok(v),
Err(e) => Err(e.into()), Err(e) => Err(e.into()),
} }
@ -142,7 +135,6 @@ fn send_to_pacing(
panic!("send_to_gso() should not be called on non-linux platforms"); panic!("send_to_gso() should not be called on non-linux platforms");
} }
/// A wrapper function of send_to(). /// A wrapper function of send_to().
/// ///
/// When GSO and SO_TXTIME are enabled, send packets using send_to_gso(). /// When GSO and SO_TXTIME are enabled, send packets using send_to_gso().