Bug 202315 - make tools/bpf fails
Summary: make tools/bpf fails
Status: NEW
Alias: None
Product: Tools
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Tools.Other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-17 08:28 UTC by Dan Gilson
Modified: 2019-01-17 23:13 UTC (History)
3 users (show)

See Also:
Kernel Version: 4.20.3
Subsystem:
Regression: No
Bisected commit-id:


Attachments
patch file that contains fix (608 bytes, application/mbox)
2019-01-17 08:28 UTC, Dan Gilson
Details

Description Dan Gilson 2019-01-17 08:28:24 UTC
Created attachment 280549 [details]
patch file that contains fix

/opt/linux.git
[root@uServ8Core 513]$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);
                     ^
net.c:164:21: note: each undeclared identifier is reported only once for each function it appears in
net.c:164:34: error: ‘TC_H_MIN_INGRESS’ undeclared (first use in this function)
  handle = TC_H_MAKE(TC_H_CLSACT, TC_H_MIN_INGRESS);
                                  ^
net.c:171:34: error: ‘TC_H_MIN_EGRESS’ undeclared (first use in this function)
  handle = TC_H_MAKE(TC_H_CLSACT, TC_H_MIN_EGRESS);
                                  ^
Makefile:110: recipe for target '/opt/linux.git/tools/bpf/bpftool/net.o' failed
make[3]: *** [/opt/linux.git/tools/bpf/bpftool/net.o] Error 1
Makefile:99: recipe for target 'bpftool' failed
make[2]: *** [bpftool] Error 2
Makefile:65: recipe for target 'bpf' failed
make[1]: *** [bpf] Error 2
Makefile:1676: recipe for target 'tools/bpf' failed
make: *** [tools/bpf] Error 2
Comment 1 Jakub Kicinski 2019-01-17 18:40:11 UTC
I don't think kernel takes patches from the bugzilla.
Please send to me and CC netdev@vger.kernel.org with git send-email command.

FWIW the patch does not look good.  You need to copy the include/uapi/linux/pkt_sched.h header into tools/include and include that.
Comment 2 Dan Gilson 2019-01-17 19:57:54 UTC
Would copying the .h file to a second directory be a worse solution?  The defines would be in 2 places and that would be a way to become out of sync with one another.
Comment 3 Jakub Kicinski 2019-01-17 22:41:07 UTC
It's an established model, granted, it's not perfect.
Comment 4 Daniel Borkmann 2019-01-17 23:13:37 UTC
Fixed here (also Cc'ed you on the patch actually) http://patchwork.ozlabs.org/patch/1026735/ . Thanks for reporting!

Note You need to log in before you can comment on or make changes to this bug.