History

rtnl: add option for setting link xdp prog

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.

Brenden Blanco committed 10 years ago

Commit d1fdd911 parent a7862b42 files · +76 −0Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/if_link.h+12−0
@@ -156,6 +156,7 @@ enum { · 155 unmodified lines
156156 IFLA_GSO_MAX_SEGS,
157157 IFLA_GSO_MAX_SIZE,
158158 IFLA_PAD,
159+ IFLA_XDP,
159160 __IFLA_MAX
160161 };
161162
@@ -843,4 +844,15 @@ enum { · 681 unmodified lines
843844 };
844845 #define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_TYPE_MAX - 1)
845846
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+
846858 #endif /* _UAPI_LINUX_IF_LINK_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t