On Wed, 30 Jan 2019 18:26:53 -0800 Jakub Kicinski <jakub.kicin...@netronome.com> wrote:
> On Wed, 30 Jan 2019 20:08:59 +0100, Jesper Dangaard Brouer wrote: > > > I'll post a v5 with libbpf_strerror() usage when bpf_set_link_xdp_fd > > > failed in > > > samples but at this point it will only give us a standard "device or > > > resource > > > busy" error > > > > That is a good first iteration improvement. And if QA complains, I can > > quickly diagnose and explain the issue, based on this generic message, > > without digging further and wasting more time. > > > > > , so if we need some more meaningful message that libbpf will give > > > us then I guess we need to define a new libbpf_errno entry (as well as > > > entry in > > > libbpf_strerror_table for this new errno value) and set the errno in > > > bpf_set_link_xdp_fd in case of a failure? > > > > It likely require more work do provide more meaningful messages, and I > > guess it is out-of-scope for your patchset. > > Perhaps we could put the error message in extack instead? That is actually a good idea, for providing these more meaningful messages. --Jesper