net/mlx4_core: Add helper to query counters
This is an infrastructure step for querying VF and PF counters. This code was in the IB driver, move it to the mlx4 core driver so it will be accessible for more use cases. Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com> Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
7193a141eb
commit
9616982f3f
@@ -35,6 +35,7 @@
|
||||
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/if_link.h>
|
||||
#include <linux/mlx4/device.h>
|
||||
|
||||
enum {
|
||||
/* initialization and general commands */
|
||||
@@ -300,6 +301,8 @@ static inline int mlx4_cmd_imm(struct mlx4_dev *dev, u64 in_param, u64 *out_para
|
||||
struct mlx4_cmd_mailbox *mlx4_alloc_cmd_mailbox(struct mlx4_dev *dev);
|
||||
void mlx4_free_cmd_mailbox(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox);
|
||||
|
||||
int mlx4_get_counter_stats(struct mlx4_dev *dev, int counter_index,
|
||||
struct mlx4_counter *counter_stats, int reset);
|
||||
u32 mlx4_comm_get_version(void);
|
||||
int mlx4_set_vf_mac(struct mlx4_dev *dev, int port, int vf, u64 mac);
|
||||
int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, u8 qos);
|
||||
|
Reference in New Issue
Block a user