• N
    i40e: initialize ITRN registers with correct values · 2dcd9beb
    Nicholas Nunley 提交于
    [ Upstream commit 998e5166e604fd37afe94352f7b8c2d816b11049 ]
    
    Since commit 92418fb1 ("i40e/i40evf: Use usec value instead of reg
    value for ITR defines") the driver tracks the interrupt throttling
    intervals in single usec units, although the actual ITRN/ITR0 registers are
    programmed in 2 usec units. Most register programming flows in the driver
    correctly handle the conversion, although it is currently not applied when
    the registers are initialized to their default values. Most of the time
    this doesn't present a problem since the default values are usually
    immediately overwritten through the standard adaptive throttling mechanism,
    or updated manually by the user, but if adaptive throttling is disabled and
    the interval values are left alone then the incorrect value will persist.
    
    Since the intended default interval of 50 usecs (vs. 100 usecs as
    programmed) performs better for most traffic workloads, this can lead to
    performance regressions.
    
    This patch adds the correct conversion when writing the initial values to
    the ITRN registers.
    Signed-off-by: NNicholas Nunley <nicholas.d.nunley@intel.com>
    Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
    Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
    Signed-off-by: NSasha Levin <sashal@kernel.org>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    2dcd9beb
i40e_main.c 401.9 KB