From 442e55661db1d5833b0eb5b85f78a845ace7a7cc Mon Sep 17 00:00:00 2001 From: Mike Marciniszyn Date: Tue, 26 Sep 2017 07:01:09 -0700 Subject: IB/hfi1: Extend input hdr tracing for packet type The etype field from the rhf can have more values than just IB and BYPASS. Extend the current tracing to report a symbolic for the etype field for non-bypass packets. Bypass packets will continue to report the l2. As part of this fix the etype and the l2 are added to the tracing struct and are available for trigger and filter operations. Fixes: Commit 863cf89d472f ("IB/hfi1: Add 16B trace support") Reviewed-by: Don Hiatt Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford --- drivers/infiniband/hw/hfi1/trace.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/infiniband/hw/hfi1/trace.h') diff --git a/drivers/infiniband/hw/hfi1/trace.h b/drivers/infiniband/hw/hfi1/trace.h index af50c0793450..8540463ef3f7 100644 --- a/drivers/infiniband/hw/hfi1/trace.h +++ b/drivers/infiniband/hw/hfi1/trace.h @@ -44,6 +44,16 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ + +#define packettype_name(etype) { RHF_RCV_TYPE_##etype, #etype } +#define show_packettype(etype) \ +__print_symbolic(etype, \ + packettype_name(EXPECTED), \ + packettype_name(EAGER), \ + packettype_name(IB), \ + packettype_name(ERROR), \ + packettype_name(BYPASS)) + #include "trace_dbg.h" #include "trace_misc.h" #include "trace_ctxts.h" -- cgit v1.2.3-59-g8ed1b