aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorMitch Williams <mitch.a.williams@intel.com>2015-02-06 03:52:11 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-02-25 00:13:35 -0500
commit2bc7ee8ac5439efec66fa20a8dc01c0a2b5af739 (patch)
tree7f246a4179f47ecfa258030e8e54eb60933abca3 /drivers/net/ethernet
parent0e888980a3c4f4751d0898ca9153285199224ff8 (diff)
i40e: enable packet split only when IOMMU present
When an IOMMU is in use, the packet split receive path shows a distinct advantage over the single-buffer path because it minimizes DMA mapping and unmapping. However, this is not an advantage for systems with no IOMMU. At init time, check to see if an IOMMU is enabled and enable packet split receives. Change-ID: I4f70d2e9c31bbea3dc8fd0c5734959a6e6602210 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e.h1
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c8
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 3ee730dab82d..eb6307edbdd4 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -36,6 +36,7 @@
36#include <linux/aer.h> 36#include <linux/aer.h>
37#include <linux/netdevice.h> 37#include <linux/netdevice.h>
38#include <linux/ioport.h> 38#include <linux/ioport.h>
39#include <linux/iommu.h>
39#include <linux/slab.h> 40#include <linux/slab.h>
40#include <linux/list.h> 41#include <linux/list.h>
41#include <linux/string.h> 42#include <linux/string.h>
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index bb876e310908..a8824c785b5a 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -7279,8 +7279,12 @@ static int i40e_sw_init(struct i40e_pf *pf)
7279 /* Set default capability flags */ 7279 /* Set default capability flags */
7280 pf->flags = I40E_FLAG_RX_CSUM_ENABLED | 7280 pf->flags = I40E_FLAG_RX_CSUM_ENABLED |
7281 I40E_FLAG_MSI_ENABLED | 7281 I40E_FLAG_MSI_ENABLED |
7282 I40E_FLAG_MSIX_ENABLED | 7282 I40E_FLAG_MSIX_ENABLED;
7283 I40E_FLAG_RX_PS_ENABLED; 7283
7284 if (iommu_present(&pci_bus_type))
7285 pf->flags |= I40E_FLAG_RX_PS_ENABLED;
7286 else
7287 pf->flags |= I40E_FLAG_RX_1BUF_ENABLED;
7284 7288
7285 /* Set default ITR */ 7289 /* Set default ITR */
7286 pf->rx_itr_default = I40E_ITR_DYNAMIC | I40E_ITR_RX_DEF; 7290 pf->rx_itr_default = I40E_ITR_DYNAMIC | I40E_ITR_RX_DEF;