[PATCH v5 000/144] smb: smbdirect/client/server: moving to common functions and smbdirect.ko
Stefan Metzmacher
metze at samba.org
Mon Feb 9 13:22:51 UTC 2026
Am 09.02.26 um 08:29 schrieb Namjae Jeon:
>>
>> I tested with with mlx5_ib, irdma (roce) and rxe.
>> There's still a known problem with iwarp.
> Let me know what the known problem is.
It's the rw credit deadlock, as use rw credits
for the wrong thing, which means we easily deadlock
if the client uses an array smbdirect_buffer_descriptor_v1,
where the could larger than the possible rw credits
be calculated. While the max possible rw credits we calculate
is the value that is needed in order to
transfer the maximal rw size into a single
smbdirect_buffer_descriptor_v1.
This commit adds a WARN_ONCE detection for the
problem:
https://git.samba.org/?p=metze/linux/wip.git;a=commitdiff;h=e6260d7a518972ae1ca627e411cc16095c044d59
See the diff and commit messages of the top ~15 commits
in my for-6.18/ksmbd-smbdirect-regression-v4, which try to
fix the problem.
I try to fix it once I have the needed pcie adapters in
order to out my Chelsio T520-BT cards into the free x4 slot
of my testservers.
As there are some strange page fault problems with the irdma
driver, see
https://git.samba.org/?p=metze/linux/wip.git;a=commitdiff;h=a6b515cda103c1ac1537c92a4e9dbd75a31d92ef
And also
https://git.samba.org/?p=metze/samba/wip.git;a=commitdiff;h=e784b53167dc2cf4316b66a7599dab5b9e6c7208
For the client problem with irdma, see
https://git.samba.org/?p=metze/linux/wip.git;a=commitdiff;h=fb5cc2a59b4719015979a1f1355f66f27002b4cf
irdma_map_mr_sg may merge sg elements any may not return
the same value as the given sg_nents on success.
>>
>> So far I can't see any regression compared the
>> state before these 144 patches.
>>
>> Namjae, can you please test in your setup?
>
> Is there any reason to print the log below by default?
> ksmbd: smb_direct: smbdirect_socket_schedule_cleanup(-ESHUTDOWN)
> called from smbdirect_socket_shutdown in line=650 status=LISTENING
> ksmbd: smb_direct: smbdirect_socket_schedule_cleanup(-ESHUTDOWN)
> called from smbdirect_socket_shutdown in line=650 status=LISTENING
> ksmbd: smb_direct: smbdirect_socket_schedule_cleanup(-ESHUTDOWN)
> called from smbdirect_socket_shutdown in line=650 status=CONNECTED
> ksmbd: smb_direct: smbdirect_socket_schedule_cleanup(-ESHUTDOWN)
> called from smbdirect_socket_shutdown in line=650 status=CONNECTED
I can move the above message to level INFO.
> ksmbd: smb_direct: status=ERROR first_error=-ESHUTDOWN => -ENOTCONN
This is basically the same messages as the one we
had in smb_direct_read() before:
if (sc->status != SMBDIRECT_SOCKET_CONNECTED) {
pr_err("disconnected\n");
return -ENOTCONN;
}
If I remember correctly it appeared just as:
'ksmbd: disconnected'
I can just move the new message to level INFO too, ok?
metze
More information about the samba-technical
mailing list