Skip to content
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 can i create different link.Attrs().Index for same nic? #953

Open
lddlww opened this issue Feb 26, 2024 · 1 comment
Open

how can i create different link.Attrs().Index for same nic? #953

lddlww opened this issue Feb 26, 2024 · 1 comment

Comments

@lddlww
Copy link

lddlww commented Feb 26, 2024

for nic which has multi queues, it would be more index associate with one nic;
i want to create different links using "eth0", but follow code always get same Index

link, err := netlink.LinkByName("eth0")
fmt.Println(link.Attrs().Index) // output: 2

link, err := netlink.LinkByName("eth0")
fmt.Println(link.Attrs().Index)// output: 2

how can i do ?

@thediveo
Copy link
Contributor

thediveo commented Jul 1, 2024

This is not possible in Linux' current model. Queues are aggregated into netdevs to the best of my knowledge, and there isn't any virtual netdev kind that would allow extracting queues into new netdevs, not least as this would need removing queues, IRQ nightmares, and many follow-up problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants