We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am trying to create a veth pair with a fixed number of rxqueues.
On the shell I do:
ip link add dev veth0 numrxqueues 1 type veth peer name veth1 ip -j -d link show veth0 | jq '.[0].num_rx_queues' # 1
However the following code produces a veth0 with 32 rxques af it the attribute was ignored.
#[cfg(test)] mod test { use futures::TryStreamExt; use netlink_packet_route::link::LinkAttribute; #[tokio::test] async fn test_veth_creation() { let (connection, handle, _) = rtnetlink::new_connection().unwrap(); tokio::spawn(connection); let mut request = handle.link().add(); request .message_mut() .attributes .push(netlink_packet_route::link::LinkAttribute::NumRxQueues(1)); let if_name = "veth0".to_string(); let peer_name = "veth1".to_string(); request = request.veth(if_name.clone(), peer_name); request.execute().await.unwrap(); // Interface should be created by now with 1 RX queue let num_rx_queues = handle .link() .get() .match_name(if_name.to_string()) .execute() .try_next() .await .unwrap() .map(|link| { link.attributes.iter().find_map(|attr| match attr { LinkAttribute::NumRxQueues(link) => Some(*link), _ => None, }) }) .flatten() .unwrap(); assert_eq!(num_rx_queues, 1); } }
The test fails and it shows 32 queues.
ip -j -d link show veth0 | jq '.[0].num_rx_queues' # 32
Am I doing something wrong? Thanks for any help in advance, Karsten
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am trying to create a veth pair with a fixed number of rxqueues.
On the shell I do:
However the following code produces a veth0 with 32 rxques af it the attribute was ignored.
The test fails and it shows 32 queues.
Am I doing something wrong?
Thanks for any help in advance,
Karsten
The text was updated successfully, but these errors were encountered: