summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/hfi1/trace_rx.h
diff options
context:
space:
mode:
authorSebastian Sanchez <sebastian.sanchez@intel.com>2018-02-01 10:46:46 -0800
committerJason Gunthorpe <jgg@mellanox.com>2018-02-01 15:43:30 -0700
commitaca7f4fc320b5a507da4a41454582440f65cde4c (patch)
treec67838f83548b7c5097dc75f006acf22e9264375 /drivers/infiniband/hw/hfi1/trace_rx.h
parentca85bb1ca9948899682fe7170636e465599ea8e7 (diff)
downloadblackbird-op-linux-aca7f4fc320b5a507da4a41454582440f65cde4c.tar.gz
blackbird-op-linux-aca7f4fc320b5a507da4a41454582440f65cde4c.zip
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>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/trace_rx.h')
-rw-r--r--drivers/infiniband/hw/hfi1/trace_rx.h28
1 files changed, 10 insertions, 18 deletions
diff --git a/drivers/infiniband/hw/hfi1/trace_rx.h b/drivers/infiniband/hw/hfi1/trace_rx.h
index 4d487fee105d..f76841595e08 100644
--- a/drivers/infiniband/hw/hfi1/trace_rx.h
+++ b/drivers/infiniband/hw/hfi1/trace_rx.h
@@ -63,17 +63,9 @@ __print_symbolic(type, \
#define TRACE_SYSTEM hfi1_rx
TRACE_EVENT(hfi1_rcvhdr,
- TP_PROTO(struct hfi1_devdata *dd,
- u32 ctxt,
- u64 eflags,
- u32 etype,
- u32 hlen,
- u32 tlen,
- u32 updegr,
- u32 etail
- ),
- TP_ARGS(dd, ctxt, eflags, etype, hlen, tlen, updegr, etail),
- TP_STRUCT__entry(DD_DEV_ENTRY(dd)
+ TP_PROTO(struct hfi1_packet *packet, u32 etype),
+ TP_ARGS(packet, etype),
+ TP_STRUCT__entry(DD_DEV_ENTRY(packet->rcd->dd)
__field(u64, eflags)
__field(u32, ctxt)
__field(u32, etype)
@@ -82,14 +74,14 @@ TRACE_EVENT(hfi1_rcvhdr,
__field(u32, updegr)
__field(u32, etail)
),
- TP_fast_assign(DD_DEV_ASSIGN(dd);
- __entry->eflags = eflags;
- __entry->ctxt = ctxt;
+ TP_fast_assign(DD_DEV_ASSIGN(packet->rcd->dd);
+ __entry->eflags = rhf_err_flags(packet->rhf);
+ __entry->ctxt = packet->rcd->ctxt;
__entry->etype = etype;
- __entry->hlen = hlen;
- __entry->tlen = tlen;
- __entry->updegr = updegr;
- __entry->etail = etail;
+ __entry->hlen = packet->hlen;
+ __entry->tlen = packet->tlen;
+ __entry->updegr = packet->updegr;
+ __entry->etail = rhf_egr_index(packet->rhf);
),
TP_printk(
"[%s] ctxt %d eflags 0x%llx etype %d,%s hlen %d tlen %d updegr %d etail %d",
OpenPOWER on IntegriCloud