Currently meter algorithms only supports bytes per second(BPS).
Check packet_mode set to TRUE are rejected.
Signed-off-by: Li Zhang <lizh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
NULL,
"Metering alg not supported");
+ /* Not support packet mode, just support byte mode. */
+ if (profile->packet_mode)
+ return -rte_mtr_error_set(error,
+ EINVAL,
+ RTE_MTR_ERROR_TYPE_METER_PROFILE_PACKET_MODE,
+ NULL,
+ "Meter packet mode not supported");
+
return 0;
}