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
156 IFLA_GSO_MAX_SEGS,156 IFLA_GSO_MAX_SEGS,
157 IFLA_GSO_MAX_SIZE,157 IFLA_GSO_MAX_SIZE,
158 IFLA_PAD,158 IFLA_PAD,
159 IFLA_XDP,
159 __IFLA_MAX160 __IFLA_MAX
160};161};
161 162
@@ -843,4 +844,15 @@ enum { · 681 unmodified lines
843};844};
844#define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_TYPE_MAX - 1)845#define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_TYPE_MAX - 1)
845 846
847/* XDP section */
848
849enum {
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#endif /* _UAPI_LINUX_IF_LINK_H */858#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