]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Field not zero-ed when allocating TID flow memory
authorKaike Wan <kaike.wan@intel.com>
Mon, 15 Jul 2019 16:45:34 +0000 (12:45 -0400)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 22 Jul 2019 17:57:55 +0000 (14:57 -0300)
commit53907c31c3386ab5c4195f69b3af098cbc4cbd98
treeced851b27946d8a90e5aaa32c6d15160b68ce152
parentd56b981bd90f209af04189a27ffa2f8a9f913d08
IB/hfi1: Field not zero-ed when allocating TID flow memory

The field flow->resync_npkts is added for TID RDMA WRITE request and
zero-ed when a TID RDMA WRITE RESP packet is received by the requester.
This field is used to rewind a request during retry in the function
hfi1_tid_rdma_restart_req() shared by both TID RDMA WRITE and TID RDMA
READ requests. Therefore, when a TID RDMA READ request is retried, this
field may not be initialized at all, which causes the retry to start at an
incorrect psn, leading to the drop of the retry request by the responder.

This patch fixes the problem by zeroing out the field when the flow memory
is allocated.

Fixes: 821a524f33ed ("IB/hfi1: TID RDMA RcvArray programming and TID allocation")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20190715164534.74174.6177.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