Re: [PATCH for-next 2/3] RDMA/rtrs: Fix rxe_dealloc_pd warning
From: Zhijian Li (Fujitsu)
Date: Fri Apr 14 2023 - 02:47:49 EST
On 14/04/2023 14:03, Jinpu Wang wrote:
>>> I can see the path increase usecnt to 1.
>>>
>>> rtrs_cq_qp_create -> create_qp
>>> -> rdma_create_qp
>>> -> ib_create_qp
>>> -> create_qp
>>> -> ib_qp_usecnt_inc which increases pd->usecnt
>>>
>>> Where is another place to increase usecnt to 2?
>> It should be
>> ib_create_qp ...
>> -> rxe_create_qp
>> -> rxe_qp_from_init
>> -> rxe_get(pd) <<< pd's refcnt will be increased.
> IIUC, this problem is rxe specific, because rxe manipulate refcnt
> itself? I checked mlx5/mlx4 they do not change the refcnt of pd when
> create_kernel_qp.
>
> So question is then if the bug is on rxe side or rtrs side?
>
> Zhijian how do you reproduce the warning? do you inject error explictly?
# cat rnbd-self.sh
#!/bin/bash
/root/rpma/tools/config_softroce.sh eth0
modprobe rnbd_server
modprobe rnbd_client
while true;
do
echo "sessname=xyz path=ip:<server-ip> device_path=/dev/nvme0n1" > /sys/devices/virtual/rnbd-client/ctl/map_device
for i in /sys/block/rnbd*/rnbd/unmap_device
do
echo "normal" > $i
done
done