OSDN Git Service

bpf: pull in pkt_sched.h header for tooling to fix bpftool build
authorDaniel Borkmann <daniel@iogearbox.net>
Thu, 17 Jan 2019 15:15:09 +0000 (16:15 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 18 Jan 2019 23:16:36 +0000 (15:16 -0800)
commitad6dd7a9c47ba587c0aba57f73737764cd31136f
tree25ad9d0e7b13b495fe6b0fc7860747a83b33a081
parente224c390a6259c529f7b2a6bd215a087b3344f5c
bpf: pull in pkt_sched.h header for tooling to fix bpftool build

Dan reported that bpftool does not compile for him:

  $ make tools/bpf
    DESCEND  bpf

  Auto-detecting system features:
  ..                        libbfd: [ on  ]
  ..        disassembler-four-args: [ OFF ]

    DESCEND  bpftool

  Auto-detecting system features:
  ..                        libbfd: [ on  ]
  ..        disassembler-four-args: [ OFF ]

    CC       /opt/linux.git/tools/bpf/bpftool/net.o
  In file included from /opt/linux.git/tools/include/uapi/linux/pkt_cls.h:6:0,
                 from /opt/linux.git/tools/include/uapi/linux/tc_act/tc_bpf.h:14,
                 from net.c:13:
  net.c: In function 'show_dev_tc_bpf':
  net.c:164:21: error: 'TC_H_CLSACT' undeclared (first use in this function)
    handle = TC_H_MAKE(TC_H_CLSACT, TC_H_MIN_INGRESS);
  [...]

Fix it by importing pkt_sched.h header copy into tooling
infrastructure.

Fixes: 49a249c38726 ("tools/bpftool: copy a few net uapi headers to tools directory")
Fixes: f6f3bac08ff9 ("tools/bpf: bpftool: add net support")
Reported-by: Dan Gilson <dan_gilson@yahoo.com>
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=202315
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/include/uapi/linux/pkt_sched.h [new file with mode: 0644]