Subject: Re: [PATCH v14 bpf-next 00/18] mvneta: introduce XDP multi-buffer support

From: Toke Høiland-Jørgensen <[email-masked]>
Date: Wed, 29 Sep 2021 22:39:03 +0200

Jakub Kicinski <[email-masked]> writes:

> On Wed, 29 Sep 2021 11:54:46 -0700 Alexei Starovoitov wrote:
>> I'm missing something. Why do we need a separate flush() helper?
>> Can't we do:
>> char buf[64], *p;
>> p = xdp_mb_pointer(ctx, flags, off, len, buf);
>> read/write p[]
>> if (p == buf)
>>     xdp_store_bytes(ctx, off, buf, len, flags);
>
> Sure we can. That's what I meant by "leave the checking to the program".
> It's bike shedding at this point.

Yeah, let's discuss the details once we have a patch :)

-Toke