OSDN Git Service

ice: Refactor get/set RSS LUT to use struct parameter
authorBrett Creeley <brett.creeley@intel.com>
Tue, 2 Mar 2021 18:15:35 +0000 (10:15 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 31 Mar 2021 21:21:28 +0000 (14:21 -0700)
commite3c53928a3b2b3ec983955a838547aa7344822be
treef6dce2efb88724afc5dd3ec32a12c5878ed6d030
parent8134d5ff9788d3e7f63f963a211927a60ce462d6
ice: Refactor get/set RSS LUT to use struct parameter

Update ice_aq_get_rss_lut() and ice_aq_set_rss_lut() to take a new
structure ice_aq_get_set_rss_params instead of passing individual
parameters. This is done for 2 reasons:

1. Reduce the number of parameters passed to the functions.
2. Reduce the amount of change required if the arguments ever need to be
   updated in the future.

Also, reduce duplicate code that was checking for an invalid vsi_handle
and lut parameter by moving the checks to the lower level
__ice_aq_get_set_rss_lut().

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_common.c
drivers/net/ethernet/intel/ice/ice_common.h
drivers/net/ethernet/intel/ice/ice_ethtool.c
drivers/net/ethernet/intel/ice/ice_lib.c
drivers/net/ethernet/intel/ice/ice_main.c
drivers/net/ethernet/intel/ice/ice_type.h