i40e: reduce lrxqthresh from 2 to 1

The lrxq thresh value tells hardware to immediately interrupt when there
are fewer than N*64 packets left in the ring.

Counter intuitively, empirical testing has shown that decreasing this
value from 2 to 1, and thus changing from an immediate interrupt at
fewer than 128 descriptors down to 64 descriptors causes a small
increase in the maximum total packets per second we can receive. This
increase occurs even when we're polling with interrupts masked, as the
hardware must still handle interrupts internally even if we've disabled
them in software.

Also reduce the value for any VFs we allocate.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
Jacob Keller 2017-09-07 08:05:50 -04:00 committed by Jeff Kirsher
parent dbadbbe235
commit 7362be9eee
2 changed files with 2 additions and 2 deletions

View File

@ -3030,7 +3030,7 @@ static int i40e_configure_rx_ring(struct i40e_ring *ring)
if (hw->revision_id == 0) if (hw->revision_id == 0)
rx_ctx.lrxqthresh = 0; rx_ctx.lrxqthresh = 0;
else else
rx_ctx.lrxqthresh = 2; rx_ctx.lrxqthresh = 1;
rx_ctx.crcstrip = 1; rx_ctx.crcstrip = 1;
rx_ctx.l2tsel = 1; rx_ctx.l2tsel = 1;
/* this controls whether VLAN is stripped from inner headers */ /* this controls whether VLAN is stripped from inner headers */

View File

@ -639,7 +639,7 @@ static int i40e_config_vsi_rx_queue(struct i40e_vf *vf, u16 vsi_id,
rx_ctx.dsize = 1; rx_ctx.dsize = 1;
/* default values */ /* default values */
rx_ctx.lrxqthresh = 2; rx_ctx.lrxqthresh = 1;
rx_ctx.crcstrip = 1; rx_ctx.crcstrip = 1;
rx_ctx.prefena = 1; rx_ctx.prefena = 1;
rx_ctx.l2tsel = 1; rx_ctx.l2tsel = 1;