Skip to content

Commit

Permalink
tools/bpftool: copy a few net uapi headers to tools directory
Browse files Browse the repository at this point in the history
Commit f6f3bac ("tools/bpf: bpftool: add net support")
added certain networking support to bpftool.
The implementation relies on a relatively recent uapi header file
linux/tc_act/tc_bpf.h on the host which contains the marco
definition of TCA_ACT_BPF_ID.

Unfortunately, this is not the case for all distributions.
See the email message below where rhel-7.2 does not have
an up-to-date linux/tc_act/tc_bpf.h.
  https://www.mail-archive.com/[email protected]/msg1799211.html
Further investigation found that linux/pkt_cls.h is also needed for macro
TCA_BPF_TAG.

This patch fixed the issue by copying linux/tc_act/tc_bpf.h
and linux/pkt_cls.h from kernel include/uapi directory to
tools/include/uapi directory so building the bpftool does not depend
on host system for these files.

Fixes: f6f3bac ("tools/bpf: bpftool: add net support")
Reported-by: kernel test robot <[email protected]>
Cc: Li Zhijian <[email protected]>
Signed-off-by: Yonghong Song <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
  • Loading branch information
yonghong-song authored and borkmann committed Nov 9, 2018
1 parent b13b878 commit 49a249c
Show file tree
Hide file tree
Showing 2 changed files with 649 additions and 0 deletions.
Loading

0 comments on commit 49a249c

Please sign in to comment.