Re: [PATCH 2/6] RDMA/rxe: consolidate code for calculating ICRC of packets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



在 2025/1/30 3:15, Eric Biggers 写道:
On Wed, Jan 29, 2025 at 07:11:35PM +0100, Zhu Yanjun wrote:
在 2025/1/27 23:38, Eric Biggers 写道:
From: Eric Biggers <ebiggers@xxxxxxxxxx>

Since rxe_icrc_hdr() is always immediately followed by updating the CRC
with the packet's payload, just rename it to rxe_icrc() and make it
include the payload in the CRC, so it now handles the entire packet.

This is a refactor with no change in behavior.

In this commit, currently the entire packet are checked while the header is
checked in the original source code.

Now it can work between RXE <----> RXE.
I am not sure whether RXE <---> MLX can work or not.

If it can work well, I am fine with this patch.

Reviewed-by: Zhu Yanjun <yanjun.zhu@xxxxxxxxx>


Both the header and payload are checksummed both before and after this patch.
Can you elaborate on why you think this patch changed any behavior?

From the source code, it seems that only the header is checked. And RXE can connect to MLX RDMA NIC. That is, the CRC of the header can be verified both in RXE and MLX RDMA NIC.

Now in your commit, the header and payload are checked. Thus, the CRC value in RDMA header may be different from the CRC of the header(that CRC can be verified in RXE and MLX RDMA NIC). Finally the CRC of the header and payload will not be verified in MLX RDMA NIC?

IMO, after your patchset is applied, if RXE can connect to MLX RDMA NIC, I am fine with it.

In the function rxe_rcv as below,
"
...
    err = rxe_icrc_check(skb, pkt);
    if (unlikely(err))
        goto drop;
...
"
rxe_icrc_check is called to check the RDMA packet. In your commit, the icrc is changed. I am not sure whether this icrc can also be verified correctly in MLX RDMA NIC or not.

Because RXE can connect to MLX RDMA NIC, after your patchset is applied, hope that RXE can also connect to MLX RDMA NIC successfully.

Thanks,
Zhu Yanjun



- Eric





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux