OSDN Git Service

ice: Assume that more than one Rx queue is rare in ice_napi_poll
authorBrett Creeley <brett.creeley@intel.com>
Thu, 25 Jul 2019 08:55:29 +0000 (01:55 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 20 Aug 2019 19:28:35 +0000 (12:28 -0700)
commit9118fcd5255f6d3891c90e01edd98dfc402ac663
treebffa8b120a19fd74d09f37fef427fd17a312dd42
parentc1ddf1f5c4adc1e885dce8533b2245d979f38280
ice: Assume that more than one Rx queue is rare in ice_napi_poll

Currently we divide budget by the number of Rx queues per Rx ring
container in ice_napi_poll even if there is only 1. This is an
unnecessary divide for the normal case of 1 Rx ring per Rx ring
container. Fix this by using an unlikely() call in the case where we
actually need to divide.

Also, we will always set budget_per_ring even if there are no Rx rings
in the Rx ring container so we don't need to initialize it to 0.

Signed-off-by: Brett Creeley <brett.creeley@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_txrx.c