On Sat, Jun 12, 2021 at 01:31:56AM IST, Andrii Nakryiko wrote: > On Wed, May 12, 2021 at 3:35 AM Kumar Kartikeya Dwivedi > <memxor@xxxxxxxxx> wrote: > > > > This is the seventh version of the TC-BPF series. > > > > It adds a simple API that uses netlink to attach the tc filter and its bpf > > classifier program. Currently, a user needs to shell out to the tc command line > > to be able to create filters and attach SCHED_CLS programs as classifiers. With > > the help of this API, it will be possible to use libbpf for doing all parts of > > bpf program setup and attach. > > > > Changelog contains details of patchset evolution. > > > > In an effort to keep discussion focused, this series doesn't have the high level > > TC-BPF API. It was clear that there is a need for a bpf_link API in the kernel, > > hence that will be submitted as a separate patchset based on this. > > > > The individual commit messages contain more details, and also a brief summary of > > the API. > > > > Changelog: > > ---------- > > Hey Kartikeya, > > There were few issues flagged by Coverity after I synced libbpf to > Github. A bunch of them are netlink.c-related. Could you please take a > look and see if they are false positives or something that we can > actually fix? See links to the issues below. Thanks! > > [0] https://scan3.coverity.com/reports.htm#v40547/p11903/fileInstanceId=53874109&defectInstanceId=10901199&mergedDefectId=141815 > [1] https://scan3.coverity.com/reports.htm#v40547/p11903/fileInstanceId=53874109&defectInstanceId=10901193&mergedDefectId=322806 > [2] https://scan3.coverity.com/reports.htm#v40547/p11903/fileInstanceId=53874109&defectInstanceId=10901197&mergedDefectId=322807 > [3] https://scan3.coverity.com/reports.htm#v40547/p11903/fileInstanceId=53874109&defectInstanceId=10901195&mergedDefectId=322808 > Hi Andrii, These links don't work for me (I get a timeout). Would you know why? Is there some other link where I can look at them? > [...] > > > > > Kumar Kartikeya Dwivedi (3): > > libbpf: add netlink helpers > > libbpf: add low level TC-BPF API > > libbpf: add selftests for TC-BPF API > > > > tools/lib/bpf/libbpf.h | 43 ++ > > tools/lib/bpf/libbpf.map | 5 + > > tools/lib/bpf/netlink.c | 554 ++++++++++++++++-- > > tools/lib/bpf/nlattr.h | 48 ++ > > .../testing/selftests/bpf/prog_tests/tc_bpf.c | 395 +++++++++++++ > > .../testing/selftests/bpf/progs/test_tc_bpf.c | 12 + > > 6 files changed, 993 insertions(+), 64 deletions(-) > > create mode 100644 tools/testing/selftests/bpf/prog_tests/tc_bpf.c > > create mode 100644 tools/testing/selftests/bpf/progs/test_tc_bpf.c > > > > -- > > 2.31.1 > > -- Kartikeya