diff options
| author | Jason Gunthorpe <[email protected]> | 2021-06-11 16:00:20 +0000 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2021-06-16 23:58:29 +0000 |
| commit | 4b5f4d3fb40898a9f2ccf58030e69ea11fbd6eed (patch) | |
| tree | a191b8ab07bb64e542a5c27f37dddc2b58766634 /drivers/infiniband/core/counters.c | |
| parent | RDMA/rxe: Disallow MR dereg and invalidate when bound (diff) | |
| download | kernel-4b5f4d3fb40898a9f2ccf58030e69ea11fbd6eed.tar.gz kernel-4b5f4d3fb40898a9f2ccf58030e69ea11fbd6eed.zip | |
RDMA: Split the alloc_hw_stats() ops to port and device variants
This is being used to implement both the port and device global stats,
which is causing some confusion in the drivers. For instance EFA and i40iw
both seem to be misusing the device stats.
Split it into two ops so drivers that don't support one or the other can
leave the op NULL'd, making the calling code a little simpler to
understand.
Link: https://lore.kernel.org/r/1955c154197b2a159adc2dc97266ddc74afe420c.1623427137.git.leonro@nvidia.com
Tested-by: Gal Pressman <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'drivers/infiniband/core/counters.c')
| -rw-r--r-- | drivers/infiniband/core/counters.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/core/counters.c b/drivers/infiniband/core/counters.c index 15493357cfef..df9e6c5e4ddf 100644 --- a/drivers/infiniband/core/counters.c +++ b/drivers/infiniband/core/counters.c @@ -605,10 +605,10 @@ void rdma_counter_init(struct ib_device *dev) port_counter->mode.mode = RDMA_COUNTER_MODE_NONE; mutex_init(&port_counter->lock); - if (!dev->ops.alloc_hw_stats) + if (!dev->ops.alloc_hw_port_stats) continue; - port_counter->hstats = dev->ops.alloc_hw_stats(dev, port); + port_counter->hstats = dev->ops.alloc_hw_port_stats(dev, port); if (!port_counter->hstats) goto fail; } |
