diff options
author | Mike Marciniszyn <mike.marciniszyn@intel.com> | 2017-10-23 15:06:08 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-10-30 19:51:36 +0100 |
commit | 1b311f8931cfe5b678c43904cb6f838489afdc0f (patch) | |
tree | ad38c81bce0f4b08688bbdab36de92bd4963cd3c /drivers/infiniband/hw/hfi1/init.c | |
parent | IB/hfi1: Validate PKEY for incoming GSI MAD packets (diff) | |
download | linux-1b311f8931cfe5b678c43904cb6f838489afdc0f.tar.xz linux-1b311f8931cfe5b678c43904cb6f838489afdc0f.zip |
IB/hfi1: Add tx_opcode_stats like the opcode_stats
This patch adds tx_opcode_stats to parallel the
(rx)opcode_stats in the debugfs.
Reviewed-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/init.c')
-rw-r--r-- | drivers/infiniband/hw/hfi1/init.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hfi1/init.c b/drivers/infiniband/hw/hfi1/init.c index b5c2efce73f2..f29e7a327f29 100644 --- a/drivers/infiniband/hw/hfi1/init.c +++ b/drivers/infiniband/hw/hfi1/init.c @@ -1217,6 +1217,7 @@ static void __hfi1_free_devdata(struct kobject *kobj) free_percpu(dd->int_counter); free_percpu(dd->rcv_limit); free_percpu(dd->send_schedule); + free_percpu(dd->tx_opstats); rvt_dealloc_device(&dd->verbs_dev.rdi); } @@ -1306,6 +1307,12 @@ struct hfi1_devdata *hfi1_alloc_devdata(struct pci_dev *pdev, size_t extra) goto bail; } + dd->tx_opstats = alloc_percpu(struct hfi1_opcode_stats_perctx); + if (!dd->tx_opstats) { + ret = -ENOMEM; + goto bail; + } + kobject_init(&dd->kobj, &hfi1_devdata_type); return dd; |