IB/hfi1: Unify the software PSN check for TID RDMA READ/WRITE
authorKaike Wan <kaike.wan@intel.com>
Mon, 18 Mar 2019 16:58:50 +0000 (09:58 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 3 Apr 2019 18:27:30 +0000 (15:27 -0300)
commitb885d5be9ca10dff6110a8738c45eb4b3fb5a40a
tree0e8de092f24ba3b4b61a76dcfcbf57e4a902afcc
parent6a40693a884dacae68c1771d369ad3be0594ba1c
IB/hfi1: Unify the software PSN check for TID RDMA READ/WRITE

For expected packet receiving, the hfi1 hardware checks the KDETH PSN
automatically. However, when sequence error occurs, the hfi1 driver can
check the sequence instead until the hardware flow generation is reloaded.

TID RDMA READ and WRITE protocols implement similar software checking
mechanisms, but with different flags and different local variables to
store next expected PSN.

Unify the handling by using only one set of flag and local variable for
both TID RDMA READ and WRITE protocols.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hfi1/tid_rdma.c
drivers/infiniband/hw/hfi1/tid_rdma.h
drivers/infiniband/hw/hfi1/trace_tid.h