libbpf: add libbpf_util.h to header install.
Subsystems (4)
PATCH 1/1 libbpf: add libbpf_util.h to header install.
The libbpf_util.h is used by xsk.h, so add it to
the install headers.
--- tools/lib/bpf/Makefile | 1 + 1 file changed, 1 insertion(+)
tools/lib/bpf/Makefile +1 -0
@@ -230,6 +230,7 @@ install_headers: $(call do_install,bpf.h,$(prefix)/include/bpf,644); \ $(call do_install,libbpf.h,$(prefix)/include/bpf,644); \ $(call do_install,btf.h,$(prefix)/include/bpf,644); \ + $(call do_install,libbpf_util.h,$(prefix)/include/bpf,644); \ $(call do_install,xsk.h,$(prefix)/include/bpf,644); install_pkgconfig: $(PC_FILE)
Signature · 1 line
2.7.4
Quoted 3 lines · William Tu
The
libbpf_util.his used byxsk.h, so add it to
the install headers.
Can we try to change code a little bit to avoid exposing libbpf_util.h? Originally libbpf_util.h is considered as libbpf internal.
I am not strongly against this patch. But would really like to see whether we have an alternative not exposing libbpf_util.h.
Quoted 22 lines
Reported-by Ben Pfaff <[email protected]>Signed-off-by William Tu <[email protected]>--- tools/lib/bpf/Makefile | 1 + 1 file changed, 1 insertion(+)tools/lib/bpf/Makefile +1
-1@@ -230,6 +230,7 @@ install_headers: $(call do_install,bpf.h,$(prefix)/include/bpf,644); \ $(call do_install,libbpf.h,$(prefix)/include/bpf,644); \ $(call do_install,btf.h,$(prefix)/include/bpf,644); \ + $(call do_install,libbpf_util.h,$(prefix)/include/bpf,644); \ $(call do_install,xsk.h,$(prefix)/include/bpf,644); install_pkgconfig: $(PC_FILE) --2.7.4
Quoted 11 lines · Y Song
Quoted 3 lines · William Tu
The
libbpf_util.his used byxsk.h, so add it to
the install headers.Can we try to change code a little bit to avoid exposing
libbpf_util.h? Originallylibbpf_util.his considered as libbpf internal.
I am not strongly against this patch. But would really like to see whether we have an alternative not exposinglibbpf_util.h.
The commit b7e3a28019c92ff ("libbpf: remove dependency on barrier.h in xsk.h") adds the dependency of libbpf_util.h to xsk.h.
How about we move the libbpf_smp_* into the xsk.h, since they are used only by xsk.h.
Regards,
William
Quoted 22 lines
Quoted 22 lines
Reported-by Ben Pfaff <[email protected]>Signed-off-by William Tu <[email protected]>--- tools/lib/bpf/Makefile | 1 + 1 file changed, 1 insertion(+)tools/lib/bpf/Makefile +1
-1@@ -230,6 +230,7 @@ install_headers: $(call do_install,bpf.h,$(prefix)/include/bpf,644); \ $(call do_install,libbpf.h,$(prefix)/include/bpf,644); \ $(call do_install,btf.h,$(prefix)/include/bpf,644); \ + $(call do_install,libbpf_util.h,$(prefix)/include/bpf,644); \ $(call do_install,xsk.h,$(prefix)/include/bpf,644); install_pkgconfig: $(PC_FILE) --2.7.4
Y Song
Acked-by Yonghong SongQuoted 14 lines · William Tu
Quoted 11 lines · Y Song
Quoted 3 lines · William Tu
The
libbpf_util.his used byxsk.h, so add it to
the install headers.Can we try to change code a little bit to avoid exposing
libbpf_util.h? Originallylibbpf_util.his considered as libbpf internal.
I am not strongly against this patch. But would really like to see whether we have an alternative not exposinglibbpf_util.h.
Quoted 4 lines
The commit
b7e3a28019c92ff("libbpf: remove dependency onbarrier.hinxsk.h") adds the dependency oflibbpf_util.htoxsk.h.
How about we move the libbpf_smp_* into thexsk.h, since they are used only byxsk.h.
Okay. Looks like the libbpf_smp_* is used in some static inline functions which are also API functions.
Probably having libbpf_smp_* in libbpf_util.h is a better choice as these primitives can be used by other .c files in tools/lib/bpf.
On the other hand, exposing macros pr_warning(), pr_info() and pr_debug() may not
be a bad thing as user can use them with the same debug level used by libbpf itself.
Ack your original patch:
Quoted 26 lines
Regards,
WilliamQuoted 22 lines
Quoted 22 lines
Reported-by Ben Pfaff <[email protected]>Signed-off-by William Tu <[email protected]>--- tools/lib/bpf/Makefile | 1 + 1 file changed, 1 insertion(+)tools/lib/bpf/Makefile +1
-1@@ -230,6 +230,7 @@ install_headers: $(call do_install,bpf.h,$(prefix)/include/bpf,644); \ $(call do_install,libbpf.h,$(prefix)/include/bpf,644); \ $(call do_install,btf.h,$(prefix)/include/bpf,644); \ + $(call do_install,libbpf_util.h,$(prefix)/include/bpf,644); \ $(call do_install,xsk.h,$(prefix)/include/bpf,644); install_pkgconfig: $(PC_FILE) --2.7.4
Alexei Starovoitov
AppliedQuoted 27 lines · Y Song
Quoted 14 lines · William Tu
Quoted 11 lines · Y Song
Quoted 3 lines · William Tu
The
libbpf_util.his used byxsk.h, so add it to
the install headers.Can we try to change code a little bit to avoid exposing
libbpf_util.h? Originallylibbpf_util.his considered as libbpf internal.
I am not strongly against this patch. But would really like to see whether we have an alternative not exposinglibbpf_util.h.Quoted 4 lines
The commit
b7e3a28019c92ff("libbpf: remove dependency onbarrier.hinxsk.h") adds the dependency oflibbpf_util.htoxsk.h.
How about we move the libbpf_smp_* into thexsk.h, since they are used only byxsk.h.Okay. Looks like the libbpf_smp_* is used in some static inline functions which are also API functions.
Probably having libbpf_smp_* in
libbpf_util.his a better choice as these primitives can be used by other .c files intools/lib/bpf.
Quoted 7 lines
On the other hand, exposing macros
pr_warning(),pr_info()andpr_debug()may not
be a bad thing as user can use them with the same debug level used by libbpf itself.Ack your original patch:
Acked-by Yonghong Song <[email protected]>
Applied. Thanks