Skip to contentSkip to conversation

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

PATCH Applied Leon Romanovsky 4 participants 5 messages May 4, 2017 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>

Callers of rxe_mem_copy() provide pointer to store updated CRC value. That pointer was supposed to be updated, but the commit cee2688e3cd6 ("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.

---
Hi Doug,

It will be great if you forward this patch as part of your second pull request. As you can see from the commit message, it fixes issue spotted by Andrew.

Thanks

---
 drivers/infiniband/sw/rxe/rxe_mr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/sw/rxe/rxe_mr.c +1 -1
index ced15c4446bd..e37cc89987e1 100644
@@ -368,7 +368,7 @@ int rxe_mem_copy(struct rxe_mem *mem, u64 iova, void *addr, int length,
 			((void *)(uintptr_t)iova) : addr;
 
 		if (crcp)
-			crc = rxe_crc32(to_rdev(mem->pd->ibpd.device),
+			*crcp = rxe_crc32(to_rdev(mem->pd->ibpd.device),
 					*crcp, src, length);
 
 		memcpy(dest, src, length);

--
2.12.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20170504123607.22708-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 19 lines · On 5/4/17, 8:36 AM, "[email protected]…

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>

Callers of rxe_mem_copy() provide pointer to store updated CRC value. That pointer was supposed to be updated, but the commit cee2688e3cd6 ("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.

---
Hi Doug,

Quoted 8 lines

It will be great if you forward this patch as part of your second pull request.
As you can see from the commit message, it fixes issue spotted by Andrew.

Thanks
---
drivers/infiniband/sw/rxe/rxe_mr.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): D530A2EB.16906%[email protected]

#4 lore raw
Quoted 28 lines · Andrew
Quoted 23 lines · On 5/4/17, 8:36 AM, "[email protected]…

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>

Callers of rxe_mem_copy() provide pointer to store updated CRC value. That pointer was supposed to be updated, but the commit cee2688e3cd6 ("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.

---
Hi Doug,

It will be great if you forward this patch as part of your second pull request.
As you can see from the commit message, it fixes issue spotted by Andrew.

Quoted 6 lines
Quoted 4 lines

Thanks
---
drivers/infiniband/sw/rxe/rxe_mr.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

Thank you for catching, reviewing and testing it.

Applied
#6 lore raw
In reply to a message not in the archive
Quoted 16 lines · Leon Romanovsky

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>

Callers of rxe_mem_copy() provide pointer to store updated CRC value. That pointer was supposed to be updated, but the commit cee2688e3cd6 ("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.

Quoted 7 lines

---
Hi Doug,

It will be great if you forward this patch as part of your second pull request.
As you can see from the commit message, it fixes issue spotted by Andrew.

I've queued it for my second pull request, thanks.

Signature · 9 lines
Doug Ledford <[email protected]>
    GPG KeyID: B826A3330E572FDD
   
Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html