i40e: simplify txd use count calculation
authorMitch Williams <mitch.a.williams@intel.com>
Tue, 8 Nov 2016 21:05:14 +0000 (13:05 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 7 Dec 2016 04:40:50 +0000 (20:40 -0800)
commit4293d5f528b5a0a1b0c1b0c6eb522366822a965a
treed92287000acfb297f751aab0a6156595124663d9
parent7ec9ba11b046b4b7fd768c366870ada60d409295
i40e: simplify txd use count calculation

The i40e_txd_use_count function was fast but confusing. In the comments,
it even admits that it's ugly. So replace it with a new function that is
(very) slightly faster and has extensive commenting to help the thicker
among us (including the author, who will forget in a week) understand
how it works.

Change-ID: Ifb533f13786a0bf39cb29f77969a5be2c83d9a87
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.h
drivers/net/ethernet/intel/i40evf/i40e_txrx.h