[PATCH bpf-next v2 02/31] bpf: Change BPF_MAX_TRAMP_LINKS to enum

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This way it's possible to query its value from testcases using BTF.

Signed-off-by: Ilya Leoshkevich <iii@xxxxxxxxxxxxx>
---
 include/linux/bpf.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 14a0264fac57..6415b54fea4e 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -939,7 +939,9 @@ struct btf_func_model {
 /* Each call __bpf_prog_enter + call bpf_func + call __bpf_prog_exit is ~50
  * bytes on x86.
  */
-#define BPF_MAX_TRAMP_LINKS 38
+enum {
+	BPF_MAX_TRAMP_LINKS = 38,
+};
 
 struct bpf_tramp_links {
 	struct bpf_tramp_link *links[BPF_MAX_TRAMP_LINKS];
-- 
2.39.1




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux