2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/arch
Mingming Cao 2094200b5f ibmveth: Add multi buffers rx replenishment hcall support
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 <mmc@linux.ibm.com>
Reviewed-by: Brian King <bjking1@linux.ibm.com>
Reviewed-by: Haren Myneni <haren@linux.ibm.com>
Reviewed-by: Dave Marquardt <davemarq@linux.ibm.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250719091356.57252-1-mmc@linux.ibm.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-07-22 15:08:23 +02:00
..
alpha af_unix: Introduce SO_INQ. 2025-07-08 18:05:25 -07:00
arc ARC fixes for 6.16 2025-06-12 08:17:56 -07:00
arm netfilter: conntrack: remove DCCP protocol support 2025-07-03 13:51:39 +02:00
arm64 soc: fixes for 6.16, part 2 2025-07-15 09:26:33 -07:00
csky mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
hexagon mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
loongarch netfilter pull request 25-07-10 2025-07-10 18:18:41 -07:00
m68k netfilter: conntrack: remove DCCP protocol support 2025-07-03 13:51:39 +02:00
microblaze mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
mips netfilter pull request 25-07-10 2025-07-10 18:18:41 -07:00
nios2 mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
openrisc mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
parisc af_unix: Introduce SO_INQ. 2025-07-08 18:05:25 -07:00
powerpc ibmveth: Add multi buffers rx replenishment hcall support 2025-07-22 15:08:23 +02:00
riscv riscv: cpu_ops_sbi: Use static array for boot_data 2025-06-30 06:58:11 +00:00
s390 netfilter pull request 25-07-10 2025-07-10 18:18:41 -07:00
sh netfilter: conntrack: remove DCCP protocol support 2025-07-03 13:51:39 +02:00
sparc af_unix: Introduce SO_INQ. 2025-07-08 18:05:25 -07:00
um um: vector: Reduce stack usage in vector_eth_configure() 2025-06-25 09:28:17 +02:00
x86 - Update Kirill's email address 2025-07-13 10:41:19 -07:00
xtensa mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
.gitignore
Kconfig fs/resctrl: Add boiler plate for external resctrl code 2025-05-16 11:05:40 +02:00