attach XDP program to interface
This example uses XDP: - set interface links to up - load a XDP program from object file and attach it to eth0 - clear any attached XDP program from eth1
{
networking.ifstate = {
enable = true;
settings = {
interfaces = {
# attach XDP program from file
eth0 = {
link = {
state = "up";
kind = "physical";
};
xdp = {
object =
"/home/thomas/src/xdp-tutorial/basic01-xdp-pass/xdp_pass_kern.o";
section = "xdp";
};
};
# clear attached XDP program
eth1 = {
link = {
state = "up";
kind = "physical";
};
xdp = "no";
};
};
};
};
}