Commit 780124db authored by Chengchang Tang's avatar Chengchang Tang Committed by openeuler-sync-bot
Browse files

RDMA/hns: fix iommu_map_sg() failed when MR bigger than 4G

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7A2PK



---------------------------------------------------------------

Since the maximum length of the sgl entry is 4G, if MR is greater
than 4G, there is a probability that the sg entry length will
overflow which would lead to a iommu map failure.

Since the largest RoCE packet is 2G, there will be no DMA operation
exceeding 2G at one time. We adjust the DMA max seg size from 4G to
2G to ensure that the length of the sgl entry will not overflow and
flip.

Signed-off-by: default avatarChengchang Tang <tangchengchang@huawei.com>
(cherry picked from commit 582d9481)
parent feb23a69
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment