]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
i40e/i40evf: unhide and enable to one prefena field
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Thu, 6 Mar 2014 09:02:27 +0000 (09:02 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 22 Apr 2014 03:35:42 +0000 (20:35 -0700)
The PREFENA field in the receive host memory cache (RX-HMC)
must be visible in order to be set to 1 at driver init for
best performance.

Change-ID: I16b0bcd84cf56f4b6c938201ff5e954bee5a1992
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c
drivers/net/ethernet/intel/i40e/i40e_lan_hmc.h
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40evf/i40e_lan_hmc.h

index d5d98fe2691dd6048f7edba7f6b4847076e5316d..5c341aeb5d530de5318bc8847d4c6762c3f8abc1 100644 (file)
@@ -747,6 +747,7 @@ static struct i40e_context_ele i40e_hmc_rxq_ce_info[] = {
        { I40E_HMC_STORE(i40e_hmc_obj_rxq, tphdata_ena),  1,    195 },
        { I40E_HMC_STORE(i40e_hmc_obj_rxq, tphhead_ena),  1,    196 },
        { I40E_HMC_STORE(i40e_hmc_obj_rxq, lrxqthresh),   3,    198 },
+       { I40E_HMC_STORE(i40e_hmc_obj_rxq, prefena),      1,    201 },
        { 0 }
 };
 
index 341de925a2983181a1cd7d7f18d59996fd128158..eb65fe23c4a70077e31e2546208aaeaecf93224d 100644 (file)
@@ -56,6 +56,7 @@ struct i40e_hmc_obj_rxq {
        u8  tphdata_ena;
        u8  tphhead_ena;
        u8  lrxqthresh;
+       u8  prefena;    /* NOTE: normally must be set to 1 at init */
 };
 
 /* Tx queue context data */
index 10f0f415a099394cd009458fabb6e888a52f67b6..6f1c464aba2f832ea864afe7d07613112fda6801 100644 (file)
@@ -3140,6 +3140,8 @@ static void i40e_netpoll(struct net_device *netdev)
        pf->flags &= ~I40E_FLAG_IN_NETPOLL;
 }
 #endif
+       /* set the prefena field to 1 because the manual says to */
+       rx_ctx.prefena = 1;
 
 /**
  * i40e_vsi_control_tx - Start or stop a VSI's rings
index 17e42ca26d0ba045fc51a0efd1ec0b1af0fffd71..775fcb2463d7f4e0ffbef124ed717958a12ffbec 100644 (file)
@@ -53,6 +53,7 @@ struct i40e_hmc_obj_rxq {
        u8  tphdata_ena;
        u8  tphhead_ena;
        u8  lrxqthresh;
+       u8  prefena;    /* NOTE: normally must be set to 1 at init */
 };
 
 /* Tx queue context data */