diff options
author | Dennis Dalessandro <dennis.dalessandro@intel.com> | 2016-02-03 17:15:02 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-03-10 20:37:31 -0500 |
commit | f1badc716349cc2ac6e55ad50dcff598ef97bad5 (patch) | |
tree | 4185e010c23a99fc1118971bce88afa605f66a58 /include/rdma | |
parent | d1b697b678cd591e12c493a9b91343107816cceb (diff) |
IB/rdmavt: Clean up distinction between port number and index
IB core uses 1 relative indexing for ports. All of our data structures
use 0 based indexing. Add an inline function that we can use whenever we
need to validate a legal value and try to convert a port number to a
port index at the entrance into rdmavt.
Try to follow the policy that when we are talking about a port from IB
core point of view we refer to it as a port number. When port is an
index into our arrays refer to it as a port index.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Harish Chegondi <harish.chegondi@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma')
-rw-r--r-- | include/rdma/rdma_vt.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/rdma/rdma_vt.h b/include/rdma/rdma_vt.h index 52dfa9cf8621..5d1c694a2731 100644 --- a/include/rdma/rdma_vt.h +++ b/include/rdma/rdma_vt.h | |||
@@ -256,7 +256,7 @@ struct rvt_driver_provided { | |||
256 | void (*notify_new_ah)(struct ib_device *, struct ib_ah_attr *, | 256 | void (*notify_new_ah)(struct ib_device *, struct ib_ah_attr *, |
257 | struct rvt_ah *); | 257 | struct rvt_ah *); |
258 | int (*alloc_qpn)(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt, | 258 | int (*alloc_qpn)(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt, |
259 | enum ib_qp_type type, u8 port, gfp_t gfp); | 259 | enum ib_qp_type type, u8 port_num, gfp_t gfp); |
260 | /** | 260 | /** |
261 | * Return 0 if modification is valid, -errno otherwise | 261 | * Return 0 if modification is valid, -errno otherwise |
262 | */ | 262 | */ |
@@ -408,7 +408,7 @@ int rvt_register_device(struct rvt_dev_info *rvd); | |||
408 | void rvt_unregister_device(struct rvt_dev_info *rvd); | 408 | void rvt_unregister_device(struct rvt_dev_info *rvd); |
409 | int rvt_check_ah(struct ib_device *ibdev, struct ib_ah_attr *ah_attr); | 409 | int rvt_check_ah(struct ib_device *ibdev, struct ib_ah_attr *ah_attr); |
410 | int rvt_init_port(struct rvt_dev_info *rdi, struct rvt_ibport *port, | 410 | int rvt_init_port(struct rvt_dev_info *rdi, struct rvt_ibport *port, |
411 | int portnum, u16 *pkey_table); | 411 | int port_index, u16 *pkey_table); |
412 | int rvt_rkey_ok(struct rvt_qp *qp, struct rvt_sge *sge, | 412 | int rvt_rkey_ok(struct rvt_qp *qp, struct rvt_sge *sge, |
413 | u32 len, u64 vaddr, u32 rkey, int acc); | 413 | u32 len, u64 vaddr, u32 rkey, int acc); |
414 | int rvt_lkey_ok(struct rvt_lkey_table *rkt, struct rvt_pd *pd, | 414 | int rvt_lkey_ok(struct rvt_lkey_table *rkt, struct rvt_pd *pd, |