vishvananda / netlink

Simple netlink library for go.
Apache License 2.0
2.82k stars 737 forks source link

XDP prog replace/update #985

Open cjcanbibi opened 3 months ago

cjcanbibi commented 3 months ago

How can I use LinkSetXdpFdWithFlags so that I can force update or replace XDP programs that are already mounted on the network interface card? I tried to set the flag to 0, but the result was "file exists". I checked the relevant network information and noticed a similar flag called XDP_FLAGS_REPLACE, but I couldn't find its definition or reference in the netlink library. What's going on? Or LinkSetXdpFdWithFlags doesn't support forced replacement of XDP programs? But I think that smooth upgrade is still very important in the production environment. So I need help in this regard, thank you!