i40e: eliminate division in napi_poll data path
authorMagnus Karlsson <magnus.karlsson@intel.com>
Tue, 23 Jun 2020 09:44:17 +0000 (11:44 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 1 Jul 2020 21:27:11 +0000 (14:27 -0700)
commit4b5539c01ddf838ea6f5b67d00ee035231c8248a
tree58d71b8f7f4bef76d2fa7d921f051b3ecdb98fae
parent5574ff7b7b3d864556173bf822796593451a6b8c
i40e: eliminate division in napi_poll data path

Eliminate a division in the napi_poll data path. This division is
executed even though it is only needed in the rare case when there are
not enough interrupt lines so they have to be shared between queue
pairs. Instead, just test for this case and only execute the division
if needed. The code has been lifted from the ice driver.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c