Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

error: syscall.Bind SockaddrXDP failed: device or resource busy #32

Open
lddlww opened this issue Feb 23, 2024 · 0 comments
Open

error: syscall.Bind SockaddrXDP failed: device or resource busy #32

lddlww opened this issue Feb 23, 2024 · 0 comments

Comments

@lddlww
Copy link

lddlww commented Feb 23, 2024

what's wrong with it?

i run with follow code: i want to create more xsk with same link, but it throw above error

func Newxsk(nic string, queue_id int) (*xdp.Socket, error) {
    fmt.Println(queue_id, nic)
    link, err := netlink.LinkByName(NIC)
    if err != nil {
        panic(err)
    }
    xsk, err := xdp.NewSocket(link.Attrs().Index, QueueID, nil)
    return xsk, err
}

var queueCount = 8

for i := 0; i < queueCount; i++ {
            xsk, err := Newxsk(NIC, i)
            if err != nil {
                panic(err)
            }
            xsks = append(xsks, xsk)
}

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

No branches or pull requests

1 participant