net/mlx5: Export flow counter related API
authorRaed Salem <raeds@mellanox.com>
Thu, 31 May 2018 13:43:30 +0000 (16:43 +0300)
committerLeon Romanovsky <leonro@mellanox.com>
Sat, 2 Jun 2018 04:33:53 +0000 (07:33 +0300)
Exports counters API to be used in both IB and EN.

Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Raed Salem <raeds@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c
include/linux/mlx5/fs.h

index 276b13d7ea438541f71524e5e1ab51adac7b8bbc..4157dd76165eefb6510962d7764fa484997fdd66 100644 (file)
@@ -233,8 +233,6 @@ void mlx5_fc_queue_stats_work(struct mlx5_core_dev *dev,
                              unsigned long delay);
 void mlx5_fc_update_sampling_interval(struct mlx5_core_dev *dev,
                                      unsigned long interval);
-int mlx5_fc_query(struct mlx5_core_dev *dev, struct mlx5_fc *counter,
-                 u64 *packets, u64 *bytes);
 
 int mlx5_init_fs(struct mlx5_core_dev *dev);
 void mlx5_cleanup_fs(struct mlx5_core_dev *dev);
index f5cb3fa5d8cf2c27439e2e469135f2f98c099fa3..58af6be13dfa88a2e08d5d85dd54b3fdaeb4e4f6 100644 (file)
@@ -243,6 +243,7 @@ err_out:
 
        return ERR_PTR(err);
 }
+EXPORT_SYMBOL(mlx5_fc_create);
 
 void mlx5_fc_destroy(struct mlx5_core_dev *dev, struct mlx5_fc *counter)
 {
@@ -260,6 +261,7 @@ void mlx5_fc_destroy(struct mlx5_core_dev *dev, struct mlx5_fc *counter)
        mlx5_cmd_fc_free(dev, counter->id);
        kfree(counter);
 }
+EXPORT_SYMBOL(mlx5_fc_destroy);
 
 int mlx5_init_fc_stats(struct mlx5_core_dev *dev)
 {
@@ -317,6 +319,7 @@ int mlx5_fc_query(struct mlx5_core_dev *dev, struct mlx5_fc *counter,
 {
        return mlx5_cmd_fc_query(dev, counter->id, packets, bytes);
 }
+EXPORT_SYMBOL(mlx5_fc_query);
 
 void mlx5_fc_query_cached(struct mlx5_fc *counter,
                          u64 *bytes, u64 *packets, u64 *lastuse)
index 9f4d32e41c06916c50d01c71cd16ec4e0b0cfcc2..3b4c3298061cb64e4011c01e36c0fb165cf9f4d6 100644 (file)
@@ -186,6 +186,9 @@ struct mlx5_fc *mlx5_fc_create(struct mlx5_core_dev *dev, bool aging);
 void mlx5_fc_destroy(struct mlx5_core_dev *dev, struct mlx5_fc *counter);
 void mlx5_fc_query_cached(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);
+
 int mlx5_fs_add_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn);
 int mlx5_fs_remove_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn);