]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ice: Determine descriptor count and ring size based on PAGE_SIZE
authorBrett Creeley <brett.creeley@intel.com>
Fri, 8 Feb 2019 20:50:59 +0000 (12:50 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 20 Mar 2019 00:24:03 +0000 (17:24 -0700)
commitad71b256ba4e6e469d60e3f7b9973fd195b04bee
treedbf7f86e7058939ad11fb9caa1c9a13551ead638
parent544f63d307b103d0b1e2bc25f1830d48df177031
ice: Determine descriptor count and ring size based on PAGE_SIZE

Currently we set the default number of Tx and Rx descriptors to 128 by
default. For Rx this amounts to a full page (assuming 4K pages) because
each Rx descriptor is 32 Bytes, but for Tx it only amounts to a half
page because each Tx descriptor is 16 Bytes (assuming 4K pages).
Instead of assuming 4K pages, determine the ring size and the number of
descriptors for Tx and Rx based on a calculation using the PAGE_SIZE,
ICE_MAX_NUM_DESC, and ICE_REQ_DESC_MULTIPLE. This change is being made
to improve the performance of the driver when using the default
settings.

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice.h
drivers/net/ethernet/intel/ice/ice_lib.c
drivers/net/ethernet/intel/ice/ice_txrx.c