aya: fix docs

reviewable/pr1096/r2
Vegard Kamsvåg 3 months ago
parent b3aad24952
commit afa61c64a6

@ -4,12 +4,12 @@
//! for access to all four rings, binding to a specific `(ifname, queue_id)`, and for creating the //! for access to all four rings, binding to a specific `(ifname, queue_id)`, and for creating the
//! memory mapping to interact with all these queues directly. //! memory mapping to interact with all these queues directly.
//! //!
//! Please see https://docs.kernel.org/networking/af_xdp.html for a detailed explanation of AF_XDP. //! Please see <https://docs.kernel.org/networking/af_xdp.html> for a detailed explanation of AF_XDP.
//! //!
//! The entrypoint to the module is an instance of [`XdpSocketBuilder`], or for power users //! The entrypoint to the module is an instance of [`XdpSocketBuilder`], or for power users
//! the more low-level [`crate::Umem`]. //! the more low-level [`crate::af_xdp::Umem`].
//! //!
//! This module builds upon the `xdpilone` crate (https://crates.io/crates/xdpilone), with //! This module builds upon the `xdpilone` crate (<https://crates.io/crates/xdpilone>), with
//! some (optional) abstractions on top. //! some (optional) abstractions on top.
use std::{borrow::Cow, ffi::NulError, io::Error}; use std::{borrow::Cow, ffi::NulError, io::Error};
@ -32,7 +32,7 @@ pub enum XskError {
/// The errno /// The errno
errno: i32, errno: i32,
}, },
/// Error creating a [`CString`] /// Error creating a [`std::ffi::CString`]
#[error("nul error")] #[error("nul error")]
NulError(#[from] NulError), NulError(#[from] NulError),
@ -57,7 +57,7 @@ pub enum AllocationError {
} }
impl<'a> XskError { impl<'a> XskError {
/// Create an error from the latest [`errno`]. /// Create an error from the latest `errno`.
pub fn last_os_error() -> Self { pub fn last_os_error() -> Self {
Self::Errno { Self::Errno {
errno: Error::last_os_error().raw_os_error().unwrap_or(-1), errno: Error::last_os_error().raw_os_error().unwrap_or(-1),

Loading…
Cancel
Save