[dpdk-dev] [PATCH v9 1/2] ethdev: add pre-defined meter policy API

Asaf Penso asafp at nvidia.com
Tue Apr 20 14:55:04 CEST 2021


Thank you, Cristian, appreciate this extra effort!

Regards,
Asaf Penso

>-----Original Message-----
>From: dev <dev-bounces at dpdk.org> On Behalf Of Dumitrescu, Cristian
>Sent: Tuesday, April 20, 2021 2:18 PM
>To: Jiawei(Jonny) Wang <jiaweiw at nvidia.com>; Matan Azrad
><matan at nvidia.com>; Ori Kam <orika at nvidia.com>; Slava Ovsiienko
><viacheslavo at nvidia.com>; Shahaf Shuler <shahafs at nvidia.com>; Wisam
>Monther <wisamm at nvidia.com>; Li, Xiaoyun <xiaoyun.li at intel.com>; Singh,
>Jasvinder <jasvinder.singh at intel.com>; NBU-Contact-Thomas Monjalon
><thomas at monjalon.net>; Yigit, Ferruh <ferruh.yigit at intel.com>; Andrew
>Rybchenko <andrew.rybchenko at oktetlabs.ru>; Ray Kinsella
><mdr at ashroe.eu>; Neil Horman <nhorman at tuxdriver.com>
>Cc: dev at dpdk.org; Raslan Darawsheh <rasland at nvidia.com>; Roni Bar Yanai
><roniba at nvidia.com>; Li Zhang <lizh at nvidia.com>; Haifei Luo
><haifeil at nvidia.com>
>Subject: Re: [dpdk-dev] [PATCH v9 1/2] ethdev: add pre-defined meter policy
>API
>
>
>
>> -----Original Message-----
>> From: Jiawei Wang <jiaweiw at nvidia.com>
>> Sent: Monday, April 19, 2021 5:08 PM
>> To: matan at nvidia.com; orika at nvidia.com; viacheslavo at nvidia.com;
>> shahafs at nvidia.com; Wisam Jaddo <wisamm at nvidia.com>; Li, Xiaoyun
>> <xiaoyun.li at intel.com>; Singh, Jasvinder <jasvinder.singh at intel.com>;
>> Dumitrescu, Cristian <cristian.dumitrescu at intel.com>; Thomas Monjalon
>> <thomas at monjalon.net>; Yigit, Ferruh <ferruh.yigit at intel.com>; Andrew
>> Rybchenko <andrew.rybchenko at oktetlabs.ru>; Ray Kinsella
>> <mdr at ashroe.eu>; Neil Horman <nhorman at tuxdriver.com>
>> Cc: dev at dpdk.org; rasland at nvidia.com; roniba at nvidia.com; Li Zhang
>> <lizh at nvidia.com>; Haifei Luo <haifeil at nvidia.com>
>> Subject: [PATCH v9 1/2] ethdev: add pre-defined meter policy API
>>
>> From: Li Zhang <lizh at nvidia.com>
>>
>> Currently, the flow meter policy does not support multiple actions per
>> color; also the allowed action types per color are very limited.
>> In addition, the policy cannot be pre-defined.
>>
>> Due to the growing in flow actions offload abilities there is a
>> potential for the user to use variety of actions per color differently.
>> This new meter policy API comes to allow this potential in the most
>> ethdev common way using rte_flow action definition.
>> A list of rte_flow actions will be provided by the user per color in
>> order to create a meter policy.
>> In addition, the API forces to pre-define the policy before the meters
>> creation in order to allow sharing of single policy with multiple
>> meters efficiently.
>>
>> meter_policy_id is added into struct rte_mtr_params.
>> So that it can get the policy during the meters creation.
>>
>> Allow coloring the packet using a new rte_flow_action_color as could
>> be done by the old policy API.
>>
>> Add two common policy template as macros in the head file.
>>
>> The next API function were added:
>> - rte_mtr_meter_policy_add
>> - rte_mtr_meter_policy_delete
>> - rte_mtr_meter_policy_update
>> - rte_mtr_meter_policy_validate
>> The next struct was changed:
>> - rte_mtr_params
>> - rte_mtr_capabilities
>> The next API was deleted:
>> - rte_mtr_policer_actions_update
>>
>> To support this API the following app were changed:
>> app/test-flow-perf: clean meter policer
>> app/testpmd: clean meter policer
>>
>> To support this API the following drivers were changed:
>> net/softnic: support meter policy API
>> 1. Cleans meter rte_mtr_policer_action.
>> 2. Supports policy API to get color action as policer action did.
>>    The color action will be mapped into rte_table_action_policer.
>>
>> net/mlx5: clean meter creation management Cleans and breaks part of
>> the current meter management in order to allow better design with
>> policy API.
>>
>> Signed-off-by: Li Zhang <lizh at nvidia.com>
>> Signed-off-by: Haifei Luo <haifeil at nvidia.com>
>> Signed-off-by: Jiawei Wang <jiaweiw at nvidia.com>
>> Acked-by: Matan Azrad <matan at nvidia.com>
>> Acked-by: Ray Kinsella <mdr at ashroe.eu>
>> Acked-by: Ori Kam <orika at nvidia.com>
>> Acked-by: Jasvinder Singh <jasvinder.singh at intel.com>
>
>Acked-by: Cristian Dumitrescu <cristian.dumitrescu at intel.com>



More information about the dev mailing list