]> www.infradead.org Git - linux-platform-drivers-x86.git/commit
ice: Check UMEM FQ size when allocating bufs
authorKrzysztof Kazimierczak <krzysztof.kazimierczak@intel.com>
Sat, 16 May 2020 00:42:20 +0000 (17:42 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 28 May 2020 01:13:59 +0000 (18:13 -0700)
commit3f0d97cdfe6e900a5c71817b0dfb77247afee36d
tree72cb627190cf8fbc388cc5d42301499ef0481d59
parent13f90b393f7338e6a2b2646fa1b677cc8b50cd23
ice: Check UMEM FQ size when allocating bufs

If a UMEM is present on a queue when an interface/queue pair is being
enabled, the driver will try to prepare the Rx buffers in advance to
improve performance. However, if fill queue is shorter than HW Rx ring,
the driver will report failure after getting the last address from the
fill queue.

This still lets the driver process the packets correctly during the NAPI
poll, but leads to a constant NAPI rescheduling. Not allocating the
buffers in advance would result in a potential performance decrease.

Commit d57d76428ae9 ("xsk: Add API to check for available entries in FQ")
provides an API that lets drivers check the number of addresses that the
fill queue holds.

Notify the user if fill queue is not long enough to prepare all buffers
before packet processing starts, and allocate the buffers during the
NAPI poll. If the fill queue size is sufficient, prepare Rx buffers in
advance.

Signed-off-by: Krzysztof Kazimierczak <krzysztof.kazimierczak@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_base.c