OSDN Git Service

IB/hfi1: Look up ibport using a pointer in receive path
authorSebastian Sanchez <sebastian.sanchez@intel.com>
Thu, 1 Feb 2018 18:46:31 +0000 (10:46 -0800)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 1 Feb 2018 22:43:29 +0000 (15:43 -0700)
commitbdaf96f6500880401fe692cd0bf57afb596b135c
treeb5117c177ea94b87fc5c531a1b3693bb69485868
parent6d6b8848c882b22e3170cc9f217101773e8bd8d2
IB/hfi1: Look up ibport using a pointer in receive path

In the receive path, hfi1_ibport is looked up by indexing into an
array. A profile shows this to be expensive. The receive context
data has a pointer to the ibport data, use that pointer instead.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hfi1/driver.c
drivers/infiniband/hw/hfi1/rc.c
drivers/infiniband/hw/hfi1/verbs.h