aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/bnxt_re/main.c
diff options
context:
space:
mode:
authorSomnath Kotur <somnath.kotur@broadcom.com>2017-08-02 01:46:19 -0700
committerDoug Ledford <dledford@redhat.com>2017-08-18 15:08:30 -0400
commit225937d6ccff3ba49b7065672ce35f21465aaeb9 (patch)
tree4b68df36ba290b4a98894522afd31efb67d04292 /drivers/infiniband/hw/bnxt_re/main.c
parentRDMA/bnxt_re: Allocate multiple notification queues (diff)
downloadlinux-dev-225937d6ccff3ba49b7065672ce35f21465aaeb9.tar.xz
linux-dev-225937d6ccff3ba49b7065672ce35f21465aaeb9.zip
RDMA/bnxt_re: Implement the alloc/get_hw_stats callback
Expose HW counters using the get_hw_stats callback Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/bnxt_re/main.c')
-rw-r--r--drivers/infiniband/hw/bnxt_re/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
index 5b78d8fc28dc..82d1cbc27aee 100644
--- a/drivers/infiniband/hw/bnxt_re/main.c
+++ b/drivers/infiniband/hw/bnxt_re/main.c
@@ -64,6 +64,8 @@
#include "ib_verbs.h"
#include <rdma/bnxt_re-abi.h>
#include "bnxt.h"
+#include "hw_counters.h"
+
static char version[] =
BNXT_RE_DESC " v" ROCE_DRV_MODULE_VERSION "\n";
@@ -513,6 +515,8 @@ static int bnxt_re_register_ib(struct bnxt_re_dev *rdev)
ibdev->alloc_ucontext = bnxt_re_alloc_ucontext;
ibdev->dealloc_ucontext = bnxt_re_dealloc_ucontext;
ibdev->mmap = bnxt_re_mmap;
+ ibdev->get_hw_stats = bnxt_re_ib_get_hw_stats;
+ ibdev->alloc_hw_stats = bnxt_re_ib_alloc_hw_stats;
return ib_register_device(ibdev, NULL);
}