OSDN Git Service

IB/hfi1: Do not update hcrc for a KDETH packet during fault injection
authorKaike Wan <kaike.wan@intel.com>
Mon, 15 Jul 2019 16:45:46 +0000 (12:45 -0400)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 22 Jul 2019 19:10:48 +0000 (16:10 -0300)
commitb2590bdd0b1dfb91737e6cb07ebb47bd74957f7e
treefc399d3e3d4ca2d3efccef3ffe1737d6d244b04a
parent5f9e832c137075045d15cd6899ab0505cfb2ca4b
IB/hfi1: Do not update hcrc for a KDETH packet during fault injection

When a KDETH packet is subject to fault injection during transmission,
HCRC is supposed to be omitted from the packet so that the hardware on the
receiver side would drop the packet. When creating pbc, the PbcInsertHcrc
field is set to be PBC_IHCRC_NONE if the KDETH packet is subject to fault
injection, but overwritten with PBC_IHCRC_LKDETH when update_hcrc() is
called later.

This problem is fixed by not calling update_hcrc() when the packet is
subject to fault injection.

Fixes: 6b6cf9357f78 ("IB/hfi1: Set PbcInsertHcrc for TID RDMA packets")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20190715164546.74174.99296.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/verbs.c