-
Notifications
You must be signed in to change notification settings - Fork 35
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
How to get MTU of an dpdk interface? #140
Comments
Okay, I got it. Unfunately port_id is not publicly visible impl PortQueue {
pub fn get_mtu(&self) -> std::io::Result<u16> {
let mut result = MaybeUninit::uninit();
unsafe {
let errno = ffi::rte_eth_dev_get_mtu(self.port_id.raw(), result.as_mut_ptr());
if errno == 0 {
Ok(result.assume_init())
} else {
Err(std::io::Error::from_raw_os_error(errno))
}
}
}
} |
Hi @qiujiangkun, (I'm a capsule noobie, but know a little about DPDK.. so this answer is mostly from DPDK knowledge.) Indeed the This is documented in the capsule source in Hope this helps, -Harry |
I'm built an async high level network stack that supports websocket based on capsule(customized, runtime independent)/rawsocket and smoltcp.
Currently the mtu of rawsocket is fetched by pnet, mtu of dpdk device is hard coded. I would like to play around jumbo frames with multiple interfaces at the same time.
This requires getting MTU of a dpdk interface.
How to get MTU of an dpdk interface?
I can use
ip a
to getena
devices' MTU, but notigb_uio
.The text was updated successfully, but these errors were encountered: