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.
Showing the changes to tools/include/uapi/linux (1 of 3 files). Show all
Unified · Split
| @@ -1108,9 +1108,11 @@ enum bpf_link_type { · 1107 unmodified lines | ||
| 1108 | 1108 | BPF_LINK_TYPE_TCX = 11, |
| 1109 | 1109 | BPF_LINK_TYPE_UPROBE_MULTI = 12, |
| 1110 | 1110 | BPF_LINK_TYPE_NETKIT = 13, |
| 1111 | − MAX_BPF_LINK_TYPE, | |
| 1111 | + __MAX_BPF_LINK_TYPE, | |
| 1112 | 1112 | }; |
| 1113 | 1113 | |
| 1114 | +#define MAX_BPF_LINK_TYPE __MAX_BPF_LINK_TYPE | |
| 1115 | + | |
| 1114 | 1116 | enum bpf_perf_event_type { |
| 1115 | 1117 | BPF_PERF_EVENT_UNSPEC = 0, |
| 1116 | 1118 | BPF_PERF_EVENT_UPROBE = 1, |