]> git.karo-electronics.de Git - linux-beck.git/commit
IB/rdmavt: Clean up distinction between port number and index
authorDennis Dalessandro <dennis.dalessandro@intel.com>
Wed, 3 Feb 2016 22:15:02 +0000 (14:15 -0800)
committerDoug Ledford <dledford@redhat.com>
Fri, 11 Mar 2016 01:37:31 +0000 (20:37 -0500)
commitf1badc716349cc2ac6e55ad50dcff598ef97bad5
tree4185e010c23a99fc1118971bce88afa605f66a58
parentd1b697b678cd591e12c493a9b91343107816cceb
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>
drivers/infiniband/sw/rdmavt/mad.c
drivers/infiniband/sw/rdmavt/mad.h
drivers/infiniband/sw/rdmavt/qp.c
drivers/infiniband/sw/rdmavt/vt.c
drivers/infiniband/sw/rdmavt/vt.h
include/rdma/rdma_vt.h