]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ice: return correct error code from ice_aq_sw_rules
authorKiran Patil <kiran.patil@intel.com>
Mon, 13 Jul 2020 20:53:08 +0000 (13:53 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 29 Jul 2020 15:38:55 +0000 (08:38 -0700)
commitca1fdb885e5fe794a2f6171f9b7c7c064a461486
tree385e600a5fd729102f9a050821c436814f8d1f6d
parenta54a0b24f4f5a361abaf1c0e6591c57816d4cfa7
ice: return correct error code from ice_aq_sw_rules

Return ICE_ERR_DOES_NOT_EXIST return code if admin command error code is
ICE_AQ_RC_ENOENT (not exist). ice_aq_sw_rules is used when switch
rule is getting added/deleted/updated. In case of delete/update
switch rule, admin command can return ICE_AQ_RC_ENOENT error code
if such rule does not exist, hence return ICE_ERR_DOES_NOT_EXIST error
code from ice_aq_sw_rule, so that caller of this function can decide
how to handle ICE_ERR_DOES_NOT_EXIST.

Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_switch.c