+ if (!priv->sh->meter_aso_en && fmp->profile.packet_mode)
+ return -rte_mtr_error_set(error, ENOTSUP,
+ RTE_MTR_ERROR_TYPE_METER_PROFILE,
+ NULL, "Metering algorithm packet mode not supported.");
+ if (priv->sh->meter_aso_en && fmp->profile.packet_mode) {
+ cir = fmp->profile.srtcm_rfc2697.cir <<
+ MLX5_MTRS_PPS_MAP_BPS_SHIFT;
+ cbs = fmp->profile.srtcm_rfc2697.cbs <<
+ MLX5_MTRS_PPS_MAP_BPS_SHIFT;
+ ebs = fmp->profile.srtcm_rfc2697.ebs <<
+ MLX5_MTRS_PPS_MAP_BPS_SHIFT;
+ } else {
+ cir = fmp->profile.srtcm_rfc2697.cir;
+ cbs = fmp->profile.srtcm_rfc2697.cbs;
+ ebs = fmp->profile.srtcm_rfc2697.ebs;
+ }