RDMA/mlx5: Refactor MR descriptors allocation
authorMax Gurtovoy <maxg@mellanox.com>
Tue, 11 Jun 2019 15:52:57 +0000 (18:52 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 24 Jun 2019 14:49:28 +0000 (11:49 -0300)
commit7796d2a3bb4037f9c51b8d91d059f1d690ed301f
tree8ba1512ce227ff4a421cc46a81647c564ecaf20a
parent2563e2f30acb4c914fc475331e476fa920eb4245
RDMA/mlx5: Refactor MR descriptors allocation

Improve code readability using static helpers for each memory region
type. Re-use the common logic to get smaller functions that are easy
to maintain and reduce code duplication.

Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/mr.c