בתאריך יום ב׳, 23 באוג׳ 2021 ב-18:51 מאת Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx>: > > On Mon, Aug 23, 2021 at 04:35:51PM IST, Yaniv Agman wrote: > > Using the recently added libbpf tc API worked fine for us in v0.4.0. > > After updating libbpf and syncing with master branch, we get the > > following error: > > > > libbpf: Kernel error message: Exclusivity flag on, cannot modify > > > > This message is harmless. The commit that adds NLM_F_EXCL is a bug fix. Without > it, the kernel returns 0 when it should return -EEXIST. It's just that the > kernel complains loudly for the latter case through extack. > > User needs EEXIST to detect whether it installed the qdisc or not. To see how > this affects the system, run ./test_progs -t tc_bpf after installing clsact > using: > tc qdisc add dev lo clsact > > Before this fix is added, it will remove the system qdisc as bpf_tc_hook_create > returns 0, after the fix it detects the presence of the existing qdisc using > -EEXIST and disables the bpf_tc_hook_destroy call before exit. > Got it, thanks! > I would suggest handling the error explicitly, and using libbpf_set_print to > filter it out. See the example in tools/testing/selftests/bpf/test_progs.c. > Explicitly handling EEXIST solved the problem, however, libbpf_set_print in my setup is already set to ignore any message that is not LIBBPF_WARN. so I'm not sure how to specifically filter this error out... > > I found that commit a1bd8104a9f1c1a5b9cd0f698c886296749a0ce9 is > > You probably meant bbf29d3a2e49e482d5267311798aec42f00e88f3? I cannot find this > commit. > Sorry, I should have mentioned that the commit ID is of the libbpf mirror: https://github.com/libbpf/libbpf/commit/a1bd8104a9f1c1a5b9cd0f698c886296749a0ce9 > > causing this problem, and removing the NLM_F_EXCL resolves the issue. > > Is this the expected behavior and I'm doing something wrong? > > -- > Kartikeya