Re: [PATCH 7/7] IB/rxe: Avoid ICRC errors by copying into the skb first

Boyer, Andrew
2017-07-25T18:00:19Z

On 7/25/17, 1:34 PM, "Or Gerlitz" <gerlitz.or-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

>On Tue, Jul 25, 2017 at 4:39 PM, Andrew Boyer <andrew.boyer-8PEkshWhKlo@public.gmane.org>
>wrote:
>> If the buffer contents are changing,
>
>can you please elaborate on that a little further? what are unchanged
>contents and what are changing contents?

In qperf, the ud_bi_bw test allocates a single buffer on each side. Then
it posts that one buffer 1024 times for receive and 1024 times for send.
While RXE is building up the send packet, the buffer is being overwritten
by incoming receives.

The current process of first calculating the CRC and then copying the
buffer into the packet leaves a window in which the contents and the CRC
can get out of sync. By copying the buffer into the packet and then
calculating the CRC based on the packet contents we eliminate the window.

This seems like very strange/reckless client behavior, but whether the
client has mangled the buffer or not RXE should be able to transfer it
reliably.

Thanks,
Andrew