Draft: CNB: xsk: Add batched buffer allocation API for the pool
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2074113
Tested: N/A
This patch set introduces a batched interface for Rx buffer allocation in AF_XDP buffer pool. Instead of using xsk_buff_alloc(*pool)
, drivers can now use xsk_buff_alloc_batch(*pool, **xdp_buff_array, max)
. Instead of returning a pointer to an xdp_buff
, it returns the number of xdp_buffs it managed to allocate up to the maximum value of the max parameter in the function call. Pointers to the allocated xdp_buff:s
are put in the xdp_buff_array
supplied in the call. This could be a SW ring that already exists in the driver or a new structure that the driver has allocated.
Signed-off-by: Ivan Vecera ivecera@redhat.com
Edited by Ivan Vecera