linux/drivers/net/ethernet/ibm
Mingming Cao 3c14917953 ibmvnic: Increase max subcrq indirect entries with fallback
POWER8 support a maximum of 16 subcrq indirect descriptor entries per
 H_SEND_SUB_CRQ_INDIRECT call, while POWER9 and newer hypervisors
 support up to 128 entries. Increasing the max number of indirect
descriptor entries improves batching efficiency and reduces
hcall overhead, which enhances throughput under large workload on POWER9+.

Currently, ibmvnic driver always uses a fixed number of max indirect
descriptor entries (16). send_subcrq_indirect() treats all hypervisor
errors the same:
 - Cleanup and Drop the entire batch of descriptors.
 - Return an error to the caller.
 - Rely on TCP/IP retransmissions to recover.
 - If the hypervisor returns H_PARAMETER (e.g., because 128
   entries are not supported on POWER8), the driver will continue
   to drop batches, resulting in unnecessary packet loss.

In this patch:
Raise the default maximum indirect entries to 128 to improve ibmvnic
batching on morden platform. But also gracefully fall back to
16 entries for Power 8 systems.

Since there is no VIO interface to query the hypervisor’s supported
limit, vnic handles send_subcrq_indirect() H_PARAMETER errors:
 - On first H_PARAMETER failure, log the failure context
 - Reduce max_indirect_entries to 16 and allow the single batch to drop.
 - Subsequent calls automatically use the correct lower limit,
    avoiding repeated drops.

The goal is to  optimizes performance on modern systems while handles
falling back for older POWER8 hypervisors.

Performance shows 40% improvements with MTU (1500) on largework load.

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: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250821130215.97960-1-mmc@linux.ibm.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-08-26 09:45:50 +02:00
..
ehea net: ethernet: Switch back to struct platform_driver::remove() 2024-10-04 16:39:56 -07:00
emac net: ibm: emac: Use of_get_available_child_by_name() 2025-02-07 13:43:55 +00:00
ibmveth.c ibmveth: Add multi buffers rx replenishment hcall support 2025-07-22 15:08:23 +02:00
ibmveth.h ibmveth: Add multi buffers rx replenishment hcall support 2025-07-22 15:08:23 +02:00
ibmvnic.c ibmvnic: Increase max subcrq indirect entries with fallback 2025-08-26 09:45:50 +02:00
ibmvnic.h ibmvnic: Increase max subcrq indirect entries with fallback 2025-08-26 09:45:50 +02:00
Kconfig net: ibmveth: added KUnit tests for some buffer pool functions 2025-05-06 10:24:38 +02:00
Makefile