diff options
author | Erez Alfasi <ereza@mellanox.com> | 2019-10-16 09:23:07 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-10-22 15:22:47 -0300 |
commit | e1b95ae0b0ea4987afca73d1dc71dfc0b8ad4e49 (patch) | |
tree | 97c2ce3e92a923a4e9ea04768b1fb8c0d6e95895 /drivers/infiniband/hw/mlx5/mlx5_ib.h | |
parent | RDMA/nldev: Allow different fill function per resource (diff) | |
download | linux-dev-e1b95ae0b0ea4987afca73d1dc71dfc0b8ad4e49.tar.xz linux-dev-e1b95ae0b0ea4987afca73d1dc71dfc0b8ad4e49.zip |
RDMA/mlx5: Return ODP type per MR
Provide an ODP explicit/implicit type as part of 'rdma -dd resource show
mr' dump.
For example:
$ rdma -dd resource show mr
dev mlx5_0 mrn 1 rkey 0xa99a lkey 0xa99a mrlen 50000000
pdn 9 pid 7372 comm ibv_rc_pingpong drv_odp explicit
For non-ODP MRs, we won't print "drv_odp ..." at all.
Link: https://lore.kernel.org/r/20191016062308.11886-4-leon@kernel.org
Signed-off-by: Erez Alfasi <ereza@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/mlx5_ib.h')
-rw-r--r-- | drivers/infiniband/hw/mlx5/mlx5_ib.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h index 5aae05ebf64b..a0ca1ef16e4e 100644 --- a/drivers/infiniband/hw/mlx5/mlx5_ib.h +++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h @@ -626,6 +626,7 @@ struct mlx5_ib_mr { struct mlx5_async_work cb_work; atomic_t num_pending_prefetch; struct ib_odp_counters odp_stats; + bool is_odp_implicit; }; static inline bool is_odp_mr(struct mlx5_ib_mr *mr) @@ -1339,6 +1340,8 @@ struct mlx5_core_dev *mlx5_ib_get_native_port_mdev(struct mlx5_ib_dev *dev, u8 *native_port_num); void mlx5_ib_put_native_port_mdev(struct mlx5_ib_dev *dev, u8 port_num); +int mlx5_ib_fill_res_entry(struct sk_buff *msg, + struct rdma_restrack_entry *res); #if IS_ENABLED(CONFIG_INFINIBAND_USER_ACCESS) int mlx5_ib_devx_create(struct mlx5_ib_dev *dev, bool is_user); |