Re: [PATCH v3 3/4] libbpf: add bpf_prog_test_run_xattr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 26, 2018 at 4:45 AM Lorenz Bauer <lmb@xxxxxxxxxxxxxx> wrote:
>
> That's what I had initially, but that makes re-using test_attr really
> awkward. Either
> you need to reset data_out_size before every call because it is used
> to return the
> buffer size,

I think that is exactly what the user of the interface would want to do.
Why would anyone keep reusing the same test_attr on multiple calls
into the kernel without changing the fields?

> It also means
> we can't take a const struct attr, which is contrary to the other
> xattr functions which
> already exist.

I don't see an issue with that.

> I think actually inspecting the required size of the output buffer
> will be a rare
> occurrence, so making the user jump through the hoop of a pointer doesn't seem
> too onerous.

I think the opposite is the case.
If the output buffer is provided the test will be comparing it
to expected value.



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux