IB/hfi1: Optimize process_receive_ib()
authorSebastian Sanchez <sebastian.sanchez@intel.com>
Thu, 1 Feb 2018 18:46:46 +0000 (10:46 -0800)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 1 Feb 2018 22:43:30 +0000 (15:43 -0700)
commitaca7f4fc320b5a507da4a41454582440f65cde4c
treec67838f83548b7c5097dc75f006acf22e9264375
parentca85bb1ca9948899682fe7170636e465599ea8e7
IB/hfi1: Optimize process_receive_ib()

The arguments for trace_hfi1_rcvhdr() get computed every
time in the hot path regardless of the whether the trace
is on or off. This is seen to be costly with a profile.
The handling of fault inject isolates the verbs device for
all packets regardless of the presence of a RHF_DC_ERR error.

Fix the first by computing trace_hfi1_rcvhdr() arguments within
the trace itself, so that when the trace is off, the argument
data isn't computed. Fix the second by moving the error check to
handle_eflags() when an RHF error occurs and by testing for
RHF_DC_ERR before executing the reset of handle_eflags().

Reviewed-by: Don Hiatt <don.hiatt@intel.com>
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/trace_rx.h