Re: [PATCH net-next v3 10/18] xdp: get rid of xdp_frame::mem.id

From: Toke Høiland-Jørgensen
Date: Fri Nov 01 2024 - 09:13:47 EST


Alexander Lobakin <aleksander.lobakin@xxxxxxxxx> writes:

> Initially, xdp_frame::mem.id was used to search for the corresponding
> &page_pool to return the page correctly.
> However, after that struct page now contains a direct pointer to its PP,
> further keeping of this field makes no sense. xdp_return_frame_bulk()
> still uses it to do a lookup, but this is rather a leftover.
> Remove xdp_frame::mem and replace it with ::mem_type, as only memory
> type still matters and we need to know it to be able to free the frame
> correctly.
> As a cute side effect, we can now make every scalar field in &xdp_frame
> of 4 byte width, speeding up accesses to them.
>
> Signed-off-by: Alexander Lobakin <aleksander.lobakin@xxxxxxxxx>

Reviewed-by: Toke Høiland-Jørgensen <toke@xxxxxxxxxx>