On Sat, Jul 19, 2025 at 05:13:56AM -0400, Mingming Cao wrote: > This patch enables batched RX buffer replenishment in ibmveth by > using the new firmware-supported h_add_logical_lan_buffers() hcall > to submit up to 8 RX buffers in a single call, instead of repeatedly > calling the single-buffer h_add_logical_lan_buffer() hcall. > > During the probe, with the patch, the driver queries ILLAN attributes > to detect IBMVETH_ILLAN_RX_MULTI_BUFF_SUPPORT bit. If the attribute is > present, rx_buffers_per_hcall is set to 8, enabling batched replenishment. > Otherwise, it defaults to 1, preserving the original upstream behavior > with no change in code flow for unsupported systems. > > The core rx replenish logic remains the same. But when batching > is enabled, the driver aggregates up to 8 fully prepared descriptors > into a single h_add_logical_lan_buffers() hypercall. If any allocation > or DMA mapping fails while preparing a batch, only the successfully > prepared buffers are submitted, and the remaining are deferred for > the next replenish cycle. > > If at runtime the firmware stops accepting the batched hcall—e,g, > after a Live Partition Migration (LPM) to a host that does not > support h_add_logical_lan_buffers(), the hypercall returns H_FUNCTION. > In that case, the driver transparently disables batching, resets > rx_buffers_per_hcall to 1, and falls back to the single-buffer hcall > in next future replenishments to take care of these and future buffers. > > Test were done on systems with firmware that both supports and > does not support the new h_add_logical_lan_buffers hcall. > > On supported firmware, this reduces hypercall overhead significantly > over multiple buffers. SAR measurements showed about a 15% improvement > in packet processing rate under moderate RX load, with heavier traffic > seeing gains more than 30% > > Signed-off-by: Mingming Cao <m...@linux.ibm.com> > Reviewed-by: Brian King <bjki...@linux.ibm.com> > Reviewed-by: Haren Myneni <ha...@linux.ibm.com> > Reviewed-by: Dave Marquardt <davem...@linux.ibm.com>
Thanks for the update. Reviewed-by: Simon Horman <ho...@kernel.org> ...