i40e/i40evf: Clean-up of bits related to using q_vector->reg_idx
authorAlexander Duyck <alexander.h.duyck@intel.com>
Fri, 29 Dec 2017 13:50:44 +0000 (08:50 -0500)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 12 Feb 2018 18:54:25 +0000 (10:54 -0800)
commit8b99b1179c27958f51ecfc489af5f459f9408d96
tree59b2e84afbe799b20ded2085a5e889eb8f8d7d19
parentfe09ed0ee1f57a818e4d7e41b25f16744487e678
i40e/i40evf: Clean-up of bits related to using q_vector->reg_idx

This patch is a further clean-up related to the change over to using
q_vector->reg_idx when accessing the ITR registers. Specifically the code
appears to have several other spots where we were computing the register
offset manually and this resulted in errors in a few spots.

Specifically in the i40evf functions for mapping queues to vectors it
appears we may have had an off by 1 error since (v_idx - 1) for the first
q_vector with an index of 0 would result in us returning -1 if I am not
mistaken.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
drivers/net/ethernet/intel/i40evf/i40evf_main.c