[dpdk-dev] [PATCH v3 3/4] net/softnic: check meter packet mode

Dumitrescu, Cristian cristian.dumitrescu at intel.com
Mon Apr 12 21:24:28 CEST 2021



> -----Original Message-----
> From: Li Zhang <lizh at nvidia.com>
> Sent: Saturday, April 10, 2021 8:25 AM
> To: dekelp at nvidia.com; orika at nvidia.com; viacheslavo at nvidia.com;
> matan at nvidia.com; shahafs at nvidia.com; Dumitrescu, Cristian
> <cristian.dumitrescu at intel.com>; lironh at marvell.com; Singh, Jasvinder
> <jasvinder.singh at intel.com>
> Cc: dev at dpdk.org; thomas at monjalon.net; rasland at nvidia.com;
> roniba at nvidia.com
> Subject: [PATCH v3 3/4] net/softnic: check meter packet mode
> 
> Currently meter algorithms only supports bytes per second(BPS).
> Check packet_mode set to TRUE are rejected.
> 
> Signed-off-by: Li Zhang <lizh at nvidia.com>
> Acked-by: Matan Azrad <matan at nvidia.com>
> ---
>  drivers/net/softnic/rte_eth_softnic_meter.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/net/softnic/rte_eth_softnic_meter.c
> b/drivers/net/softnic/rte_eth_softnic_meter.c
> index 2a05a85cdb..046e629f17 100644
> --- a/drivers/net/softnic/rte_eth_softnic_meter.c
> +++ b/drivers/net/softnic/rte_eth_softnic_meter.c
> @@ -107,6 +107,14 @@ meter_profile_check(struct rte_eth_dev *dev,
>  			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;
>  }
> 
> --
> 2.21.0

Acked-by: Cristian Dumitrescu <cristian.dumitrescu at intel.com>



More information about the dev mailing list