Skip to content

Commit

Permalink
i40e: enable packet split only when IOMMU present
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mitch Williams authored and Jeff Kirsher committed Feb 25, 2015
1 parent 0e88898 commit 2bc7ee8
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/intel/i40e/i40e.h
Original file line number Diff line number Diff line change
@@ -36,6 +36,7 @@
#include <linux/aer.h>
#include <linux/netdevice.h>
#include <linux/ioport.h>
#include <linux/iommu.h>
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/string.h>
8 changes: 6 additions & 2 deletions drivers/net/ethernet/intel/i40e/i40e_main.c
Original file line number Diff line number Diff line change
@@ -7279,8 +7279,12 @@ static int i40e_sw_init(struct i40e_pf *pf)
/* Set default capability flags */
pf->flags = I40E_FLAG_RX_CSUM_ENABLED |
I40E_FLAG_MSI_ENABLED |
I40E_FLAG_MSIX_ENABLED |
I40E_FLAG_RX_PS_ENABLED;
I40E_FLAG_MSIX_ENABLED;

if (iommu_present(&pci_bus_type))
pf->flags |= I40E_FLAG_RX_PS_ENABLED;
else
pf->flags |= I40E_FLAG_RX_1BUF_ENABLED;

/* Set default ITR */
pf->rx_itr_default = I40E_ITR_DYNAMIC | I40E_ITR_RX_DEF;

0 comments on commit 2bc7ee8

Please sign in to comment.