If the switch/fdir/hash module can't resolve a correct parser,
it should return error.
Fixes:
47d460d63233 ("net/ice: rework switch filter")
Fixes:
efc16c621415 ("net/ice: support flow director GTPU tunnel")
Fixes:
5ad3db8d4bdd ("net/ice: enable advanced RSS")
Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
parser = &ice_fdir_parser_comms;
- else
+ else if (ad->active_pkg_type == ICE_PKG_TYPE_OS_DEFAULT)
parser = &ice_fdir_parser_os;
+ else
+ return -EINVAL;
return ice_register_parser(parser, ad);
}
parser = &ice_hash_parser_os;
else if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
parser = &ice_hash_parser_comms;
+ else
+ return -EINVAL;
return ice_register_parser(parser, ad);
}
if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
dist_parser = &ice_switch_dist_parser_comms;
- else
+ else if (ad->active_pkg_type == ICE_PKG_TYPE_OS_DEFAULT)
dist_parser = &ice_switch_dist_parser_os;
+ else
+ return -EINVAL;
if (ad->devargs.pipe_mode_support)
ret = ice_register_parser(perm_parser, ad);