Re: [RFC PATCH] RDMA/iwcm: allow aborting an active connect awaiting CONNECT_REPLY

From: Yunseong Kim

Date: Tue Nov 03 2026 - 04:18:35 EST


Hi Stefan,

On 16/10/2026 11:25 am, Stefan Metzmacher wrote:
> Am 03.09.26 um 12:42 schrieb Bernard Metzler:
>> On 01.09.2026 18:50, Stefan Metzmacher wrote:
>>> Hi Leon,
>>>
>>>> On Wed, Aug 05, 2026 at 02:02:00AM +0200, Yunseong Kim wrote:
>>>>> [snip...]
> It actually still hangs in here:
>
>     For an active iWarp connect that is still waiting for the MPA reply
>     (e.g. the peer accepted the TCP connection, but never answers the
>     MPA request), irdma doesn't flush the marker before the pending
>     connect is aborted, which only happens in rdma_destroy_id().
>     smbdirect_socket_destroy_sync() calls ib_drain_qp() before that, so
>     it waits forever:
>
>       __ib_drain_sq+0x139/0x1b0 [ib_core]
>       ib_drain_sq+0x7f/0x90 [ib_core]
>       ib_drain_qp+0x16/0x40 [ib_core]
>       smbdirect_socket_destroy_sync+0x2bd/0xa90 [smbdirect]
>       smbdirect_socket_release+0x61/0xb0 [smbdirect]
>       smbd_get_connection+0x22c/0x280 [cifs]
>
>
> Here's my work in progress branch to fix these problems:
> https://git.samba.org/?p=metze/linux/wip.git;a=shortlog;h=refs/heads/for-7.3/rdma-backport-testing

Thank you again for checking this!

> There I'm able to eliminate all hangs I was able to reproduce with siw, rxe, iw_cxgb4, irdma, mlx5_ib.
> I tested the following situations:
> - server iptables drop (port 5445 and 4791)
> - server nc -lk 5445 (tcp connection accepted by no responses)
> - ip address del (on the client)
> - ip link down (on the client)
>
> It likely takes a while until I rechecked all commits
> and submit them in small chunks, but it's good to see
> that it's possible to avoid deadlocks or very large timeouts.
>
> So at least that patch doesn't solve all problems.
>
> metze

I'll also rerun my automated tests based on your branch when I have some time.

Best regards,
Yunseong