History

bpf: rename MAX_BPF_LINK_TYPE into __MAX_BPF_LINK_TYPE for consistency

To stay consistent with the naming pattern used for similar cases in BPF UAPI (__MAX_BPF_ATTACH_TYPE, etc), rename MAX_BPF_LINK_TYPE into __MAX_BPF_LINK_TYPE. Also similar to MAX_BPF_ATTACH_TYPE and MAX_BPF_REG, add: #define MAX_BPF_LINK_TYPE __MAX_BPF_LINK_TYPE Not all __MAX_xxx enums have such #define, so I'm not sure if we should add it or not, but I figured I'll start with a completely backwards compatible way, and we can drop that, if necessary. Also adjust a selftest that used MAX_BPF_LINK_TYPE enum.

Andrii Nakryiko committed 2 years ago

Commit 7065eef1 parent c35919d3 files · +7 −3Browse files

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

Unified · Split

tools/include/uapi/linux/bpf.h+3−1
@@ -1108,9 +1108,11 @@ enum bpf_link_type { · 1107 unmodified lines
11081108 BPF_LINK_TYPE_TCX = 11,
11091109 BPF_LINK_TYPE_UPROBE_MULTI = 12,
11101110 BPF_LINK_TYPE_NETKIT = 13,
1111− MAX_BPF_LINK_TYPE,
1111+ __MAX_BPF_LINK_TYPE,
11121112 };
11131113
1114+#define MAX_BPF_LINK_TYPE __MAX_BPF_LINK_TYPE
1115+
11141116 enum bpf_perf_event_type {
11151117 BPF_PERF_EVENT_UNSPEC = 0,
11161118 BPF_PERF_EVENT_UPROBE = 1,

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