Commit af5df5fb authored by Leon Romanovsky's avatar Leon Romanovsky Committed by Doug Ledford

IB/rxe: Update caller's CRC for RXE_MEM_TYPE_DMA memory type

Callers of rxe_mem_copy() provide pointer to store updated CRC
value. That pointer was supposed to be updated, but the
commit cee2688e ("IB/rxe: Offload CRC calculation when possible")
mistakenly removed that assignment for RXE_MEM_TYPE_DMA memory type.

The code worked because there are no actual callers with
RXE_MEM_TYPE_DMA, who are interested in returned value of crcp.
The one caller in read_reply(), who uses the returned crcp didn't
set RXE_MEM_TYPE_DMA as mem->type.

Fixes: cee2688e ("IB/rxe: Offload CRC calculation when possible")
Reported-by: default avatarAndrew Boyer <andrew.boyer@dell.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Acked-by: default avatarMoni Shoua <monis@mellanox.com>
Reviewed-by: default avatarAndrew Boyer <andrew.boyer@dell.com>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 62239fc6
...@@ -368,7 +368,7 @@ int rxe_mem_copy(struct rxe_mem *mem, u64 iova, void *addr, int length, ...@@ -368,7 +368,7 @@ int rxe_mem_copy(struct rxe_mem *mem, u64 iova, void *addr, int length,
((void *)(uintptr_t)iova) : addr; ((void *)(uintptr_t)iova) : addr;
if (crcp) if (crcp)
crc = rxe_crc32(to_rdev(mem->pd->ibpd.device), *crcp = rxe_crc32(to_rdev(mem->pd->ibpd.device),
*crcp, src, length); *crcp, src, length);
memcpy(dest, src, length); memcpy(dest, src, length);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment