net/mlx5e: Get or put meter by the index of tc police action
Add functions to create and destroy flow meter aso object. This object only supports the range allocation. 64 objects are allocated at a time, and there are two meters in each object. Usually only one meter is allocated for a flow, so bitmap is used to manage these 128 meters. TC police action is mapped to hardware meter. As the index is unique for each police action, add APIs to allocate or free hardware meter by the index. If the meter is already created, increment its refcnt, otherwise create new one. If police action has different parameters, update hardware meter accordingly. Signed-off-by: Jianbo Liu <jianbol@nvidia.com> Reviewed-by: Roi Dayan <roid@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Please register or sign in to comment