]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Drop all TID RDMA READ RESP packets after r_next_psn
authorKaike Wan <kaike.wan@intel.com>
Mon, 15 Jul 2019 16:45:40 +0000 (12:45 -0400)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 22 Jul 2019 17:57:55 +0000 (14:57 -0300)
commit0f7e1459a2ad7dfb55c850bb2ff17b15a97792af
treeebfbba88f950a93cfde560a4aefa14d07687f193
parentfa170b13420a9ae6333ee4cf7adc1281c7c03186
IB/hfi1: Drop all TID RDMA READ RESP packets after r_next_psn

When a TID sequence error occurs while receiving TID RDMA READ RESP
packets, all packets after flow->flow_state.r_next_psn should be dropped,
including those response packets for subsequent segments.

The current implementation will drop the subsequent response packets for
the segment to complete next, but may accept packets for subsequent
segments and therefore mistakenly advance the r_next_psn fields for the
corresponding software flows. This may result in failures to complete
subsequent segments after the current segment is completed.

The fix is to only use the flow pointed by req->clear_tail for checking
KDETH PSN instead of finding a flow from the request's flow array.

Fixes: 4b40cec99671 ("IB/hfi1: Unify the software PSN check for TID RDMA READ/WRITE")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20190715164540.74174.54702.stgit@awfm-01.aw.intel.com
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hfi1/tid_rdma.c