]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
IB/mlx4: Add RoCE/IB dedicated counters
authorEran Ben Elisha <eranbe@mellanox.com>
Mon, 15 Jun 2015 14:59:03 +0000 (17:59 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Jun 2015 00:23:02 +0000 (17:23 -0700)
commitc3abb51bdb0eb08500856ef897ec1ceab8711d95
tree2046444e4c706ff4939ead5df5bff02f94084418
parent6de5f7f6a1fa2288552d46b3effbb6d5571413e5
IB/mlx4: Add RoCE/IB dedicated counters

This is an infrastructure step to attach all the QPs opened from the
IB driver to a counter in order to collect VF stats from the PF using
those counters.

If the port's type is Ethernet, the counter policy demands two counters
per port (one for RoCE and one for Ethernet). The port default counter
(allocated in mlx4_core) is used for the Ethernet netdev QPs and we
allocate another counter for RoCE.

If the port's traffic is Infiniband, the counter policy demands
one counter per port, so it can use the port's default counter.

Also, Add 'allocated' flag for each counter in order to clean it at
unload.

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>
drivers/infiniband/hw/mlx4/mad.c
drivers/infiniband/hw/mlx4/main.c
drivers/infiniband/hw/mlx4/mlx4_ib.h
drivers/infiniband/hw/mlx4/qp.c