Thread (48 messages) 48 messages, 9 authors, 2021-02-01

Re: [PATCH v5 bpf-next 02/14] xdp: initialize xdp_buff mb bit to 0 in all XDP drivers

From: Lorenzo Bianconi <hidden>
Date: 2020-12-08 10:32:38
Also in: bpf

On Mon, 2020-12-07 at 22:37 +0100, Maciej Fijalkowski wrote:
quoted
On Mon, Dec 07, 2020 at 01:15:00PM -0800, Alexander Duyck wrote:
quoted
On Mon, Dec 7, 2020 at 8:36 AM Lorenzo Bianconi <lorenzo@kernel.org
quoted
wrote:
Initialize multi-buffer bit (mb) to 0 in all XDP-capable drivers.
This is a preliminary patch to enable xdp multi-buffer support.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
I'm really not a fan of this design. Having to update every driver
in
order to initialize a field that was fragmented is a pain. At a
minimum it seems like it might be time to consider introducing some
sort of initializer function for this so that you can update things
in
one central place the next time you have to add a new field instead
of
having to update every individual driver that supports XDP.
Otherwise
this isn't going to scale going forward.
Also, a good example of why this might be bothering for us is a fact
that
in the meantime the dpaa driver got XDP support and this patch hasn't
been
updated to include mb setting in that driver.
something like
init_xdp_buff(hard_start, headroom, len, frame_sz, rxq);

would work for most of the drivers.
ack, agree. I will add init_xdp_buff() in v6.

Regards,
Lorenzo

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help