402 Star 1.4K Fork 1.3K

GVPopenEuler / kernel

 / 详情

fix iommu_map_sg() failed when MR bigger than 4G

已完成
缺陷
创建于  
2023-06-01 14:59

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.

评论 (2)

zhouj 创建了缺陷
openeuler-ci-bot 添加了
 
sig/Kernel
标签
[root@localhost ~]#rdma link
link roceo1/1 state DOWN physical_state DISABLED netdev eno1
link roceo2/1 state ACTIVE physical_state LINK_UP netdev eno2
link roceo3/1 state ACTIVE physical_state LINK_UP netdev eno3
link rocep53s0f1v0/1 state ACTIVE physical_state LINK_UP netdev eno2v0
link rocep53s0f1v1/1 state ACTIVE physical_state LINK_UP netdev eno2v1
link rocep53s0f0v0/1 state DOWN physical_state DISABLED netdev eno1v0
link rocep53s0f0v1/1 state DOWN physical_state DISABLED netdev eno1v1
[root@localhost ~]# ip r
default via 192.168.101.1 dev enp53s0f2
192.168.1.0/24 dev eno2 proto kernel scope link src 192.168.1.20
192.168.66.0/24 dev eno2v0 proto kernel scope link src 192.168.66.199
192.168.101.0/24 dev enp53s0f2 proto kernel scope link src 192.168.101.37
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# ib_read_bw -d roceo2 -c XRC -s 2147483647 -n 5 -b&
[1] 155333
[root@localhost ~]#
************************************
* Waiting for client to connect... *
************************************
ib_read_bw -d roceo2 -c XRC -s 2147483647 -n 5 -b 192.168.1.20&
[2] 155336
[root@localhost ~]# ---------------------------------------------------------------------------------------
                    RDMA_Read Bidirectional BW Test
 Dual-port       : OFF          Device         : roceo2
---------------------------------------------------------------------------------------
 Number of qps   : 2            Transport type : IB
                    RDMA_Read Bidirectional BW Test
 Connection type : XRC          Using SRQ      : ON
 Dual-port       : OFF          Device         : roceo2
 PCIe relax order: ON
 Number of qps   : 2            Transport type : IB
 Connection type : XRC          Using SRQ      : ON
 PCIe relax order: ON
 ibv_wr* API     : ON
 ibv_wr* API     : ON
 TX depth        : 5
 TX depth        : 5
 CQ Moderation   : 1
 CQ Moderation   : 1
 Mtu             : 1024[B]
 Mtu             : 1024[B]
 Link type       : Ethernet
 Link type       : Ethernet
 GID index       : 3
 GID index       : 3
 Outstand reads  : 128
 Outstand reads  : 128
 rdma_cm QPs     : OFF
 rdma_cm QPs     : OFF
 Data ex. method : Ethernet
 Data ex. method : Ethernet
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
 local address: LID 0000 QPN 0x0023 PSN 0xfdf59e OUT 0x80 RKey 0x000300 VAddr 0x00fffe9984effe SRQn 0x000001
 GID: 00:00:00:00:00:00:00:00:00:00:255:255:192:168:01:20
 local address: LID 0000 QPN 0x001d PSN 0x3cf230 OUT 0x80 RKey 0x000300 VAddr 0x00ffff1984effd SRQn 0x000001
 GID: 00:00:00:00:00:00:00:00:00:00:255:255:192:168:01:20
 local address: LID 0000 QPN 0x0022 PSN 0x2e30bc OUT 0x80 RKey 0x000400 VAddr 0x00fffeaf76effe SRQn 00000000
 GID: 00:00:00:00:00:00:00:00:00:00:255:255:192:168:01:20
 local address: LID 0000 QPN 0x001c PSN 0x8b11f6 OUT 0x80 RKey 0x000400 VAddr 0x00ffff2f76effd SRQn 00000000
 GID: 00:00:00:00:00:00:00:00:00:00:255:255:192:168:01:20
 remote address: LID 0000 QPN 0x0023 PSN 0xfdf59e OUT 0x80 RKey 0x000300 VAddr 0x00fffe9984effe SRQn 0x000001
 remote address: LID 0000 QPN 0x0022 PSN 0x2e30bc OUT 0x80 RKey 0x000400 VAddr 0x00fffeaf76effe SRQn 00000000
 GID: 00:00:00:00:00:00:00:00:00:00:255:255:192:168:01:20
 GID: 00:00:00:00:00:00:00:00:00:00:255:255:192:168:01:20
 remote address: LID 0000 QPN 0x001d PSN 0x3cf230 OUT 0x80 RKey 0x000300 VAddr 0x00ffff1984effd SRQn 0x000001
 remote address: LID 0000 QPN 0x001c PSN 0x8b11f6 OUT 0x80 RKey 0x000400 VAddr 0x00ffff2f76effd SRQn 00000000
 GID: 00:00:00:00:00:00:00:00:00:00:255:255:192:168:01:20
 GID: 00:00:00:00:00:00:00:00:00:00:255:255:192:168:01:20
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
 #bytes     #iterations    BW peak[MB/sec]    BW average[MB/sec]   MsgRate[Mpps]
 #bytes     #iterations    BW peak[MB/sec]    BW average[MB/sec]   MsgRate[Mpps]
 2147483647    5                15206.03            15158.04               0.000007 2147483647    5                15206.03            15158.04            0.000007

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

[1]-  Done                    ib_read_bw -d roceo2 -c XRC -s 2147483647 -n 5 -b
[2]+  Done                    ib_read_bw -d roceo2 -c XRC -s 2147483647 -n 5 -b 192.168.1.20
[root@localhost ~]# uname -a
Linux localhost.localdomain 5.10.0+ #2 SMP Wed May 31 16:36:19 CST 2023 aarch64 aarch64 aarch64 GNU/Linux
[root@localhost ~]#

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
5329419 openeuler ci bot 1632792936
C
1
https://gitee.com/openeuler/kernel.git
git@gitee.com:openeuler/kernel.git
openeuler
kernel
kernel

搜索帮助