Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Stefan Metzmacher <metze@samba.org>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: David Howells <dhowells@redhat.com>,
	Paulo Alcantara <pc@manguebit.org>,
	linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
	Tom Talpey <tom@talpey.com>, Steve French <smfrench@gmail.com>
Subject: Re: [PATCH v5 000/144] smb: smbdirect/client/server: moving to common functions and smbdirect.ko
Date: Thu, 12 Feb 2026 21:05:01 +0100	[thread overview]
Message-ID: <3ecc1979-e736-4aa8-add0-670026808255@samba.org> (raw)
In-Reply-To: <CAKYAXd-vGej9K53-06iy+p6nVSDLuwVU_+41R=7EUfbTjx=O5Q@mail.gmail.com>

Am 10.02.26 um 15:37 schrieb Namjae Jeon:
> On Tue, Feb 10, 2026 at 4:11 AM Stefan Metzmacher <metze@samba.org> wrote:
>>
>> Am 09.02.26 um 14:22 schrieb Stefan Metzmacher via samba-technical:
>>> 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?
>>
>> My master-fs-smb branch has 3 commits which should disable the
>> messages by default, let me know if your happy with the logic
>> and I'll squash them to the correct commit.
>>
>> https://git.samba.org/?p=metze/linux/wip.git;a=shortlog;h=8b2f53aec19ebc180c11504600b5e5372d2220cb
> Looks good to me.
> Acked-by: Namjae Jeon <linkinjeon@kernel.org>
> for this series.

I squashed these and rebased on Linus' tree, as all other stuff is now
already merged.

It is available in my for-7.0/smbdirect-ko-20260212-v6 branch
at commit d4fd5f7a6a7e0f4918d988b3125a59d05fbc9ac2:
git fetch https://git.samba.org/metze/linux/wip.git for-7.0/smbdirect-ko-20260212-v6
https://git.samba.org/?p=metze/linux/wip.git;a=shortlog;h=refs/heads/for-7.0/smbdirect-ko-20260212-v6

The logical diff compared to for-7.0/smbdirect-ko-20260205-v5 is only this:

diff --git a/fs/smb/common/smbdirect/smbdirect_connection.c b/fs/smb/common/smbdirect/smbdirect_connection.c
index 5a65424ad010..813ddd87c6ae 100644
--- a/fs/smb/common/smbdirect/smbdirect_connection.c
+++ b/fs/smb/common/smbdirect/smbdirect_connection.c
@@ -1304,7 +1304,7 @@ int smbdirect_connection_send_iter(struct smbdirect_socket *sc,
                 return -EINVAL; /* It's a bug in upper layer to get there */

         if (sc->status != SMBDIRECT_SOCKET_CONNECTED) {
-               smbdirect_log_write(sc, SMBDIRECT_LOG_ERR,
+               smbdirect_log_write(sc, SMBDIRECT_LOG_INFO,
                         "status=%s first_error=%1pe => %s\n",
                         smbdirect_socket_status_string(sc->status),
                         SMBDIRECT_DEBUG_ERR_PTR(sc->first_error),
@@ -1801,7 +1801,7 @@ int smbdirect_connection_recvmsg(struct smbdirect_socket *sc,

  again:
         if (sc->status != SMBDIRECT_SOCKET_CONNECTED) {
-               smbdirect_log_read(sc, SMBDIRECT_LOG_ERR,
+               smbdirect_log_read(sc, SMBDIRECT_LOG_INFO,
                         "status=%s first_error=%1pe => %s\n",
                         smbdirect_socket_status_string(sc->status),
                         SMBDIRECT_DEBUG_ERR_PTR(sc->first_error),
diff --git a/fs/smb/common/smbdirect/smbdirect_socket.c b/fs/smb/common/smbdirect/smbdirect_socket.c
index 657710d0387a..33610e2af589 100644
--- a/fs/smb/common/smbdirect/smbdirect_socket.c
+++ b/fs/smb/common/smbdirect/smbdirect_socket.c
@@ -647,7 +647,7 @@ __SMBDIRECT_EXPORT_SYMBOL__(smbdirect_socket_bind);

  void smbdirect_socket_shutdown(struct smbdirect_socket *sc)
  {
-       smbdirect_socket_schedule_cleanup(sc, -ESHUTDOWN);
+       smbdirect_socket_schedule_cleanup_lvl(sc, SMBDIRECT_LOG_INFO, -ESHUTDOWN);
  }
  __SMBDIRECT_EXPORT_SYMBOL__(smbdirect_socket_shutdown);

metze

  reply	other threads:[~2026-02-12 20:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-05 17:22 [PATCH v5 000/144] smb: smbdirect/client/server: moving to common functions and smbdirect.ko Stefan Metzmacher
2026-02-06 15:13 ` Namjae Jeon
2026-02-06 15:17   ` Stefan Metzmacher
2026-02-09  7:29 ` Namjae Jeon
2026-02-09 13:22   ` Stefan Metzmacher
2026-02-09 19:10     ` Stefan Metzmacher
2026-02-10 14:37       ` Namjae Jeon
2026-02-12 20:05         ` Stefan Metzmacher [this message]
     [not found]         ` <CAH2r5muf=Th_AbA7SZaQKApyvr81FMB8WF-5yZ3ihzap1swQWg@mail.gmail.com>
     [not found]           ` <98d25ce1-1f1a-4517-89f0-8956bffaf9d3@samba.org>
     [not found]             ` <CAH2r5mswN8W652Br4QQTzhtDXtXKvqea=dWVfUFF+xDYfOx6HA@mail.gmail.com>
     [not found]               ` <28d94c9f-b85e-4746-bb08-188090409682@samba.org>
     [not found]                 ` <CAH2r5mtA=DdpEiyqspNG3eoyjkGajnEwoRnOyXyBimDtCND9ig@mail.gmail.com>
     [not found]                   ` <c5aef237-2a12-4be5-b917-de502780be85@samba.org>
2026-02-12 21:07                     ` Steve French
2026-02-16 13:49                       ` Stefan Metzmacher
2026-02-17  1:02                         ` Steve French
2026-02-17  2:16                           ` Steve French
2026-02-17  9:25                             ` Stefan Metzmacher
2026-02-17 22:34                               ` Steve French

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ecc1979-e736-4aa8-add0-670026808255@samba.org \
    --to=metze@samba.org \
    --cc=dhowells@redhat.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=pc@manguebit.org \
    --cc=samba-technical@lists.samba.org \
    --cc=smfrench@gmail.com \
    --cc=tom@talpey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox