Sets the bpf program represented by fd as an early filter in the rx path of the netdev. The fd must have been created as BPF_PROG_TYPE_XDP. Providing a negative value as fd clears the program. Getting the fd back via rtnl is not possible, therefore reading of this value merely provides a bool whether the program is valid on the link or not.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -156,6 +156,7 @@ enum { · 155 unmodified lines | ||
| 156 | 156 | IFLA_GSO_MAX_SEGS, |
| 157 | 157 | IFLA_GSO_MAX_SIZE, |
| 158 | 158 | IFLA_PAD, |
| 159 | + IFLA_XDP, | |
| 159 | 160 | __IFLA_MAX |
| 160 | 161 | }; |
| 161 | 162 | |
| @@ -843,4 +844,15 @@ enum { · 681 unmodified lines | ||
| 843 | 844 | }; |
| 844 | 845 | #define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_TYPE_MAX - 1) |
| 845 | 846 | |
| 847 | +/* XDP section */ | |
| 848 | + | |
| 849 | +enum { | |
| 850 | + IFLA_XDP_UNSPEC, | |
| 851 | + IFLA_XDP_FD, | |
| 852 | + IFLA_XDP_ATTACHED, | |
| 853 | + __IFLA_XDP_MAX, | |
| 854 | +}; | |
| 855 | + | |
| 856 | +#define IFLA_XDP_MAX (__IFLA_XDP_MAX - 1) | |
| 857 | + | |
| 846 | 858 | #endif /* _UAPI_LINUX_IF_LINK_H */ |