]> git.ipfire.org Git - people/arne_f/kernel.git/commit - drivers/infiniband/sw/rxe/rxe_mr.c
IB/rxe: Avoid ICRC errors by copying into the skb first
authorAndrew Boyer <andrew.boyer@dell.com>
Mon, 28 Aug 2017 20:11:58 +0000 (16:11 -0400)
committerDoug Ledford <dledford@redhat.com>
Mon, 28 Aug 2017 23:12:36 +0000 (19:12 -0400)
commit13eb1e21d6198c9068eab7e7cb68c6d5c6834d1b
treeb57e2bd89b576b75e2247e850d76e2e72dcbcaab
parent1223a1af75a85356ec5f5e5a097b60d26f25ff15
IB/rxe: Avoid ICRC errors by copying into the skb first

The current process is to first calculate the CRC and then copy the client
data into the packet. This leaves a window in which the packet contents and
CRC can get out of sync, if the client changes the data after the CRC is
calculated but before the data is copied.

By copying the data into the packet and then calculating the CRC directly
from the packet contents we eliminate the window.

This can be seen with qperf's ud_bi_bw test. This seems like very
strange/reckless client behavior, but whether the client has mangled its
data or not RXE should be able to transfer it reliably.

Fixes: 8700e3e7c485 ("Soft RoCE driver")
Signed-off-by: Andrew Boyer <andrew.boyer@dell.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rxe/rxe_mr.c