aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40e/i40e_txrx.h
diff options
context:
space:
mode:
authorJesse Brandeburg <jesse.brandeburg@intel.com>2016-04-01 03:56:06 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-04-06 18:26:23 -0700
commit1f15d66712bb64e39fe2c23b1b32f68f9e1d4ee7 (patch)
tree78c5fda55e9acd9e39164c60d3624a50c8eb3664 /drivers/net/ethernet/intel/i40e/i40e_txrx.h
parenti40e/i40evf: Drop unused tx_ring argument (diff)
downloadlinux-dev-1f15d66712bb64e39fe2c23b1b32f68f9e1d4ee7.tar.xz
linux-dev-1f15d66712bb64e39fe2c23b1b32f68f9e1d4ee7.zip
i40e/i40evf: Faster RX via avoiding FCoE
As it turns out, calling into other files from hot path hurts performance a lot. In this case the majority of the time we call "check FCoE" and the packet is *not* FCoE, but this call was taking 5% of our total cycles spent on receive. Change-ID: I080552c26e7060bc7b78504dc2763f6f0b3d8c76 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_txrx.h')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_txrx.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.h b/drivers/net/ethernet/intel/i40e/i40e_txrx.h
index 9e654e611642..77ccdde56c0c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.h
@@ -448,4 +448,14 @@ static inline bool i40e_chk_linearize(struct sk_buff *skb, int count)
return __i40e_chk_linearize(skb);
}
+
+/**
+ * i40e_rx_is_fcoe - returns true if the Rx packet type is FCoE
+ * @ptype: the packet type field from Rx descriptor write-back
+ **/
+static inline bool i40e_rx_is_fcoe(u16 ptype)
+{
+ return (ptype >= I40E_RX_PTYPE_L2_FCOE_PAY3) &&
+ (ptype <= I40E_RX_PTYPE_L2_FCOE_VFT_FCOTHER);
+}
#endif /* _I40E_TXRX_H_ */