[PATCH 0/5] smb: smbdirect: introduce local send credits
Namjae Jeon
linkinjeon at kernel.org
Tue Oct 21 06:51:56 UTC 2025
On Tue, Oct 21, 2025 at 3:36 AM Stefan Metzmacher <metze at samba.org> wrote:
>
> Hi,
>
> our client already has some logic to prevent overflows of
> the local submission queue for ib_post_send(), if the peer
> granted more credits than we asked for.
>
> But it's not as easy as it could be.
>
> I guess that won't happen against Windows, but our git
> history indicates this could happen.
>
> Now we have a loop of local credits based on our send_credit_target.
> With that we always try to get a local credit first and then
> get a remote credit. When we got both we are able to
> mark the request as pending in order to keep the
> existing logic based on the pending count working.
> Removing or changing that is a task for another day,
> when all code if in common between client and server.
>
> For the server this is a real bug fix, as such a logic was missing
> before.
>
> For the client it's not strictly required for 6.18, but
> I think we should keep things consistent, as it will reduce
> churn on my 6.19 patchset, which already has about 100 patches
> and brings things into common code. And more is comming there...
>
> Stefan Metzmacher (5):
> smb: smbdirect: introduce smbdirect_socket.send_io.lcredits.*
> smb: server: smb_direct_disconnect_rdma_connection() already wakes all
> waiters on error
> smb: server: simplify sibling_list handling in
> smb_direct_flush_send_list/send_done
> smb: server: make use of smbdirect_socket.send_io.lcredits.*
> smb: client: make use of smbdirect_socket.send_io.lcredits.*
Applied them to #ksmbd-for-next-next.
Thanks!
>
> fs/smb/client/smbdirect.c | 67 ++++++++-----
> fs/smb/common/smbdirect/smbdirect_socket.h | 13 ++-
> fs/smb/server/transport_rdma.c | 106 +++++++++++++++------
> 3 files changed, 129 insertions(+), 57 deletions(-)
>
> --
> 2.43.0
>
>
More information about the samba-technical
mailing list