diff --git a/.github/actions/rust-ci-setup/action.yml b/.github/actions/rust-ci-setup/action.yml index 56a6659f..ef326a3f 100644 --- a/.github/actions/rust-ci-setup/action.yml +++ b/.github/actions/rust-ci-setup/action.yml @@ -46,6 +46,27 @@ runs: fi fi + - name: Install Perl for vendored OpenSSL (Windows) + if: runner.os == 'Windows' + shell: powershell + run: | + choco install strawberryperl --yes --no-progress + $perlBin = 'C:\Strawberry\perl\bin' + if (-not (Test-Path $perlBin)) { + throw "expected Strawberry Perl at $perlBin" + } + $perlExe = Join-Path $perlBin 'perl.exe' + if (-not (Test-Path $perlExe)) { + throw "expected Perl executable at $perlExe" + } + $cBin = 'C:\Strawberry\c\bin' + Add-Content -Path $env:GITHUB_PATH -Value $perlBin + if (Test-Path $cBin) { + Add-Content -Path $env:GITHUB_PATH -Value $cBin + } + Add-Content -Path $env:GITHUB_ENV -Value "PERL=$perlExe" + & $perlExe -MLocale::Maketext::Simple -e "exit 0" + - name: Install Rust toolchain if: ${{ inputs.install-rust-toolchain == 'true' }} uses: dtolnay/rust-toolchain@stable diff --git a/crates/sof-observer/src/ingest/receiver/core.rs b/crates/sof-observer/src/ingest/receiver/core.rs index 096b5bb0..188ff697 100644 --- a/crates/sof-observer/src/ingest/receiver/core.rs +++ b/crates/sof-observer/src/ingest/receiver/core.rs @@ -1,6 +1,8 @@ #![allow(clippy::indexing_slicing)] -use std::io::{Error as IoError, ErrorKind, IoSliceMut}; +#[cfg(target_os = "linux")] +use std::io::IoSliceMut; +use std::io::{Error as IoError, ErrorKind}; use std::net::SocketAddr; #[cfg(target_os = "linux")] use std::os::fd::{AsFd, AsRawFd}; @@ -621,7 +623,6 @@ fn should_shutdown(shutdown: Option<&Arc>) -> bool { #[path = "io.rs"] mod io; -use io::{ - flush_batch, maybe_pin_receiver_thread, recv_udp_batch_coalesced, recv_udp_packet, - tune_udp_socket, -}; +#[cfg(target_os = "linux")] +use io::recv_udp_batch_coalesced; +use io::{flush_batch, maybe_pin_receiver_thread, recv_udp_packet, tune_udp_socket}; diff --git a/crates/sof-observer/src/ingest/receiver/io.rs b/crates/sof-observer/src/ingest/receiver/io.rs index 0ab72c39..182c0bd4 100644 --- a/crates/sof-observer/src/ingest/receiver/io.rs +++ b/crates/sof-observer/src/ingest/receiver/io.rs @@ -3,16 +3,18 @@ #![allow(clippy::arithmetic_side_effects)] use super::*; +use std::{io, net::UdpSocket}; +#[cfg(target_os = "linux")] use std::{ - io, mem::{size_of, zeroed}, - net::{Ipv4Addr, Ipv6Addr, SocketAddrV4, SocketAddrV6, UdpSocket}, + net::{Ipv4Addr, Ipv6Addr, SocketAddrV4, SocketAddrV6}, ptr::null_mut, }; use crate::ingest::RawPacketBatchSender; #[cfg(test)] use crate::ingest::config::read_udp_drop_on_channel_full; +#[cfg(target_os = "linux")] use crate::ingest::config::{ read_udp_busy_poll_budget, read_udp_busy_poll_us, read_udp_prefer_busy_poll, }; @@ -135,6 +137,8 @@ pub(super) fn recv_udp_packet( rxq_ovfl_counter, }); } + #[cfg(not(target_os = "linux"))] + let _ = track_rxq_ovfl; let (len, source) = retry_on_interrupted(|| socket.recv_from(buffer))?; Ok(UdpReceive { diff --git a/crates/sof-solana-gossip/src/node.rs b/crates/sof-solana-gossip/src/node.rs index 4d0aa9eb..f0b6a86a 100644 --- a/crates/sof-solana-gossip/src/node.rs +++ b/crates/sof-solana-gossip/src/node.rs @@ -21,16 +21,17 @@ use { solana_streamer::quic::DEFAULT_QUIC_ENDPOINTS, solana_time_utils::timestamp, std::{ - env, io, iter::once, net::{IpAddr, Ipv4Addr, SocketAddr, UdpSocket}, num::NonZero, - os::fd::AsRawFd, sync::Arc, }, }; +#[cfg(target_os = "linux")] +use std::{env, os::fd::AsRawFd}; + // Socket addresses for each protocol across all interfaces #[derive(Debug, Clone)] pub struct MultihomingAddresses { diff --git a/docs/gitbook/_layouts/website/page.html b/docs/gitbook/_layouts/website/page.html index e138f2f2..0e40b1bf 100644 --- a/docs/gitbook/_layouts/website/page.html +++ b/docs/gitbook/_layouts/website/page.html @@ -121,14 +121,16 @@