diff options
author | Emil Tantilov <emil.s.tantilov@intel.com> | 2014-11-07 20:39:20 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2014-11-20 17:21:31 -0500 |
commit | ec62fe264110a021336de20e400bc778a4111f60 (patch) | |
tree | c8c5d77f114aa87c375dd2b3b5c240caf160ac4f /drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | |
parent | bafa578fdfb2e9861dcaf7d9863e1265aff226c9 (diff) |
ixgbevf: Test Rx status bits directly out of the descriptor
Instead of keeping a local copy of the status bits from the descriptor
we can just read them directly - this is accomplished with the addition
of ixgbevf_test_staterr().
In addition instead of doing a byteswap on the status bits value, we
can byteswap the constant values we are testing since that can be done
at compile time which should help to improve performance on big-endian
systems.
CC: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbevf/ixgbevf.h')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h index ba96cb5b886d..5f7d2f3c738d 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | |||
@@ -307,6 +307,13 @@ static inline bool ixgbevf_qv_disable(struct ixgbevf_q_vector *q_vector) | |||
307 | ((_eitr) ? (1000000000 / ((_eitr) * 256)) : 8) | 307 | ((_eitr) ? (1000000000 / ((_eitr) * 256)) : 8) |
308 | #define EITR_REG_TO_INTS_PER_SEC EITR_INTS_PER_SEC_TO_REG | 308 | #define EITR_REG_TO_INTS_PER_SEC EITR_INTS_PER_SEC_TO_REG |
309 | 309 | ||
310 | /* ixgbevf_test_staterr - tests bits in Rx descriptor status and error fields */ | ||
311 | static inline __le32 ixgbevf_test_staterr(union ixgbe_adv_rx_desc *rx_desc, | ||
312 | const u32 stat_err_bits) | ||
313 | { | ||
314 | return rx_desc->wb.upper.status_error & cpu_to_le32(stat_err_bits); | ||
315 | } | ||
316 | |||
310 | static inline u16 ixgbevf_desc_unused(struct ixgbevf_ring *ring) | 317 | static inline u16 ixgbevf_desc_unused(struct ixgbevf_ring *ring) |
311 | { | 318 | { |
312 | u16 ntc = ring->next_to_clean; | 319 | u16 ntc = ring->next_to_clean; |