diff options
author | Oz Shlomo <ozsh@nvidia.com> | 2023-02-12 16:25:20 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-02-14 13:00:01 +0300 |
commit | 2b68d659a704abaa61fb3255776b5483bdc4eb35 (patch) | |
tree | 96f4a2990f970246a9c1cc515fcfa8a0d09f2a72 /include | |
parent | d13674b1d14c68339173db5dd39c4ab0949234e7 (diff) | |
download | linux-2b68d659a704abaa61fb3255776b5483bdc4eb35.tar.xz |
net/mlx5e: TC, support per action stats
Extend the action stats callback implementation to update stats for actions
that are associated with hw counters.
Note that the callback may be called from tc action utility or from tc
flower. Both apis expect the driver to return the stats difference from
the last update. As such, query the raw counter value and maintain
the diff from the last api call in the tc layer, instead of the fs_core
layer.
Signed-off-by: Oz Shlomo <ozsh@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mlx5/fs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mlx5/fs.h b/include/linux/mlx5/fs.h index ba6958b49a8e..90a2fe5839fa 100644 --- a/include/linux/mlx5/fs.h +++ b/include/linux/mlx5/fs.h @@ -296,6 +296,8 @@ void mlx5_fc_destroy(struct mlx5_core_dev *dev, struct mlx5_fc *counter); u64 mlx5_fc_query_lastuse(struct mlx5_fc *counter); void mlx5_fc_query_cached(struct mlx5_fc *counter, u64 *bytes, u64 *packets, u64 *lastuse); +void mlx5_fc_query_cached_raw(struct mlx5_fc *counter, + u64 *bytes, u64 *packets, u64 *lastuse); int mlx5_fc_query(struct mlx5_core_dev *dev, struct mlx5_fc *counter, u64 *packets, u64 *bytes); u32 mlx5_fc_id(struct mlx5_fc *counter); |