Linux CIFS filesystem development
 help / color / mirror / Atom feed
* [PATCH v5 000/144] smb: smbdirect/client/server: moving to common functions and smbdirect.ko
@ 2026-02-05 17:22 Stefan Metzmacher
  2026-02-06 15:13 ` Namjae Jeon
  2026-02-09  7:29 ` Namjae Jeon
  0 siblings, 2 replies; 14+ messages in thread
From: Stefan Metzmacher @ 2026-02-05 17:22 UTC (permalink / raw)
  To: Steve French, Namjae Jeon
  Cc: metze, Tom Talpey, Long Li, David Howells, Paulo Alcantara,
	linux-cifs, samba-technical

Hi,

this is the move use common functions in an smbdirect.ko.

I'm not sending all 144 patches to the list, only the
cover letter...

It can be found in my for-7.0/smbdirect-ko-20260205-v5 branch,
at commit 0af3ce20f80b1335e83e1fc65758d3654c192a57:
git fetch https://git.samba.org/metze/linux/wip.git for-7.0/smbdirect-ko-20260205-v5
https://git.samba.org/?p=metze/linux/wip.git;a=shortlog;h=refs/heads/for-7.0/smbdirect-ko-20260205-v5

This is on top of origin/master as commit
f14faaf3a1fb3b9e4cf2e56269711fb85fba9458.

And merging in:

- sfrench-cifs-2.6/for-next at commit
  f796e492246c0b61df02a0a8b2957d48a4a47aca
  smb: common: add header guards to fs/smb/common/smb2status.h
- smfrench-smb3-kernel/ksmbd-for-next at commit
  cc6aa375487e9aca11a345b5e37dbf09678a9f4d
  smb: server: make use of rdma_restrict_node_type()
- smfrench-smb3-kernel/ksmbd-for-next-next at commit
  75980cde65ad415e73b209881ce2c4f35ed98e64
  smb: server: fix leak of active_num_conn in ksmbd_tcp_new_connection()

On top of this I have the 2 patches from:
https://lore.kernel.org/linux-cifs/cover.1764080338.git.metze@samba.org/
  smb: server: correct value for smb_direct_max_fragmented_recv_size
  smb: client: correct value for smbd_max_fragmented_recv_size

So the top 144 patches from 0af3ce20f80b1335e83e1fc65758d3654c192a57
are relevant here.

The end goal is still to go via the socket layer in order
to provide smbdirect support to userspace, so that Samba
can use if as client and server. But that will be done on
top of this patchset.

The patchset starts with the introduction of
a logging infrastructure that allows us to have
common code, but still do logging with cifs.ko
and ksmbd.ko specific functions.

Then it introduces smbdirect_all_c_files.c, which
is only temporary. It is included in the client and
server and will itself include more files with
common functions in the following patches.
This makes it possible to do the transition in
small steps. At the end this will be removed again,
while removing the file itself will be done in a later
patchset.

Then we have a series of patches introducing
common functions, most of them are copies
of the existing functions, just with a new name
and some reformatting. But the core logic is
mostly unchanged.

Then we have new functions related to async
connect and accept handling.

Followed by preparing some functions as public
and some as private, so that we have the
Kbuild logic for smbdirect.ko, which is
still disabled at that point.

Then we have small steps in the client in order
to make use of the new functions. At the end
is only uses smbdirect.ko and its exported functions.

Then we have small steps in the server in order
to make use of the new functions. At the end
is only uses smbdirect.ko and its exported functions.

Then there's the move to global workqueues in
smbdirect.ko.

The addition of smbdirect_{bind,listen,accept}()
function and the transition of the server to
use them instead of the custom rdma listener.

Finally some unused stuff is removed.

Every patch compiles on its own and passes
  grep -v 'Fixes: 0626e6641f6b ' | \
  grep -v 'Fixes: 1ead2213dd7d ' | \
    scripts/checkpatch.pl --quiet --codespell \
      --ignore=FILE_PATH_CHANGES,EXPORT_SYMBOL,COMPLEX_MACRO

I've tested the client part with these tests at the
end of the patchset with mlx5_ib and rxe on the client side
using 'rdma,sec=ntlmssp' and 'rdma,sec=ntlmsspi'
against a Windows 2025 server.

For the clientThere are known problems with the irdma
driver for iwarp and roce. And there was also
an existing problem with siw against irdma iwarp
on the Windows server.

cifs/001
generic/001
generic/002
generic/005
generic/006
generic/007
generic/008
generic/011
generic/024
generic/028
generic/029
generic/030
generic/033
generic/036
generic/069
generic/071
generic/080
generic/084
generic/086
generic/095
generic/098
generic/103
generic/124
generic/130
generic/132
generic/135
generic/141
generic/198
generic/207
generic/210
generic/212
generic/214
generic/215
generic/221
generic/228
generic/236
generic/246
generic/248
generic/249
generic/257
generic/258
generic/308
generic/309
generic/313
generic/315
generic/339
generic/340
generic/344
generic/345
generic/346
generic/354
generic/360
generic/390
generic/391
generic/393
generic/394
generic/406
generic/412

I tested ksmbd with and without
'server signing = mandatory' in order to
test the cases with and without RDMA offload.

I tested a file copy of a ~5.5GB file
in the Windows Explorer, from and to the share.

And I tested
'frametest.exe -r 4k -t 20 -n 2000 Z:\framtest\testrundir'
'frametest.exe -w 4k -t 20 -n 2000 Z:\framtest\testrundir'

I tested with with mlx5_ib, irdma (roce) and rxe.
There's still a known problem with iwarp.

So far I can't see any regression compared the
state before these 144 patches.

Namjae, can you please test in your setup?

The for-7.0/smbdirect-ko-20260205-v5+ branch has
a build fix and scripts for out of tree testing,
you need to build/load smbdirect.ko first followed
by cifs.ko and/or ksmbd.ko. (For a full kernel build
with happens automatically...)

It would be nice to get this into the 7.0 merge
windows after for-next and ksmbd-for-next are merged.

From there I'll work on the changes to introduce IPPROTO_SMBDIRECT,
but that needs a bit more work an coordination
with the netdev-next and maybw rdma and io_uring trees, the
work in progress can be found here:
https://git.samba.org/?p=metze/linux/wip.git;a=shortlog;h=refs/heads/master-ipproto-smbdirect
The related Samba MR can be found here:
https://gitlab.com/samba-team/samba/-/merge_requests/4343
If someone wants to test it, but be warnt there are
still useless memcpy calls in the RDMA offload case,
which will need to be removed.

v5: rebase on the regression fixes in 6.18 and 6.19
    adding smbdirect_netdev_rdma_capable_node_type()
    and a lot of small fixes here and there...

v4: some functions are moved to smbdirect_socket.c
    and got smbdirect_socket_ as prefix.
    add and use smbdirect_{bind,listen,accept}()
    a lot of small fixes here and there...

v3: async connect/accept code was moved to
    workqueue functions instead of beeing
    called in interrupt context via
    IB_POLL_SOFTIRQ.
    Added some includes to smbdirect_socket.h
    I also did a few minor changes like using
    sc->ib.dev consistently.

Stefan Metzmacher (144):
  smb: smbdirect: let smbdirect.h include #include <linux/types.h>
  smb: smbdirect: introduce smbdirect_socket.logging infrastructure
  smb: smbdirect: add some logging to
    SMBDIRECT_CHECK_STATUS_{WARN,DISCONNECT}()
  smb: smbdirect: introduce smbdirect_all_c_files.c
  smb: smbdirect: introduce smbdirect_internal.h
  smb: client: include smbdirect_all_c_files.c
  smb: server: include smbdirect_all_c_files.c
  smb: smbdirect: introduce smbdirect_socket.c to be filled
  smb: smbdirect: introduce smbdirect_socket_prepare_create()
  smb: smbdirect: introduce smbdirect_socket_set_logging()
  smb: smbdirect: introduce smbdirect_socket_wake_up_all()
  smb: smbdirect: introduce smbdirect_socket_cleanup_work()
  smb: smbdirect: introduce
    smbdirect_socket_schedule_cleanup[{_lvl,_status}]()
  smb: smbdirect: introduce smbdirect_connection.c to be filled
  smb: smbdirect: introduce smbdirect_connection_{get,put}_recv_io()
  smb: smbdirect: introduce
    smbdirect_connection_reassembly_{append,first}_recv_io()
  smb: smbdirect: introduce smbdirect_connection_idle_timer_work()
  smb: smbdirect: set SMBDIRECT_KEEPALIVE_NONE before
    disable_delayed_work(&sc->idle.timer_work);
  smb: smbdirect: introduce smbdirect_frwr_is_supported()
  smb: smbdirect: introduce smbdirect_socket.{send,recv}_io.mem.gfp_mask
  smb: smbdirect: introduce smbdirect_connection_{alloc,free}_send_io()
  smb: smbdirect: introduce smbdirect_connection_send_io_done()
  smb: smbdirect: introduce
    smbdirect_connection_{create,destroy}_mem_pools()
  smb: smbdirect: introduce smbdirect_map_sges_from_iter() and helper
    functions
  smb: smbdirect: introduce smbdirect_connection_qp_event_handler()
  smb: smbdirect: introduce
    smbdirect_connection_negotiate_rdma_resources()
  smb: smbdirect: introduce smbdirect_connection_{create,destroy}_qp()
  smb: smbdirect: introduce smbdirect_connection_post_recv_io()
  smb: smbdirect: introduce smbdirect_connection_recv_io_refill_work()
  smb: smbdirect: split out smbdirect_connection_recv_io_refill()
  smb: smbdirect: introduce smbdirect_get_buf_page_count()
  smb: smbdirect: introduce smbdirect_socket_wait_for_credits()
  smb: smbdirect: introduce smbdirect_mr.c with client mr code
  smb: smbdirect: introduce smbdirect_rw.c with server rw code
  smb: smbdirect: define SMBDIRECT_MIN_{RECEIVE,FRAGMENTED}_SIZE
  smb: smbdirect: define SMBDIRECT_RDMA_CM_[RNR_]RETRY
  smb: smbdirect: introduce smbdirect_connection_recv_io_done()
  smb: smbdirect: introduce smbdirect_socket_destroy[_sync]()
  smb: smbdirect: introduce
    smbdirect_connection_rdma_{established,event_handler}()
  smb: smbdirect: introduce smbdirect_connection_recvmsg()
  smb: smbdirect: introduce smbdirect_connection_grant_recv_credits()
  smb: smbdirect: introduce smbdirect_connection_request_keep_alive()
  smb: smbdirect: introduce smbdirect_connection_send_iter() and related
    functions
  smb: smbdirect: introduce smbdirect_connection_send_immediate_work()
  smb: smbdirect: introduce smbdirect_connection_negotiation_done()
  smb: smbdirect: introduce smbdirect_mr_io_fill_buffer_descriptor()
  smb: smbdirect: introduce
    smbdirect_connection_legacy_debug_proc_show()
  smb: smbdirect: introduce smbdirect_connection_wait_for_connected()
  smb: smbdirect: introduce smbdirect_connection_is_connected()
  smb: smbdirect: introduce smbdirect_socket_shutdown()
  smb: smbdirect: introduce smbdirect_socket_init_{new,accepting}() and
    helpers
  smb: smbdirect: let smbdirect_socket_set_initial_parameters() call
    rdma_restrict_node_type()
  smb: smbdirect: introduce smbdirect_connect[_sync]()
  smb: smbdirect: introduce smbdirect_accept_connect_request()
  smb: smbdirect: introduce smbdirect_socket_create_{kern,accepting}()
    and smbdirect_socket_release()
  smb: smbdirect: let smbdirect_socket.h include all headers for used
    structures
  smb: smbdirect: let smbdirect_internal.h define pr_fmt without
    SMBDIRECT_USE_INLINE_C_FILES
  smb: smbdirect: introduce smbdirect_public.h with prototypes
  smb: smbdirect: provide explicit prototypes for cross .c file
    functions
  smb: smbdirect: introduce smbdirect_init_send_batch_storage()
  smb: smbdirect: split out smbdirect_accept_negotiate_finish()
  smb: smbdirect: introduce smbdirect_socket_bind()
  smb: smbdirect: introduce smbdirect_socket_{listen,accept}()
  smb: smbdirect: introduce the basic smbdirect.ko
  smb: client: make use of smbdirect_socket_prepare_create()
  smb: client: make use of smbdirect_socket_set_logging()
  smb: client: make use of smbdirect_socket_wake_up_all()
  smb: client: make use of smbdirect_socket_cleanup_work()
  smb: client: make use of smbdirect_socket_schedule_cleanup()
  smb: client: make use of smbdirect_connection_{get,put}_recv_io()
  smb: client: make use of
    smbdirect_connection_reassembly_{append,first}_recv_io()
  smb: client: make use of smbdirect_connection_idle_timer_work()
  smb: client: make use of smbdirect_frwr_is_supported()
  smb: client: make use of smbdirect_connection_{alloc,free}_send_io()
  smb: client: make use of smbdirect_connection_send_io_done()
  smb: client: make use of
    smbdirect_connection_{create,destroy}_mem_pools()
  smb: client: make use of smbdirect_map_sges_from_iter()
  smb: client: make use of smbdirect_connection_qp_event_handler()
  smb: client: make use of
    smbdirect_connection_negotiate_rdma_resources()
  smb: client: make use of smbdirect_connection_{create,destroy}_qp()
  smb: client: initialize recv_io->cqe.done = recv_done just once
  smb: client: make use of smbdirect_connection_post_recv_io()
  smb: client: make use of smbdirect_connection_recv_io_refill_work()
  smb: client: make use of functions from smbdirect_mr.c
  smb: client: make use of smbdirect_socket_destroy_sync()
  smb: client: make use of smbdirect_connection_recvmsg()
  smb: client: make use of smbdirect_connection_grant_recv_credits()
  smb: client: make use of smbdirect_connection_request_keep_alive()
  smb: client: change smbd_post_send_empty() to void return
  smb: client: let smbd_post_send_iter() get remaining_length and return
    data_length
  smb: client: let smbd_post_send_full_iter() get remaining_length and
    return data_length
  smb: client: make use of
    smbdirect_connection_send_{single_iter,immediate_work}()
  smb: client: introduce and use smbd_mr_fill_buffer_descriptor()
  smb: client: introduce and use smbd_debug_proc_show()
  smb: client: make use of smbdirect_socket_init_new() and
    smbdirect_connect_sync()
  smb: client: make use of
    smbdirect_socket_create_kern()/smbdirect_socket_release()
  smb: client: only use public smbdirect functions
  smb: client: make use of smbdirect.ko
  smb: server: make use of smbdirect_socket_prepare_create()
  smb: server: make use of smbdirect_socket_set_logging()
  smb: server: make use of smbdirect_socket_wake_up_all()
  smb: server: make use of smbdirect_socket_cleanup_work()
  smb: server: make use of smbdirect_socket_schedule_cleanup()
  smb: server: make use of smbdirect_connection_{get,put}_recv_io()
  smb: server: make use of
    smbdirect_connection_reassembly_{append,first}_recv_io()
  smb: server: make use of smbdirect_connection_idle_timer_work()
  smb: server: make use of smbdirect_frwr_is_supported()
  smb: server: make use of smbdirect_connection_{alloc,free}_send_io()
  smb: server: make use of smbdirect_connection_send_io_done()
  smb: server: make use of
    smbdirect_connection_{create,destroy}_mem_pools()
  smb: server: make use of smbdirect_map_sges_from_iter()
  smb: server: make use of smbdirect_connection_qp_event_handler()
  smb: server: make use of
    smbdirect_connection_negotiate_rdma_resources()
  smb: server: make use of smbdirect_connection_{create,destroy}_qp()
  smb: server: make use of smbdirect_connection_post_recv_io()
  smb: server: make use of smbdirect_connection_recv_io_refill[_work]()
  smb: server: make use of smbdirect_get_buf_page_count()
  smb: server: make use of smbdirect_socket_wait_for_credits()
  smb: server: make use of functions from smbdirect_rw.c
  smb: server: make use of smbdirect_socket_destroy_sync()
  smb: server: make use of smbdirect_connection_recvmsg()
  smb: server: make use of smbdirect_connection_grant_recv_credits()
  smb: server: make use of smbdirect_connection_request_keep_alive()
  smb: server: move iov_iter_kvec() out of smb_direct_post_send_data()
  smb: server: inline smb_direct_create_header() into
    smb_direct_post_send_data()
  smb: server: let smbdirect_map_sges_from_iter() truncate the message
    boundary
  smb: server: split out smb_direct_send_iter() out of
    smb_direct_writev()
  smb: server: let smb_direct_post_send_data() return data_length
  smb: server: make use of smbdirect_connection_send_iter() and related
    functions
  smb: server: make use of
    smbdirect_{socket_init_accepting,connection_wait_for_connected}()
  smb: server: make use of
    smbdirect_socket_create_accepting()/smbdirect_socket_release()
  smb: server: only use public smbdirect functions
  smb: server: make use of smbdirect_socket_{listen,accept}()
  smb: server: remove unused ksmbd_transport_ops.prepare()
  smb: server: make use of smbdirect.ko
  smb: smbdirect: introduce smbdirect_netdev_rdma_capable_mode_type()
  smb: server: make use of smbdirect_netdev_rdma_capable_mode_type()
  smb: smbdirect: wrap rdma_disconnect() in rdma_[un]lock_handler()
  smb: smbdirect: remove unused
    smbdirect_connection_mr_io_recovery_work()
  smb: smbdirect: prepare use of dedicated workqueues for different
    steps
  smb: smbdirect: introduce global workqueues
  smb: client: no longer use smbdirect_socket_set_custom_workqueue()
  smb: server: no longer use smbdirect_socket_set_custom_workqueue()
  smb: smbdirect: remove unused SMBDIRECT_USE_INLINE_C_FILES logic

 fs/smb/Kconfig                                |    1 +
 fs/smb/client/Kconfig                         |    3 +-
 fs/smb/client/cifs_debug.c                    |   67 +-
 fs/smb/client/smb2pdu.c                       |    9 +-
 fs/smb/client/smbdirect.c                     | 3350 ++---------------
 fs/smb/client/smbdirect.h                     |   19 +-
 fs/smb/common/Makefile                        |    1 +
 fs/smb/common/smbdirect/Kconfig               |    9 +
 fs/smb/common/smbdirect/Makefile              |   18 +
 fs/smb/common/smbdirect/smbdirect.h           |    9 +
 fs/smb/common/smbdirect/smbdirect_accept.c    |  857 +++++
 fs/smb/common/smbdirect/smbdirect_connect.c   |  925 +++++
 .../common/smbdirect/smbdirect_connection.c   | 2175 +++++++++++
 fs/smb/common/smbdirect/smbdirect_debug.c     |   88 +
 fs/smb/common/smbdirect/smbdirect_devices.c   |  276 ++
 fs/smb/common/smbdirect/smbdirect_internal.h  |  142 +
 fs/smb/common/smbdirect/smbdirect_listen.c    |  308 ++
 fs/smb/common/smbdirect/smbdirect_main.c      |  120 +
 fs/smb/common/smbdirect/smbdirect_mr.c        |  486 +++
 fs/smb/common/smbdirect/smbdirect_pdu.h       |    4 +
 fs/smb/common/smbdirect/smbdirect_public.h    |  148 +
 fs/smb/common/smbdirect/smbdirect_rw.c        |  255 ++
 fs/smb/common/smbdirect/smbdirect_socket.c    |  723 ++++
 fs/smb/common/smbdirect/smbdirect_socket.h    |  303 +-
 fs/smb/server/Kconfig                         |    4 +-
 fs/smb/server/connection.c                    |    5 -
 fs/smb/server/connection.h                    |    1 -
 fs/smb/server/smb2pdu.c                       |    1 -
 fs/smb/server/transport_rdma.c                | 3167 ++--------------
 fs/smb/server/transport_rdma.h                |    4 +-
 30 files changed, 7451 insertions(+), 6027 deletions(-)
 create mode 100644 fs/smb/common/smbdirect/Kconfig
 create mode 100644 fs/smb/common/smbdirect/Makefile
 create mode 100644 fs/smb/common/smbdirect/smbdirect_accept.c
 create mode 100644 fs/smb/common/smbdirect/smbdirect_connect.c
 create mode 100644 fs/smb/common/smbdirect/smbdirect_connection.c
 create mode 100644 fs/smb/common/smbdirect/smbdirect_debug.c
 create mode 100644 fs/smb/common/smbdirect/smbdirect_devices.c
 create mode 100644 fs/smb/common/smbdirect/smbdirect_internal.h
 create mode 100644 fs/smb/common/smbdirect/smbdirect_listen.c
 create mode 100644 fs/smb/common/smbdirect/smbdirect_main.c
 create mode 100644 fs/smb/common/smbdirect/smbdirect_mr.c
 create mode 100644 fs/smb/common/smbdirect/smbdirect_public.h
 create mode 100644 fs/smb/common/smbdirect/smbdirect_rw.c
 create mode 100644 fs/smb/common/smbdirect/smbdirect_socket.c

-- 
2.43.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v5 000/144] smb: smbdirect/client/server: moving to common functions and smbdirect.ko
  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
  1 sibling, 1 reply; 14+ messages in thread
From: Namjae Jeon @ 2026-02-06 15:13 UTC (permalink / raw)
  To: Stefan Metzmacher
  Cc: Steve French, Tom Talpey, Long Li, David Howells, Paulo Alcantara,
	linux-cifs, samba-technical

> Namjae, can you please test in your setup?
There are no issues in my testing, but since there are a lot of
patches in this series, I need a few more days to review them.
Thanks.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v5 000/144] smb: smbdirect/client/server: moving to common functions and smbdirect.ko
  2026-02-06 15:13 ` Namjae Jeon
@ 2026-02-06 15:17   ` Stefan Metzmacher
  0 siblings, 0 replies; 14+ messages in thread
From: Stefan Metzmacher @ 2026-02-06 15:17 UTC (permalink / raw)
  To: Namjae Jeon
  Cc: Steve French, Tom Talpey, Long Li, David Howells, Paulo Alcantara,
	linux-cifs, samba-technical

Am 06.02.26 um 16:13 schrieb Namjae Jeon:
>> Namjae, can you please test in your setup?
> There are no issues in my testing,

Great thanks for testing!

> but since there are a lot of
> patches in this series, I need a few more days to review them.

Sure and thanks for doing it at all!

metze

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v5 000/144] smb: smbdirect/client/server: moving to common functions and smbdirect.ko
  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-09  7:29 ` Namjae Jeon
  2026-02-09 13:22   ` Stefan Metzmacher
  1 sibling, 1 reply; 14+ messages in thread
From: Namjae Jeon @ 2026-02-09  7:29 UTC (permalink / raw)
  To: Stefan Metzmacher
  Cc: Steve French, Tom Talpey, Long Li, David Howells, Paulo Alcantara,
	linux-cifs, samba-technical

>
> 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.

>
> 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
ksmbd: smb_direct: status=ERROR first_error=-ESHUTDOWN => -ENOTCONN
ksmbd: smb_direct: smbdirect_socket_schedule_cleanup(-ESHUTDOWN)
called from smbdirect_socket_shutdown in line=650 status=CONNECTED
ksmbd: smb_direct: status=ERROR first_error=-ESHUTDOWN => -ENOTCONN
ksmbd: smb_direct: smbdirect_socket_schedule_cleanup(-ESHUTDOWN)
called from smbdirect_socket_shutdown in line=650 status=CONNECTED
ksmbd: smb_direct: status=ERROR first_error=-ESHUTDOWN => -ENOTCONN
ksmbd: smb_direct: status=DISCONNECTING first_error=-ESHUTDOWN => -ENOTCONN

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v5 000/144] smb: smbdirect/client/server: moving to common functions and smbdirect.ko
  2026-02-09  7:29 ` Namjae Jeon
@ 2026-02-09 13:22   ` Stefan Metzmacher
  2026-02-09 19:10     ` Stefan Metzmacher
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Metzmacher @ 2026-02-09 13:22 UTC (permalink / raw)
  To: Namjae Jeon
  Cc: Steve French, Tom Talpey, Long Li, David Howells, Paulo Alcantara,
	linux-cifs, 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?

metze

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v5 000/144] smb: smbdirect/client/server: moving to common functions and smbdirect.ko
  2026-02-09 13:22   ` Stefan Metzmacher
@ 2026-02-09 19:10     ` Stefan Metzmacher
  2026-02-10 14:37       ` Namjae Jeon
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Metzmacher @ 2026-02-09 19:10 UTC (permalink / raw)
  To: Namjae Jeon
  Cc: David Howells, Paulo Alcantara, linux-cifs, samba-technical,
	Tom Talpey, Steve French

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

metze


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v5 000/144] smb: smbdirect/client/server: moving to common functions and smbdirect.ko
  2026-02-09 19:10     ` Stefan Metzmacher
@ 2026-02-10 14:37       ` Namjae Jeon
  2026-02-12 20:05         ` Stefan Metzmacher
       [not found]         ` <CAH2r5muf=Th_AbA7SZaQKApyvr81FMB8WF-5yZ3ihzap1swQWg@mail.gmail.com>
  0 siblings, 2 replies; 14+ messages in thread
From: Namjae Jeon @ 2026-02-10 14:37 UTC (permalink / raw)
  To: Stefan Metzmacher
  Cc: David Howells, Paulo Alcantara, linux-cifs, samba-technical,
	Tom Talpey, Steve French

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.
>
> metze
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v5 000/144] smb: smbdirect/client/server: moving to common functions and smbdirect.ko
  2026-02-10 14:37       ` Namjae Jeon
@ 2026-02-12 20:05         ` Stefan Metzmacher
       [not found]         ` <CAH2r5muf=Th_AbA7SZaQKApyvr81FMB8WF-5yZ3ihzap1swQWg@mail.gmail.com>
  1 sibling, 0 replies; 14+ messages in thread
From: Stefan Metzmacher @ 2026-02-12 20:05 UTC (permalink / raw)
  To: Namjae Jeon
  Cc: David Howells, Paulo Alcantara, linux-cifs, samba-technical,
	Tom Talpey, Steve French

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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH v5 000/144] smb: smbdirect/client/server: moving to common functions and smbdirect.ko
       [not found]                   ` <c5aef237-2a12-4be5-b917-de502780be85@samba.org>
@ 2026-02-12 21:07                     ` Steve French
  2026-02-16 13:49                       ` Stefan Metzmacher
  0 siblings, 1 reply; 14+ messages in thread
From: Steve French @ 2026-02-12 21:07 UTC (permalink / raw)
  To: Stefan Metzmacher
  Cc: Namjae Jeon, David Howells, Paulo Alcantara, Tom Talpey, CIFS,
	samba-technical

I have updated ksmbd-for-next with the first 57 patches in the
smbdirect/RDMA series.

418c4323705 (HEAD -> ksmbd-for-next, origin/ksmbd-for-next) smb:
smbdirect: let smbdirect_internal.h define pr_fmt without
SMBDIRECT_USE_INLINE_C_FILES
fbb6a3b2d26d smb: smbdirect: let smbdirect_socket.h include all
headers for used structures
ae6c9a6e0550 smb: smbdirect: introduce
smbdirect_socket_create_{kern,accepting}() and
smbdirect_socket_release()
437aba3f5a12 smb: smbdirect: introduce smbdirect_accept_connect_request()
b3ddfc3f09be smb: smbdirect: introduce smbdirect_connect[_sync]()
4ad8cf4f2959 smb: smbdirect: let
smbdirect_socket_set_initial_parameters() call
rdma_restrict_node_type()
e6da0c18d7ba smb: smbdirect: introduce
smbdirect_socket_init_{new,accepting}() and helpers
ef37f9d51034 smb: smbdirect: introduce smbdirect_socket_shutdown()
dfa0af2a16b6 smb: smbdirect: introduce smbdirect_connection_is_connected()
f85af9e7c614 smb: smbdirect: introduce smbdirect_connection_wait_for_connected()
c35cf02d82cc smb: smbdirect: introduce
smbdirect_connection_legacy_debug_proc_show()
d35a8675ea36 smb: smbdirect: introduce smbdirect_mr_io_fill_buffer_descriptor()
4cbd37ad2e75 smb: smbdirect: introduce smbdirect_connection_negotiation_done()
b6942a30409b smb: smbdirect: introduce
smbdirect_connection_send_immediate_work()
d1b71276a998 smb: smbdirect: introduce
smbdirect_connection_send_iter() and related functions
84841c14ec8a smb: smbdirect: introduce smbdirect_connection_request_keep_alive()
bd3c43a9716a smb: smbdirect: introduce smbdirect_connection_grant_recv_credits()
6dd5b927120f smb: smbdirect: introduce smbdirect_connection_recvmsg()
19b86a60f1f6 smb: smbdirect: introduce
smbdirect_connection_rdma_{established,event_handler}()
5a522e9a8c6d smb: smbdirect: introduce smbdirect_socket_destroy[_sync]()
ddc50831c9be smb: smbdirect: introduce smbdirect_connection_recv_io_done()
cbc524baa4bf smb: smbdirect: define SMBDIRECT_RDMA_CM_[RNR_]RETRY
5452fd00c3c3 smb: smbdirect: define SMBDIRECT_MIN_{RECEIVE,FRAGMENTED}_SIZE
5ab0987c492e smb: smbdirect: introduce smbdirect_rw.c with server rw code
1fed7d7a575b smb: smbdirect: introduce smbdirect_mr.c with client mr code
519897951f16 smb: smbdirect: introduce smbdirect_socket_wait_for_credits()
ff104281df37 smb: smbdirect: introduce smbdirect_get_buf_page_count()
e185a680089a smb: smbdirect: split out smbdirect_connection_recv_io_refill()
09c02027a5ac smb: smbdirect: introduce
smbdirect_connection_recv_io_refill_work()
d42c83ba4b83 smb: smbdirect: introduce smbdirect_connection_post_recv_io()
f2f3bb3d9b18 smb: smbdirect: introduce
smbdirect_connection_{create,destroy}_qp()
12139caae21f smb: smbdirect: introduce
smbdirect_connection_negotiate_rdma_resources()
30148e9426b8 smb: smbdirect: introduce smbdirect_connection_qp_event_handler()
9d6ebcaad731 smb: smbdirect: introduce smbdirect_map_sges_from_iter()
and helper functions
dee0c074b3a0 smb: smbdirect: introduce
smbdirect_connection_{create,destroy}_mem_pools()
28b1dedc499d smb: smbdirect: introduce smbdirect_connection_send_io_done()
bbbd815fdc94 smb: smbdirect: introduce
smbdirect_connection_{alloc,free}_send_io()
e1ff37aac3de smb: smbdirect: introduce
smbdirect_socket.{send,recv}_io.mem.gfp_mask
cbcf99b37f2d smb: smbdirect: introduce smbdirect_frwr_is_supported()
67738ec11efd smb: smbdirect: set SMBDIRECT_KEEPALIVE_NONE before
disable_delayed_work(&sc->idle.timer_work);
3dc5533c82f1 smb: smbdirect: introduce smbdirect_connection_idle_timer_work()
754d0caee03e smb: smbdirect: introduce
smbdirect_connection_reassembly_{append,first}_recv_io()
8ac22b59de12 smb: smbdirect: introduce smbdirect_connection_{get,put}_recv_io()
084df3a8fff8 smb: smbdirect: introduce smbdirect_connection.c to be filled
38fc1ca14df1 smb: smbdirect: introduce
smbdirect_socket_schedule_cleanup[{_lvl,_status}]()
4c9193a71b42 smb: smbdirect: introduce smbdirect_socket_cleanup_work()
37cdd6f6b78b smb: smbdirect: introduce smbdirect_socket_wake_up_all()
d393bc165a56 smb: smbdirect: introduce smbdirect_socket_set_logging()
e40786a49a70 smb: smbdirect: introduce smbdirect_socket_prepare_create()
cd1901e4253f smb: smbdirect: introduce smbdirect_socket.c to be filled
60a8be543197 smb: server: include smbdirect_all_c_files.c
c2edeca18a48 smb: client: include smbdirect_all_c_files.c
04bdb6fe7fab smb: smbdirect: introduce smbdirect_internal.h
8cddb86e72fc smb: smbdirect: introduce smbdirect_all_c_files.c
54b3a5306dca smb: smbdirect: add some logging to
SMBDIRECT_CHECK_STATUS_{WARN,DISCONNECT}()
7f492e5767f9 smb: smbdirect: introduce smbdirect_socket.logging infrastructure
e1b49deab6cb smb: smbdirect: let smbdirect.h include #include <linux/types.h>
d53f4d93f3d6 Merge tag 'v7.0-rc-part1-ksmbd-and-smbdirect-fixes' of
git://git.samba.org/ksmbd

On Thu, Feb 12, 2026 at 3:05 PM Stefan Metzmacher <metze@samba.org> wrote:
>
> Am 12.02.26 um 22:01 schrieb Steve French:
> > I have updated patch 33 and 55 (see attached) with the checkpatch suggestion
>
> Thanks!
>
> > On Thu, Feb 12, 2026 at 2:45 PM Stefan Metzmacher <metze@samba.org> wrote:
> >>
> >> Am 12.02.26 um 21:40 schrieb Steve French:
> >>> Should we fixup patch 33 in your series to address the warning:
> >>>
> >>> 145/0033-smb-smbdirect-introduce-smbdirect_mr.c-with-client-m.patch
> >>> -------------------------------------------------------------------
> >>> WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
> >>> #45:
> >>> new file mode 100644
> >>>
> >>> WARNING: Prefer kzalloc_obj over kzalloc with sizeof
> >>> #84: FILE: fs/smb/common/smbdirect/smbdirect_mr.c:35:
> >>> + mr = kzalloc(sizeof(*mr), GFP_KERNEL);
> >>
> >> If you want.
> >>
> >> kzalloc_obj was just recently added and the code is mostly
> >> copy and paste from the client code.
> >>
> >
> >
>


-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v5 000/144] smb: smbdirect/client/server: moving to common functions and smbdirect.ko
  2026-02-12 21:07                     ` Steve French
@ 2026-02-16 13:49                       ` Stefan Metzmacher
  2026-02-17  1:02                         ` Steve French
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Metzmacher @ 2026-02-16 13:49 UTC (permalink / raw)
  To: Steve French
  Cc: Namjae Jeon, David Howells, Paulo Alcantara, Tom Talpey, CIFS,
	samba-technical, Arnd Bergmann

Hi Steve,

for-7.0/smbdirect-ko-20260216-v8 at commit:
8a2259252f084fe55411346d58a1160fc69b7d30
git fetch https://git.samba.org/metze/linux/wip.git for-7.0/smbdirect-ko-20260216-v8
https://git.samba.org/?p=metze/linux/wip.git;a=shortlog;h=refs/heads/for-7.0/smbdirect-ko-20260216-v8

fixes 3 problems:
compared to for-7.0/smbdirect-ko-20260213-v7:

- We use BUILD_BUG_ON(sizeof(*batch) > sizeof(*storage));
   instead of BUILD_BUG_ON(sizeof(*batch) < sizeof(*storage));
   Closes: https://lore.kernel.org/oe-kbuild-all/202602141417.hsmt2AAb-lkp@intel.com/
- We now use [SMBDIRECT_DEBUG_]ERR_PTR(ret) with %1pe
   instead of errname(ret) with %s
   Closes: https://lore.kernel.org/oe-kbuild-all/202602141435.Sm9ZppiO-lkp@intel.com/
- We use 'select SG_POOL' for the client as long
   as smbdirect_all_c_files.c is used
   Closes: https://lore.kernel.org/linux-cifs/20260216105404.2381695-1-arnd@kernel.org/

The overall diff to the current ksmbd-for-next
(at commit 2a43d1cf4bd3bc0cff03f0926e83895a7462ad05) is pasted below:

Please replace ksmbd-for-next with commit
8a2259252f084fe55411346d58a1160fc69b7d30,

Thanks!
metze

  fs/smb/client/smbdirect.c                      |  5 ++---
  fs/smb/common/smbdirect/smbdirect_connection.c | 26 +++++++++++++-------------
  fs/smb/common/smbdirect/smbdirect_devices.c    |  3 ++-
  fs/smb/common/smbdirect/smbdirect_internal.h   |  1 -
  fs/smb/common/smbdirect/smbdirect_main.c       |  3 ++-
  fs/smb/common/smbdirect/smbdirect_mr.c         | 21 +++++++++++----------
  fs/smb/common/smbdirect/smbdirect_socket.c     |  3 ++-
  fs/smb/server/transport_rdma.c                 | 25 ++++++++++++-------------
  8 files changed, 44 insertions(+), 43 deletions(-)

diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c
index de3b51fa2d62..ff80072dc9ff 100644
--- a/fs/smb/client/smbdirect.c
+++ b/fs/smb/client/smbdirect.c
@@ -5,7 +5,6 @@
   *   Author(s): Long Li <longli@microsoft.com>
   */

-#include <linux/errname.h>
  #include "smbdirect.h"
  #include "cifs_debug.h"
  #include "cifsproto.h"
@@ -325,8 +324,8 @@ static struct smbd_connection *_smbd_get_connection(

  	ret = smbdirect_connect_sync(sc, dstaddr);
  	if (ret) {
-		log_rdma_event(ERR, "connect to %pISpsfc failed: %s\n",
-			       dstaddr, errname(ret));
+		log_rdma_event(ERR, "connect to %pISpsfc failed: %1pe\n",
+			       dstaddr, ERR_PTR(ret));
  		goto connect_failed;
  	}

diff --git a/fs/smb/common/smbdirect/smbdirect_connection.c b/fs/smb/common/smbdirect/smbdirect_connection.c
index 813ddd87c6ae..1e946f78e935 100644
--- a/fs/smb/common/smbdirect/smbdirect_connection.c
+++ b/fs/smb/common/smbdirect/smbdirect_connection.c
@@ -968,7 +968,7 @@ smbdirect_init_send_batch_storage(struct smbdirect_send_batch_storage *storage,
  	struct smbdirect_send_batch *batch = (struct smbdirect_send_batch *)storage;

  	memset(storage, 0, sizeof(*storage));
-	BUILD_BUG_ON(sizeof(*batch) < sizeof(*storage));
+	BUILD_BUG_ON(sizeof(*batch) > sizeof(*storage));

  	smbdirect_connection_send_batch_init(batch,
  					     need_invalidate_rkey,
@@ -1111,10 +1111,10 @@ int smbdirect_connection_send_single_iter(struct smbdirect_socket *sc,

  	if (sc->status != SMBDIRECT_SOCKET_CONNECTED) {
  		smbdirect_log_write(sc, SMBDIRECT_LOG_ERR,
-			"status=%s first_error=%1pe => %s\n",
+			"status=%s first_error=%1pe => %1pe\n",
  			smbdirect_socket_status_string(sc->status),
  			SMBDIRECT_DEBUG_ERR_PTR(sc->first_error),
-			errname(-ENOTCONN));
+			SMBDIRECT_DEBUG_ERR_PTR(-ENOTCONN));
  		return -ENOTCONN;
  	}

@@ -1273,10 +1273,10 @@ int smbdirect_connection_send_wait_zero_pending(struct smbdirect_socket *sc)
  		   sc->status != SMBDIRECT_SOCKET_CONNECTED);
  	if (sc->status != SMBDIRECT_SOCKET_CONNECTED) {
  		smbdirect_log_write(sc, SMBDIRECT_LOG_ERR,
-			"status=%s first_error=%1pe => %s\n",
+			"status=%s first_error=%1pe => %1pe\n",
  			smbdirect_socket_status_string(sc->status),
  			SMBDIRECT_DEBUG_ERR_PTR(sc->first_error),
-			errname(-ENOTCONN));
+			SMBDIRECT_DEBUG_ERR_PTR(-ENOTCONN));
  		return -ENOTCONN;
  	}

@@ -1305,10 +1305,10 @@ int smbdirect_connection_send_iter(struct smbdirect_socket *sc,

  	if (sc->status != SMBDIRECT_SOCKET_CONNECTED) {
  		smbdirect_log_write(sc, SMBDIRECT_LOG_INFO,
-			"status=%s first_error=%1pe => %s\n",
+			"status=%s first_error=%1pe => %1pe\n",
  			smbdirect_socket_status_string(sc->status),
  			SMBDIRECT_DEBUG_ERR_PTR(sc->first_error),
-			errname(-ENOTCONN));
+			SMBDIRECT_DEBUG_ERR_PTR(-ENOTCONN));
  		return -ENOTCONN;
  	}

@@ -1485,8 +1485,8 @@ int smbdirect_connection_post_recv_io(struct smbdirect_recv_io *msg)
  	ret = ib_post_recv(sc->ib.qp, &recv_wr, NULL);
  	if (ret) {
  		smbdirect_log_rdma_recv(sc, SMBDIRECT_LOG_ERR,
-			"ib_post_recv failed ret=%d (%s)\n",
-			ret, errname(ret));
+			"ib_post_recv failed ret=%d (%1pe)\n",
+			ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
  		ib_dma_unmap_single(sc->ib.dev,
  				    msg->sge.addr,
  				    msg->sge.length,
@@ -1716,8 +1716,8 @@ int smbdirect_connection_recv_io_refill(struct smbdirect_socket *sc)
  		ret = smbdirect_connection_post_recv_io(recv_io);
  		if (ret) {
  			smbdirect_log_rdma_recv(sc, SMBDIRECT_LOG_ERR,
-				"smbdirect_connection_post_recv_io failed rc=%d (%s)\n",
-				ret, errname(ret));
+				"smbdirect_connection_post_recv_io failed rc=%d (%1pe)\n",
+				ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
  			smbdirect_connection_put_recv_io(recv_io);
  			return ret;
  		}
@@ -1802,10 +1802,10 @@ int smbdirect_connection_recvmsg(struct smbdirect_socket *sc,
  again:
  	if (sc->status != SMBDIRECT_SOCKET_CONNECTED) {
  		smbdirect_log_read(sc, SMBDIRECT_LOG_INFO,
-			"status=%s first_error=%1pe => %s\n",
+			"status=%s first_error=%1pe => %1pe\n",
  			smbdirect_socket_status_string(sc->status),
  			SMBDIRECT_DEBUG_ERR_PTR(sc->first_error),
-			errname(-ENOTCONN));
+			SMBDIRECT_DEBUG_ERR_PTR(-ENOTCONN));
  		return -ENOTCONN;
  	}

diff --git a/fs/smb/common/smbdirect/smbdirect_devices.c b/fs/smb/common/smbdirect/smbdirect_devices.c
index d1a251141145..3ace41af2200 100644
--- a/fs/smb/common/smbdirect/smbdirect_devices.c
+++ b/fs/smb/common/smbdirect/smbdirect_devices.c
@@ -249,7 +249,8 @@ __init int smbdirect_devices_init(void)

  	ret = ib_register_client(&smbdirect_ib_client);
  	if (ret) {
-		pr_err("failed to ib_register_client: %d %s\n", ret, errname(ret));
+		pr_crit("failed to ib_register_client: %d %1pe\n",
+			ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
  		return ret;
  	}

diff --git a/fs/smb/common/smbdirect/smbdirect_internal.h b/fs/smb/common/smbdirect/smbdirect_internal.h
index 09a4ce8ed863..30a1b8643657 100644
--- a/fs/smb/common/smbdirect/smbdirect_internal.h
+++ b/fs/smb/common/smbdirect/smbdirect_internal.h
@@ -8,7 +8,6 @@

  #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

-#include <linux/errname.h>
  #include "smbdirect.h"
  #include "smbdirect_pdu.h"
  #include "smbdirect_public.h"
diff --git a/fs/smb/common/smbdirect/smbdirect_main.c b/fs/smb/common/smbdirect/smbdirect_main.c
index 266d00da25f6..fe6e8d93c34c 100644
--- a/fs/smb/common/smbdirect/smbdirect_main.c
+++ b/fs/smb/common/smbdirect/smbdirect_main.c
@@ -91,7 +91,8 @@ static __init int smbdirect_module_init(void)
  	destroy_workqueue(smbdirect_globals.workqueues.accept);
  alloc_accept_wq_failed:
  	mutex_unlock(&smbdirect_globals.mutex);
-	pr_crit("failed to loaded: %d (%s)\n", ret, errname(ret));
+	pr_crit("failed to loaded: %d (%1pe)\n",
+		ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
  	return ret;
  }

diff --git a/fs/smb/common/smbdirect/smbdirect_mr.c b/fs/smb/common/smbdirect/smbdirect_mr.c
index 5e9420d01fe3..32668c58efb0 100644
--- a/fs/smb/common/smbdirect/smbdirect_mr.c
+++ b/fs/smb/common/smbdirect/smbdirect_mr.c
@@ -43,8 +43,9 @@ int smbdirect_connection_create_mr_list(struct smbdirect_socket *sc)
  		if (IS_ERR(mr->mr)) {
  			ret = PTR_ERR(mr->mr);
  			smbdirect_log_rdma_mr(sc, SMBDIRECT_LOG_ERR,
-				"ib_alloc_mr failed ret=%d (%s) type=0x%x max_frmr_depth=%u\n",
-				ret, errname(ret), sc->mr_io.type, sp->max_frmr_depth);
+				"ib_alloc_mr failed ret=%d (%1pe) type=0x%x max_frmr_depth=%u\n",
+				ret, SMBDIRECT_DEBUG_ERR_PTR(ret),
+				sc->mr_io.type, sp->max_frmr_depth);
  			goto ib_alloc_mr_failed;
  		}
  		mr->sgt.sgl = kcalloc(sp->max_frmr_depth,
@@ -173,8 +174,8 @@ smbdirect_connection_get_mr_io(struct smbdirect_socket *sc)
  				       sc->status != SMBDIRECT_SOCKET_CONNECTED);
  	if (ret) {
  		smbdirect_log_rdma_mr(sc, SMBDIRECT_LOG_ERR,
-			"wait_event_interruptible ret=%d (%s)\n",
-			ret, errname(ret));
+			"wait_event_interruptible ret=%d (%1pe)\n",
+			ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
  		return NULL;
  	}

@@ -304,8 +305,8 @@ smbdirect_connection_register_mr_io(struct smbdirect_socket *sc,
  	ret = ib_dma_map_sg(sc->ib.dev, mr->sgt.sgl, mr->sgt.nents, mr->dir);
  	if (!ret) {
  		smbdirect_log_rdma_mr(sc, SMBDIRECT_LOG_ERR,
-			"ib_dma_map_sg num_pages=%u dir=%x ret=%d (%s)\n",
-			num_pages, mr->dir, ret, errname(ret));
+			"ib_dma_map_sg num_pages=%u dir=%x ret=%d (%1pe)\n",
+			num_pages, mr->dir, ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
  		goto dma_map_error;
  	}

@@ -348,8 +349,8 @@ smbdirect_connection_register_mr_io(struct smbdirect_socket *sc,
  	}

  	smbdirect_log_rdma_mr(sc, SMBDIRECT_LOG_ERR,
-		"ib_post_send failed ret=%d (%s) reg_wr->key=0x%x\n",
-		ret, errname(ret), reg_wr->key);
+		"ib_post_send failed ret=%d (%1pe) reg_wr->key=0x%x\n",
+		ret, SMBDIRECT_DEBUG_ERR_PTR(ret), reg_wr->key);

  map_mr_error:
  	ib_dma_unmap_sg(sc->ib.dev, mr->sgt.sgl, mr->sgt.nents, mr->dir);
@@ -435,8 +436,8 @@ void smbdirect_connection_deregister_mr_io(struct smbdirect_mr_io *mr)
  		ret = ib_post_send(sc->ib.qp, wr, NULL);
  		if (ret) {
  			smbdirect_log_rdma_mr(sc, SMBDIRECT_LOG_ERR,
-				"ib_post_send failed ret=%d (%s)\n",
-				ret, errname(ret));
+				"ib_post_send failed ret=%d (%1pe)\n",
+				ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
  			smbdirect_mr_io_disable_locked(mr);
  			smbdirect_socket_schedule_cleanup(sc, ret);
  			goto done;
diff --git a/fs/smb/common/smbdirect/smbdirect_socket.c b/fs/smb/common/smbdirect/smbdirect_socket.c
index 073df565f347..74e31b35a2f6 100644
--- a/fs/smb/common/smbdirect/smbdirect_socket.c
+++ b/fs/smb/common/smbdirect/smbdirect_socket.c
@@ -71,7 +71,8 @@ int smbdirect_socket_init_new(struct net *net, struct smbdirect_socket *sc)
  	ret = rdma_set_afonly(id, 1);
  	if (ret) {
  		rdma_destroy_id(id);
-		pr_err("%s: rdma_set_afonly() failed %1pe\n", __func__, errname(ret));
+		pr_err("%s: rdma_set_afonly() failed %1pe\n",
+		       __func__, SMBDIRECT_DEBUG_ERR_PTR(ret));
  		return ret;
  	}

diff --git a/fs/smb/server/transport_rdma.c b/fs/smb/server/transport_rdma.c
index 5a577a9b0bf8..706a2c897948 100644
--- a/fs/smb/server/transport_rdma.c
+++ b/fs/smb/server/transport_rdma.c
@@ -12,7 +12,6 @@
  #include <linux/kthread.h>
  #include <linux/list.h>
  #include <linux/string_choices.h>
-#include <linux/errname.h>

  #include "glob.h"
  #include "connection.h"
@@ -413,8 +412,8 @@ static int smb_direct_listen(struct smb_direct_listener *listener,

  	ret = smbdirect_socket_create_kern(net, &sc);
  	if (ret) {
-		pr_err("smbdirect_socket_create_kern() failed: %d %s\n",
-		       ret, errname(ret));
+		pr_err("smbdirect_socket_create_kern() failed: %d %1pe\n",
+		       ret, ERR_PTR(ret));
  		return ret;
  	}

@@ -440,28 +439,28 @@ static int smb_direct_listen(struct smb_direct_listener *listener,
  				     smb_direct_logging_vaprintf);
  	ret = smbdirect_socket_set_initial_parameters(sc, sp);
  	if (ret) {
-		pr_err("Failed smbdirect_socket_set_initial_parameters(): %d %s\n",
-		       ret, errname(ret));
+		pr_err("Failed smbdirect_socket_set_initial_parameters(): %d %1pe\n",
+		       ret, ERR_PTR(ret));
  		goto err;
  	}
  	ret = smbdirect_socket_set_kernel_settings(sc, IB_POLL_WORKQUEUE, KSMBD_DEFAULT_GFP);
  	if (ret) {
-		pr_err("Failed smbdirect_socket_set_kernel_settings(): %d %s\n",
-		       ret, errname(ret));
+		pr_err("Failed smbdirect_socket_set_kernel_settings(): %d %1pe\n",
+		       ret, ERR_PTR(ret));
  		goto err;
  	}

  	ret = smbdirect_socket_bind(sc, (struct sockaddr *)&sin);
  	if (ret) {
-		pr_err("smbdirect_socket_bind() failed: %d %s\n",
-		       ret, errname(ret));
+		pr_err("smbdirect_socket_bind() failed: %d %1pe\n",
+		       ret, ERR_PTR(ret));
  		goto err;
  	}

  	ret = smbdirect_socket_listen(sc, 10);
  	if (ret) {
-		pr_err("Port[%d] smbdirect_socket_listen() failed: %d %s\n",
-		       port, ret, errname(ret));
+		pr_err("Port[%d] smbdirect_socket_listen() failed: %d %1pe\n",
+		       port, ret, ERR_PTR(ret));
  		goto err;
  	}

@@ -473,8 +472,8 @@ static int smb_direct_listen(struct smb_direct_listener *listener,
  			      "ksmbd-smbdirect-listener-%u", port);
  	if (IS_ERR(kthread)) {
  		ret = PTR_ERR(kthread);
-		pr_err("Can't start ksmbd listen kthread: %d %s\n",
-		       ret, errname(ret));
+		pr_err("Can't start ksmbd listen kthread: %d %1pe\n",
+		       ret, ERR_PTR(ret));
  		goto err;
  	}



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH v5 000/144] smb: smbdirect/client/server: moving to common functions and smbdirect.ko
  2026-02-16 13:49                       ` Stefan Metzmacher
@ 2026-02-17  1:02                         ` Steve French
  2026-02-17  2:16                           ` Steve French
  0 siblings, 1 reply; 14+ messages in thread
From: Steve French @ 2026-02-17  1:02 UTC (permalink / raw)
  To: Stefan Metzmacher
  Cc: Namjae Jeon, David Howells, Paulo Alcantara, Tom Talpey, CIFS,
	samba-technical, Arnd Bergmann

updated ksmbd-for-next with the patches from your
for-7.0/smbdirect-ko-20260216-v8 branch

Let me know if any testing or review issues.

On Mon, Feb 16, 2026 at 7:49 AM Stefan Metzmacher <metze@samba.org> wrote:
>
> Hi Steve,
>
> for-7.0/smbdirect-ko-20260216-v8 at commit:
> 8a2259252f084fe55411346d58a1160fc69b7d30
> git fetch https://git.samba.org/metze/linux/wip.git for-7.0/smbdirect-ko-20260216-v8
> https://git.samba.org/?p=metze/linux/wip.git;a=shortlog;h=refs/heads/for-7.0/smbdirect-ko-20260216-v8
>
> fixes 3 problems:
> compared to for-7.0/smbdirect-ko-20260213-v7:
>
> - We use BUILD_BUG_ON(sizeof(*batch) > sizeof(*storage));
>    instead of BUILD_BUG_ON(sizeof(*batch) < sizeof(*storage));
>    Closes: https://lore.kernel.org/oe-kbuild-all/202602141417.hsmt2AAb-lkp@intel.com/
> - We now use [SMBDIRECT_DEBUG_]ERR_PTR(ret) with %1pe
>    instead of errname(ret) with %s
>    Closes: https://lore.kernel.org/oe-kbuild-all/202602141435.Sm9ZppiO-lkp@intel.com/
> - We use 'select SG_POOL' for the client as long
>    as smbdirect_all_c_files.c is used
>    Closes: https://lore.kernel.org/linux-cifs/20260216105404.2381695-1-arnd@kernel.org/
>
> The overall diff to the current ksmbd-for-next
> (at commit 2a43d1cf4bd3bc0cff03f0926e83895a7462ad05) is pasted below:
>
> Please replace ksmbd-for-next with commit
> 8a2259252f084fe55411346d58a1160fc69b7d30,
>
> Thanks!
> metze
>
>   fs/smb/client/smbdirect.c                      |  5 ++---
>   fs/smb/common/smbdirect/smbdirect_connection.c | 26 +++++++++++++-------------
>   fs/smb/common/smbdirect/smbdirect_devices.c    |  3 ++-
>   fs/smb/common/smbdirect/smbdirect_internal.h   |  1 -
>   fs/smb/common/smbdirect/smbdirect_main.c       |  3 ++-
>   fs/smb/common/smbdirect/smbdirect_mr.c         | 21 +++++++++++----------
>   fs/smb/common/smbdirect/smbdirect_socket.c     |  3 ++-
>   fs/smb/server/transport_rdma.c                 | 25 ++++++++++++-------------
>   8 files changed, 44 insertions(+), 43 deletions(-)
>
> diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c
> index de3b51fa2d62..ff80072dc9ff 100644
> --- a/fs/smb/client/smbdirect.c
> +++ b/fs/smb/client/smbdirect.c
> @@ -5,7 +5,6 @@
>    *   Author(s): Long Li <longli@microsoft.com>
>    */
>
> -#include <linux/errname.h>
>   #include "smbdirect.h"
>   #include "cifs_debug.h"
>   #include "cifsproto.h"
> @@ -325,8 +324,8 @@ static struct smbd_connection *_smbd_get_connection(
>
>         ret = smbdirect_connect_sync(sc, dstaddr);
>         if (ret) {
> -               log_rdma_event(ERR, "connect to %pISpsfc failed: %s\n",
> -                              dstaddr, errname(ret));
> +               log_rdma_event(ERR, "connect to %pISpsfc failed: %1pe\n",
> +                              dstaddr, ERR_PTR(ret));
>                 goto connect_failed;
>         }
>
> diff --git a/fs/smb/common/smbdirect/smbdirect_connection.c b/fs/smb/common/smbdirect/smbdirect_connection.c
> index 813ddd87c6ae..1e946f78e935 100644
> --- a/fs/smb/common/smbdirect/smbdirect_connection.c
> +++ b/fs/smb/common/smbdirect/smbdirect_connection.c
> @@ -968,7 +968,7 @@ smbdirect_init_send_batch_storage(struct smbdirect_send_batch_storage *storage,
>         struct smbdirect_send_batch *batch = (struct smbdirect_send_batch *)storage;
>
>         memset(storage, 0, sizeof(*storage));
> -       BUILD_BUG_ON(sizeof(*batch) < sizeof(*storage));
> +       BUILD_BUG_ON(sizeof(*batch) > sizeof(*storage));
>
>         smbdirect_connection_send_batch_init(batch,
>                                              need_invalidate_rkey,
> @@ -1111,10 +1111,10 @@ int smbdirect_connection_send_single_iter(struct smbdirect_socket *sc,
>
>         if (sc->status != SMBDIRECT_SOCKET_CONNECTED) {
>                 smbdirect_log_write(sc, SMBDIRECT_LOG_ERR,
> -                       "status=%s first_error=%1pe => %s\n",
> +                       "status=%s first_error=%1pe => %1pe\n",
>                         smbdirect_socket_status_string(sc->status),
>                         SMBDIRECT_DEBUG_ERR_PTR(sc->first_error),
> -                       errname(-ENOTCONN));
> +                       SMBDIRECT_DEBUG_ERR_PTR(-ENOTCONN));
>                 return -ENOTCONN;
>         }
>
> @@ -1273,10 +1273,10 @@ int smbdirect_connection_send_wait_zero_pending(struct smbdirect_socket *sc)
>                    sc->status != SMBDIRECT_SOCKET_CONNECTED);
>         if (sc->status != SMBDIRECT_SOCKET_CONNECTED) {
>                 smbdirect_log_write(sc, SMBDIRECT_LOG_ERR,
> -                       "status=%s first_error=%1pe => %s\n",
> +                       "status=%s first_error=%1pe => %1pe\n",
>                         smbdirect_socket_status_string(sc->status),
>                         SMBDIRECT_DEBUG_ERR_PTR(sc->first_error),
> -                       errname(-ENOTCONN));
> +                       SMBDIRECT_DEBUG_ERR_PTR(-ENOTCONN));
>                 return -ENOTCONN;
>         }
>
> @@ -1305,10 +1305,10 @@ int smbdirect_connection_send_iter(struct smbdirect_socket *sc,
>
>         if (sc->status != SMBDIRECT_SOCKET_CONNECTED) {
>                 smbdirect_log_write(sc, SMBDIRECT_LOG_INFO,
> -                       "status=%s first_error=%1pe => %s\n",
> +                       "status=%s first_error=%1pe => %1pe\n",
>                         smbdirect_socket_status_string(sc->status),
>                         SMBDIRECT_DEBUG_ERR_PTR(sc->first_error),
> -                       errname(-ENOTCONN));
> +                       SMBDIRECT_DEBUG_ERR_PTR(-ENOTCONN));
>                 return -ENOTCONN;
>         }
>
> @@ -1485,8 +1485,8 @@ int smbdirect_connection_post_recv_io(struct smbdirect_recv_io *msg)
>         ret = ib_post_recv(sc->ib.qp, &recv_wr, NULL);
>         if (ret) {
>                 smbdirect_log_rdma_recv(sc, SMBDIRECT_LOG_ERR,
> -                       "ib_post_recv failed ret=%d (%s)\n",
> -                       ret, errname(ret));
> +                       "ib_post_recv failed ret=%d (%1pe)\n",
> +                       ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
>                 ib_dma_unmap_single(sc->ib.dev,
>                                     msg->sge.addr,
>                                     msg->sge.length,
> @@ -1716,8 +1716,8 @@ int smbdirect_connection_recv_io_refill(struct smbdirect_socket *sc)
>                 ret = smbdirect_connection_post_recv_io(recv_io);
>                 if (ret) {
>                         smbdirect_log_rdma_recv(sc, SMBDIRECT_LOG_ERR,
> -                               "smbdirect_connection_post_recv_io failed rc=%d (%s)\n",
> -                               ret, errname(ret));
> +                               "smbdirect_connection_post_recv_io failed rc=%d (%1pe)\n",
> +                               ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
>                         smbdirect_connection_put_recv_io(recv_io);
>                         return ret;
>                 }
> @@ -1802,10 +1802,10 @@ int smbdirect_connection_recvmsg(struct smbdirect_socket *sc,
>   again:
>         if (sc->status != SMBDIRECT_SOCKET_CONNECTED) {
>                 smbdirect_log_read(sc, SMBDIRECT_LOG_INFO,
> -                       "status=%s first_error=%1pe => %s\n",
> +                       "status=%s first_error=%1pe => %1pe\n",
>                         smbdirect_socket_status_string(sc->status),
>                         SMBDIRECT_DEBUG_ERR_PTR(sc->first_error),
> -                       errname(-ENOTCONN));
> +                       SMBDIRECT_DEBUG_ERR_PTR(-ENOTCONN));
>                 return -ENOTCONN;
>         }
>
> diff --git a/fs/smb/common/smbdirect/smbdirect_devices.c b/fs/smb/common/smbdirect/smbdirect_devices.c
> index d1a251141145..3ace41af2200 100644
> --- a/fs/smb/common/smbdirect/smbdirect_devices.c
> +++ b/fs/smb/common/smbdirect/smbdirect_devices.c
> @@ -249,7 +249,8 @@ __init int smbdirect_devices_init(void)
>
>         ret = ib_register_client(&smbdirect_ib_client);
>         if (ret) {
> -               pr_err("failed to ib_register_client: %d %s\n", ret, errname(ret));
> +               pr_crit("failed to ib_register_client: %d %1pe\n",
> +                       ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
>                 return ret;
>         }
>
> diff --git a/fs/smb/common/smbdirect/smbdirect_internal.h b/fs/smb/common/smbdirect/smbdirect_internal.h
> index 09a4ce8ed863..30a1b8643657 100644
> --- a/fs/smb/common/smbdirect/smbdirect_internal.h
> +++ b/fs/smb/common/smbdirect/smbdirect_internal.h
> @@ -8,7 +8,6 @@
>
>   #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>
> -#include <linux/errname.h>
>   #include "smbdirect.h"
>   #include "smbdirect_pdu.h"
>   #include "smbdirect_public.h"
> diff --git a/fs/smb/common/smbdirect/smbdirect_main.c b/fs/smb/common/smbdirect/smbdirect_main.c
> index 266d00da25f6..fe6e8d93c34c 100644
> --- a/fs/smb/common/smbdirect/smbdirect_main.c
> +++ b/fs/smb/common/smbdirect/smbdirect_main.c
> @@ -91,7 +91,8 @@ static __init int smbdirect_module_init(void)
>         destroy_workqueue(smbdirect_globals.workqueues.accept);
>   alloc_accept_wq_failed:
>         mutex_unlock(&smbdirect_globals.mutex);
> -       pr_crit("failed to loaded: %d (%s)\n", ret, errname(ret));
> +       pr_crit("failed to loaded: %d (%1pe)\n",
> +               ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
>         return ret;
>   }
>
> diff --git a/fs/smb/common/smbdirect/smbdirect_mr.c b/fs/smb/common/smbdirect/smbdirect_mr.c
> index 5e9420d01fe3..32668c58efb0 100644
> --- a/fs/smb/common/smbdirect/smbdirect_mr.c
> +++ b/fs/smb/common/smbdirect/smbdirect_mr.c
> @@ -43,8 +43,9 @@ int smbdirect_connection_create_mr_list(struct smbdirect_socket *sc)
>                 if (IS_ERR(mr->mr)) {
>                         ret = PTR_ERR(mr->mr);
>                         smbdirect_log_rdma_mr(sc, SMBDIRECT_LOG_ERR,
> -                               "ib_alloc_mr failed ret=%d (%s) type=0x%x max_frmr_depth=%u\n",
> -                               ret, errname(ret), sc->mr_io.type, sp->max_frmr_depth);
> +                               "ib_alloc_mr failed ret=%d (%1pe) type=0x%x max_frmr_depth=%u\n",
> +                               ret, SMBDIRECT_DEBUG_ERR_PTR(ret),
> +                               sc->mr_io.type, sp->max_frmr_depth);
>                         goto ib_alloc_mr_failed;
>                 }
>                 mr->sgt.sgl = kcalloc(sp->max_frmr_depth,
> @@ -173,8 +174,8 @@ smbdirect_connection_get_mr_io(struct smbdirect_socket *sc)
>                                        sc->status != SMBDIRECT_SOCKET_CONNECTED);
>         if (ret) {
>                 smbdirect_log_rdma_mr(sc, SMBDIRECT_LOG_ERR,
> -                       "wait_event_interruptible ret=%d (%s)\n",
> -                       ret, errname(ret));
> +                       "wait_event_interruptible ret=%d (%1pe)\n",
> +                       ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
>                 return NULL;
>         }
>
> @@ -304,8 +305,8 @@ smbdirect_connection_register_mr_io(struct smbdirect_socket *sc,
>         ret = ib_dma_map_sg(sc->ib.dev, mr->sgt.sgl, mr->sgt.nents, mr->dir);
>         if (!ret) {
>                 smbdirect_log_rdma_mr(sc, SMBDIRECT_LOG_ERR,
> -                       "ib_dma_map_sg num_pages=%u dir=%x ret=%d (%s)\n",
> -                       num_pages, mr->dir, ret, errname(ret));
> +                       "ib_dma_map_sg num_pages=%u dir=%x ret=%d (%1pe)\n",
> +                       num_pages, mr->dir, ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
>                 goto dma_map_error;
>         }
>
> @@ -348,8 +349,8 @@ smbdirect_connection_register_mr_io(struct smbdirect_socket *sc,
>         }
>
>         smbdirect_log_rdma_mr(sc, SMBDIRECT_LOG_ERR,
> -               "ib_post_send failed ret=%d (%s) reg_wr->key=0x%x\n",
> -               ret, errname(ret), reg_wr->key);
> +               "ib_post_send failed ret=%d (%1pe) reg_wr->key=0x%x\n",
> +               ret, SMBDIRECT_DEBUG_ERR_PTR(ret), reg_wr->key);
>
>   map_mr_error:
>         ib_dma_unmap_sg(sc->ib.dev, mr->sgt.sgl, mr->sgt.nents, mr->dir);
> @@ -435,8 +436,8 @@ void smbdirect_connection_deregister_mr_io(struct smbdirect_mr_io *mr)
>                 ret = ib_post_send(sc->ib.qp, wr, NULL);
>                 if (ret) {
>                         smbdirect_log_rdma_mr(sc, SMBDIRECT_LOG_ERR,
> -                               "ib_post_send failed ret=%d (%s)\n",
> -                               ret, errname(ret));
> +                               "ib_post_send failed ret=%d (%1pe)\n",
> +                               ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
>                         smbdirect_mr_io_disable_locked(mr);
>                         smbdirect_socket_schedule_cleanup(sc, ret);
>                         goto done;
> diff --git a/fs/smb/common/smbdirect/smbdirect_socket.c b/fs/smb/common/smbdirect/smbdirect_socket.c
> index 073df565f347..74e31b35a2f6 100644
> --- a/fs/smb/common/smbdirect/smbdirect_socket.c
> +++ b/fs/smb/common/smbdirect/smbdirect_socket.c
> @@ -71,7 +71,8 @@ int smbdirect_socket_init_new(struct net *net, struct smbdirect_socket *sc)
>         ret = rdma_set_afonly(id, 1);
>         if (ret) {
>                 rdma_destroy_id(id);
> -               pr_err("%s: rdma_set_afonly() failed %1pe\n", __func__, errname(ret));
> +               pr_err("%s: rdma_set_afonly() failed %1pe\n",
> +                      __func__, SMBDIRECT_DEBUG_ERR_PTR(ret));
>                 return ret;
>         }
>
> diff --git a/fs/smb/server/transport_rdma.c b/fs/smb/server/transport_rdma.c
> index 5a577a9b0bf8..706a2c897948 100644
> --- a/fs/smb/server/transport_rdma.c
> +++ b/fs/smb/server/transport_rdma.c
> @@ -12,7 +12,6 @@
>   #include <linux/kthread.h>
>   #include <linux/list.h>
>   #include <linux/string_choices.h>
> -#include <linux/errname.h>
>
>   #include "glob.h"
>   #include "connection.h"
> @@ -413,8 +412,8 @@ static int smb_direct_listen(struct smb_direct_listener *listener,
>
>         ret = smbdirect_socket_create_kern(net, &sc);
>         if (ret) {
> -               pr_err("smbdirect_socket_create_kern() failed: %d %s\n",
> -                      ret, errname(ret));
> +               pr_err("smbdirect_socket_create_kern() failed: %d %1pe\n",
> +                      ret, ERR_PTR(ret));
>                 return ret;
>         }
>
> @@ -440,28 +439,28 @@ static int smb_direct_listen(struct smb_direct_listener *listener,
>                                      smb_direct_logging_vaprintf);
>         ret = smbdirect_socket_set_initial_parameters(sc, sp);
>         if (ret) {
> -               pr_err("Failed smbdirect_socket_set_initial_parameters(): %d %s\n",
> -                      ret, errname(ret));
> +               pr_err("Failed smbdirect_socket_set_initial_parameters(): %d %1pe\n",
> +                      ret, ERR_PTR(ret));
>                 goto err;
>         }
>         ret = smbdirect_socket_set_kernel_settings(sc, IB_POLL_WORKQUEUE, KSMBD_DEFAULT_GFP);
>         if (ret) {
> -               pr_err("Failed smbdirect_socket_set_kernel_settings(): %d %s\n",
> -                      ret, errname(ret));
> +               pr_err("Failed smbdirect_socket_set_kernel_settings(): %d %1pe\n",
> +                      ret, ERR_PTR(ret));
>                 goto err;
>         }
>
>         ret = smbdirect_socket_bind(sc, (struct sockaddr *)&sin);
>         if (ret) {
> -               pr_err("smbdirect_socket_bind() failed: %d %s\n",
> -                      ret, errname(ret));
> +               pr_err("smbdirect_socket_bind() failed: %d %1pe\n",
> +                      ret, ERR_PTR(ret));
>                 goto err;
>         }
>
>         ret = smbdirect_socket_listen(sc, 10);
>         if (ret) {
> -               pr_err("Port[%d] smbdirect_socket_listen() failed: %d %s\n",
> -                      port, ret, errname(ret));
> +               pr_err("Port[%d] smbdirect_socket_listen() failed: %d %1pe\n",
> +                      port, ret, ERR_PTR(ret));
>                 goto err;
>         }
>
> @@ -473,8 +472,8 @@ static int smb_direct_listen(struct smb_direct_listener *listener,
>                               "ksmbd-smbdirect-listener-%u", port);
>         if (IS_ERR(kthread)) {
>                 ret = PTR_ERR(kthread);
> -               pr_err("Can't start ksmbd listen kthread: %d %s\n",
> -                      ret, errname(ret));
> +               pr_err("Can't start ksmbd listen kthread: %d %1pe\n",
> +                      ret, ERR_PTR(ret));
>                 goto err;
>         }
>
>


-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v5 000/144] smb: smbdirect/client/server: moving to common functions and smbdirect.ko
  2026-02-17  1:02                         ` Steve French
@ 2026-02-17  2:16                           ` Steve French
  2026-02-17  9:25                             ` Stefan Metzmacher
  0 siblings, 1 reply; 14+ messages in thread
From: Steve French @ 2026-02-17  2:16 UTC (permalink / raw)
  To: Stefan Metzmacher
  Cc: Namjae Jeon, David Howells, Paulo Alcantara, Tom Talpey, CIFS,
	samba-technical, Arnd Bergmann

I noticed build warnings on two files when I build with your updated
branch. See below:

  CHECK   client/smbdirect.c
client/smbdirect.c:97:1: error: bad integer constant expression
client/smbdirect.c:97:1: error: static assertion failed:
"MODULE_INFO(parmtype, ...) contains embedded NUL byte"
client/smbdirect.c:98:1: error: bad integer constant expression
client/smbdirect.c:98:1: error: static assertion failed:
"MODULE_INFO(parm, ...) contains embedded NUL byte"
client/smbdirect.c:104:1: error: bad integer constant expression
client/smbdirect.c:104:1: error: static assertion failed:
"MODULE_INFO(parmtype, ...) contains embedded NUL byte"
client/smbdirect.c:105:1: error: bad integer constant expression
client/smbdirect.c:105:1: error: static assertion failed:
"MODULE_INFO(parm, ...) contains embedded NUL byte"
  CC [M]  server/server.o
  CHECK   server/server.c
server/server.c:629:1: error: bad integer constant expression
server/server.c:629:1: error: static assertion failed:
"MODULE_INFO(author, ...) contains embedded NUL byte"
server/server.c:630:1: error: bad integer constant expression
server/server.c:630:1: error: static assertion failed:
"MODULE_INFO(description, ...) contains embedded NUL byte"
server/server.c:631:1: error: bad integer constant expression
server/server.c:631:1: error: static assertion failed:
"MODULE_INFO(license, ...) contains embedded NUL byte"
server/server.c:632:1: error: bad integer constant expression
server/server.c:632:1: error: static assertion failed:
"MODULE_INFO(softdep, ...) contains embedded NUL byte"
server/server.c:633:1: error: bad integer constant expression
server/server.c:633:1: error: static assertion failed:
"MODULE_INFO(softdep, ...) contains embedded NUL byte"
server/server.c:634:1: error: bad integer constant expression
server/server.c:634:1: error: static assertion failed:
"MODULE_INFO(softdep, ...) contains embedded NUL byte"
server/server.c:635:1: error: bad integer constant expression
server/server.c:635:1: error: static assertion failed:
"MODULE_INFO(softdep, ...) contains embedded NUL byte"
server/server.c:636:1: error: bad integer constant expression
server/server.c:636:1: error: static assertion failed:
"MODULE_INFO(softdep, ...) contains embedded NUL byte"
server/server.c:637:1: error: bad integer constant expression
server/server.c:637:1: error: static assertion failed:
"MODULE_INFO(softdep, ...) contains embedded NUL byte"
server/server.c:638:1: error: bad integer constant expression
server/server.c:638:1: error: static assertion failed:
"MODULE_INFO(softdep, ...) contains embedded NUL byte"

On Mon, Feb 16, 2026 at 7:02 PM Steve French <smfrench@gmail.com> wrote:
>
> updated ksmbd-for-next with the patches from your
> for-7.0/smbdirect-ko-20260216-v8 branch
>
> Let me know if any testing or review issues.
>
> On Mon, Feb 16, 2026 at 7:49 AM Stefan Metzmacher <metze@samba.org> wrote:
> >
> > Hi Steve,
> >
> > for-7.0/smbdirect-ko-20260216-v8 at commit:
> > 8a2259252f084fe55411346d58a1160fc69b7d30
> > git fetch https://git.samba.org/metze/linux/wip.git for-7.0/smbdirect-ko-20260216-v8
> > https://git.samba.org/?p=metze/linux/wip.git;a=shortlog;h=refs/heads/for-7.0/smbdirect-ko-20260216-v8
> >
> > fixes 3 problems:
> > compared to for-7.0/smbdirect-ko-20260213-v7:
> >
> > - We use BUILD_BUG_ON(sizeof(*batch) > sizeof(*storage));
> >    instead of BUILD_BUG_ON(sizeof(*batch) < sizeof(*storage));
> >    Closes: https://lore.kernel.org/oe-kbuild-all/202602141417.hsmt2AAb-lkp@intel.com/
> > - We now use [SMBDIRECT_DEBUG_]ERR_PTR(ret) with %1pe
> >    instead of errname(ret) with %s
> >    Closes: https://lore.kernel.org/oe-kbuild-all/202602141435.Sm9ZppiO-lkp@intel.com/
> > - We use 'select SG_POOL' for the client as long
> >    as smbdirect_all_c_files.c is used
> >    Closes: https://lore.kernel.org/linux-cifs/20260216105404.2381695-1-arnd@kernel.org/
> >
> > The overall diff to the current ksmbd-for-next
> > (at commit 2a43d1cf4bd3bc0cff03f0926e83895a7462ad05) is pasted below:
> >
> > Please replace ksmbd-for-next with commit
> > 8a2259252f084fe55411346d58a1160fc69b7d30,
> >
> > Thanks!
> > metze
> >
> >   fs/smb/client/smbdirect.c                      |  5 ++---
> >   fs/smb/common/smbdirect/smbdirect_connection.c | 26 +++++++++++++-------------
> >   fs/smb/common/smbdirect/smbdirect_devices.c    |  3 ++-
> >   fs/smb/common/smbdirect/smbdirect_internal.h   |  1 -
> >   fs/smb/common/smbdirect/smbdirect_main.c       |  3 ++-
> >   fs/smb/common/smbdirect/smbdirect_mr.c         | 21 +++++++++++----------
> >   fs/smb/common/smbdirect/smbdirect_socket.c     |  3 ++-
> >   fs/smb/server/transport_rdma.c                 | 25 ++++++++++++-------------
> >   8 files changed, 44 insertions(+), 43 deletions(-)
> >
> > diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c
> > index de3b51fa2d62..ff80072dc9ff 100644
> > --- a/fs/smb/client/smbdirect.c
> > +++ b/fs/smb/client/smbdirect.c
> > @@ -5,7 +5,6 @@
> >    *   Author(s): Long Li <longli@microsoft.com>
> >    */
> >
> > -#include <linux/errname.h>
> >   #include "smbdirect.h"
> >   #include "cifs_debug.h"
> >   #include "cifsproto.h"
> > @@ -325,8 +324,8 @@ static struct smbd_connection *_smbd_get_connection(
> >
> >         ret = smbdirect_connect_sync(sc, dstaddr);
> >         if (ret) {
> > -               log_rdma_event(ERR, "connect to %pISpsfc failed: %s\n",
> > -                              dstaddr, errname(ret));
> > +               log_rdma_event(ERR, "connect to %pISpsfc failed: %1pe\n",
> > +                              dstaddr, ERR_PTR(ret));
> >                 goto connect_failed;
> >         }
> >
> > diff --git a/fs/smb/common/smbdirect/smbdirect_connection.c b/fs/smb/common/smbdirect/smbdirect_connection.c
> > index 813ddd87c6ae..1e946f78e935 100644
> > --- a/fs/smb/common/smbdirect/smbdirect_connection.c
> > +++ b/fs/smb/common/smbdirect/smbdirect_connection.c
> > @@ -968,7 +968,7 @@ smbdirect_init_send_batch_storage(struct smbdirect_send_batch_storage *storage,
> >         struct smbdirect_send_batch *batch = (struct smbdirect_send_batch *)storage;
> >
> >         memset(storage, 0, sizeof(*storage));
> > -       BUILD_BUG_ON(sizeof(*batch) < sizeof(*storage));
> > +       BUILD_BUG_ON(sizeof(*batch) > sizeof(*storage));
> >
> >         smbdirect_connection_send_batch_init(batch,
> >                                              need_invalidate_rkey,
> > @@ -1111,10 +1111,10 @@ int smbdirect_connection_send_single_iter(struct smbdirect_socket *sc,
> >
> >         if (sc->status != SMBDIRECT_SOCKET_CONNECTED) {
> >                 smbdirect_log_write(sc, SMBDIRECT_LOG_ERR,
> > -                       "status=%s first_error=%1pe => %s\n",
> > +                       "status=%s first_error=%1pe => %1pe\n",
> >                         smbdirect_socket_status_string(sc->status),
> >                         SMBDIRECT_DEBUG_ERR_PTR(sc->first_error),
> > -                       errname(-ENOTCONN));
> > +                       SMBDIRECT_DEBUG_ERR_PTR(-ENOTCONN));
> >                 return -ENOTCONN;
> >         }
> >
> > @@ -1273,10 +1273,10 @@ int smbdirect_connection_send_wait_zero_pending(struct smbdirect_socket *sc)
> >                    sc->status != SMBDIRECT_SOCKET_CONNECTED);
> >         if (sc->status != SMBDIRECT_SOCKET_CONNECTED) {
> >                 smbdirect_log_write(sc, SMBDIRECT_LOG_ERR,
> > -                       "status=%s first_error=%1pe => %s\n",
> > +                       "status=%s first_error=%1pe => %1pe\n",
> >                         smbdirect_socket_status_string(sc->status),
> >                         SMBDIRECT_DEBUG_ERR_PTR(sc->first_error),
> > -                       errname(-ENOTCONN));
> > +                       SMBDIRECT_DEBUG_ERR_PTR(-ENOTCONN));
> >                 return -ENOTCONN;
> >         }
> >
> > @@ -1305,10 +1305,10 @@ int smbdirect_connection_send_iter(struct smbdirect_socket *sc,
> >
> >         if (sc->status != SMBDIRECT_SOCKET_CONNECTED) {
> >                 smbdirect_log_write(sc, SMBDIRECT_LOG_INFO,
> > -                       "status=%s first_error=%1pe => %s\n",
> > +                       "status=%s first_error=%1pe => %1pe\n",
> >                         smbdirect_socket_status_string(sc->status),
> >                         SMBDIRECT_DEBUG_ERR_PTR(sc->first_error),
> > -                       errname(-ENOTCONN));
> > +                       SMBDIRECT_DEBUG_ERR_PTR(-ENOTCONN));
> >                 return -ENOTCONN;
> >         }
> >
> > @@ -1485,8 +1485,8 @@ int smbdirect_connection_post_recv_io(struct smbdirect_recv_io *msg)
> >         ret = ib_post_recv(sc->ib.qp, &recv_wr, NULL);
> >         if (ret) {
> >                 smbdirect_log_rdma_recv(sc, SMBDIRECT_LOG_ERR,
> > -                       "ib_post_recv failed ret=%d (%s)\n",
> > -                       ret, errname(ret));
> > +                       "ib_post_recv failed ret=%d (%1pe)\n",
> > +                       ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
> >                 ib_dma_unmap_single(sc->ib.dev,
> >                                     msg->sge.addr,
> >                                     msg->sge.length,
> > @@ -1716,8 +1716,8 @@ int smbdirect_connection_recv_io_refill(struct smbdirect_socket *sc)
> >                 ret = smbdirect_connection_post_recv_io(recv_io);
> >                 if (ret) {
> >                         smbdirect_log_rdma_recv(sc, SMBDIRECT_LOG_ERR,
> > -                               "smbdirect_connection_post_recv_io failed rc=%d (%s)\n",
> > -                               ret, errname(ret));
> > +                               "smbdirect_connection_post_recv_io failed rc=%d (%1pe)\n",
> > +                               ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
> >                         smbdirect_connection_put_recv_io(recv_io);
> >                         return ret;
> >                 }
> > @@ -1802,10 +1802,10 @@ int smbdirect_connection_recvmsg(struct smbdirect_socket *sc,
> >   again:
> >         if (sc->status != SMBDIRECT_SOCKET_CONNECTED) {
> >                 smbdirect_log_read(sc, SMBDIRECT_LOG_INFO,
> > -                       "status=%s first_error=%1pe => %s\n",
> > +                       "status=%s first_error=%1pe => %1pe\n",
> >                         smbdirect_socket_status_string(sc->status),
> >                         SMBDIRECT_DEBUG_ERR_PTR(sc->first_error),
> > -                       errname(-ENOTCONN));
> > +                       SMBDIRECT_DEBUG_ERR_PTR(-ENOTCONN));
> >                 return -ENOTCONN;
> >         }
> >
> > diff --git a/fs/smb/common/smbdirect/smbdirect_devices.c b/fs/smb/common/smbdirect/smbdirect_devices.c
> > index d1a251141145..3ace41af2200 100644
> > --- a/fs/smb/common/smbdirect/smbdirect_devices.c
> > +++ b/fs/smb/common/smbdirect/smbdirect_devices.c
> > @@ -249,7 +249,8 @@ __init int smbdirect_devices_init(void)
> >
> >         ret = ib_register_client(&smbdirect_ib_client);
> >         if (ret) {
> > -               pr_err("failed to ib_register_client: %d %s\n", ret, errname(ret));
> > +               pr_crit("failed to ib_register_client: %d %1pe\n",
> > +                       ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
> >                 return ret;
> >         }
> >
> > diff --git a/fs/smb/common/smbdirect/smbdirect_internal.h b/fs/smb/common/smbdirect/smbdirect_internal.h
> > index 09a4ce8ed863..30a1b8643657 100644
> > --- a/fs/smb/common/smbdirect/smbdirect_internal.h
> > +++ b/fs/smb/common/smbdirect/smbdirect_internal.h
> > @@ -8,7 +8,6 @@
> >
> >   #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> >
> > -#include <linux/errname.h>
> >   #include "smbdirect.h"
> >   #include "smbdirect_pdu.h"
> >   #include "smbdirect_public.h"
> > diff --git a/fs/smb/common/smbdirect/smbdirect_main.c b/fs/smb/common/smbdirect/smbdirect_main.c
> > index 266d00da25f6..fe6e8d93c34c 100644
> > --- a/fs/smb/common/smbdirect/smbdirect_main.c
> > +++ b/fs/smb/common/smbdirect/smbdirect_main.c
> > @@ -91,7 +91,8 @@ static __init int smbdirect_module_init(void)
> >         destroy_workqueue(smbdirect_globals.workqueues.accept);
> >   alloc_accept_wq_failed:
> >         mutex_unlock(&smbdirect_globals.mutex);
> > -       pr_crit("failed to loaded: %d (%s)\n", ret, errname(ret));
> > +       pr_crit("failed to loaded: %d (%1pe)\n",
> > +               ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
> >         return ret;
> >   }
> >
> > diff --git a/fs/smb/common/smbdirect/smbdirect_mr.c b/fs/smb/common/smbdirect/smbdirect_mr.c
> > index 5e9420d01fe3..32668c58efb0 100644
> > --- a/fs/smb/common/smbdirect/smbdirect_mr.c
> > +++ b/fs/smb/common/smbdirect/smbdirect_mr.c
> > @@ -43,8 +43,9 @@ int smbdirect_connection_create_mr_list(struct smbdirect_socket *sc)
> >                 if (IS_ERR(mr->mr)) {
> >                         ret = PTR_ERR(mr->mr);
> >                         smbdirect_log_rdma_mr(sc, SMBDIRECT_LOG_ERR,
> > -                               "ib_alloc_mr failed ret=%d (%s) type=0x%x max_frmr_depth=%u\n",
> > -                               ret, errname(ret), sc->mr_io.type, sp->max_frmr_depth);
> > +                               "ib_alloc_mr failed ret=%d (%1pe) type=0x%x max_frmr_depth=%u\n",
> > +                               ret, SMBDIRECT_DEBUG_ERR_PTR(ret),
> > +                               sc->mr_io.type, sp->max_frmr_depth);
> >                         goto ib_alloc_mr_failed;
> >                 }
> >                 mr->sgt.sgl = kcalloc(sp->max_frmr_depth,
> > @@ -173,8 +174,8 @@ smbdirect_connection_get_mr_io(struct smbdirect_socket *sc)
> >                                        sc->status != SMBDIRECT_SOCKET_CONNECTED);
> >         if (ret) {
> >                 smbdirect_log_rdma_mr(sc, SMBDIRECT_LOG_ERR,
> > -                       "wait_event_interruptible ret=%d (%s)\n",
> > -                       ret, errname(ret));
> > +                       "wait_event_interruptible ret=%d (%1pe)\n",
> > +                       ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
> >                 return NULL;
> >         }
> >
> > @@ -304,8 +305,8 @@ smbdirect_connection_register_mr_io(struct smbdirect_socket *sc,
> >         ret = ib_dma_map_sg(sc->ib.dev, mr->sgt.sgl, mr->sgt.nents, mr->dir);
> >         if (!ret) {
> >                 smbdirect_log_rdma_mr(sc, SMBDIRECT_LOG_ERR,
> > -                       "ib_dma_map_sg num_pages=%u dir=%x ret=%d (%s)\n",
> > -                       num_pages, mr->dir, ret, errname(ret));
> > +                       "ib_dma_map_sg num_pages=%u dir=%x ret=%d (%1pe)\n",
> > +                       num_pages, mr->dir, ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
> >                 goto dma_map_error;
> >         }
> >
> > @@ -348,8 +349,8 @@ smbdirect_connection_register_mr_io(struct smbdirect_socket *sc,
> >         }
> >
> >         smbdirect_log_rdma_mr(sc, SMBDIRECT_LOG_ERR,
> > -               "ib_post_send failed ret=%d (%s) reg_wr->key=0x%x\n",
> > -               ret, errname(ret), reg_wr->key);
> > +               "ib_post_send failed ret=%d (%1pe) reg_wr->key=0x%x\n",
> > +               ret, SMBDIRECT_DEBUG_ERR_PTR(ret), reg_wr->key);
> >
> >   map_mr_error:
> >         ib_dma_unmap_sg(sc->ib.dev, mr->sgt.sgl, mr->sgt.nents, mr->dir);
> > @@ -435,8 +436,8 @@ void smbdirect_connection_deregister_mr_io(struct smbdirect_mr_io *mr)
> >                 ret = ib_post_send(sc->ib.qp, wr, NULL);
> >                 if (ret) {
> >                         smbdirect_log_rdma_mr(sc, SMBDIRECT_LOG_ERR,
> > -                               "ib_post_send failed ret=%d (%s)\n",
> > -                               ret, errname(ret));
> > +                               "ib_post_send failed ret=%d (%1pe)\n",
> > +                               ret, SMBDIRECT_DEBUG_ERR_PTR(ret));
> >                         smbdirect_mr_io_disable_locked(mr);
> >                         smbdirect_socket_schedule_cleanup(sc, ret);
> >                         goto done;
> > diff --git a/fs/smb/common/smbdirect/smbdirect_socket.c b/fs/smb/common/smbdirect/smbdirect_socket.c
> > index 073df565f347..74e31b35a2f6 100644
> > --- a/fs/smb/common/smbdirect/smbdirect_socket.c
> > +++ b/fs/smb/common/smbdirect/smbdirect_socket.c
> > @@ -71,7 +71,8 @@ int smbdirect_socket_init_new(struct net *net, struct smbdirect_socket *sc)
> >         ret = rdma_set_afonly(id, 1);
> >         if (ret) {
> >                 rdma_destroy_id(id);
> > -               pr_err("%s: rdma_set_afonly() failed %1pe\n", __func__, errname(ret));
> > +               pr_err("%s: rdma_set_afonly() failed %1pe\n",
> > +                      __func__, SMBDIRECT_DEBUG_ERR_PTR(ret));
> >                 return ret;
> >         }
> >
> > diff --git a/fs/smb/server/transport_rdma.c b/fs/smb/server/transport_rdma.c
> > index 5a577a9b0bf8..706a2c897948 100644
> > --- a/fs/smb/server/transport_rdma.c
> > +++ b/fs/smb/server/transport_rdma.c
> > @@ -12,7 +12,6 @@
> >   #include <linux/kthread.h>
> >   #include <linux/list.h>
> >   #include <linux/string_choices.h>
> > -#include <linux/errname.h>
> >
> >   #include "glob.h"
> >   #include "connection.h"
> > @@ -413,8 +412,8 @@ static int smb_direct_listen(struct smb_direct_listener *listener,
> >
> >         ret = smbdirect_socket_create_kern(net, &sc);
> >         if (ret) {
> > -               pr_err("smbdirect_socket_create_kern() failed: %d %s\n",
> > -                      ret, errname(ret));
> > +               pr_err("smbdirect_socket_create_kern() failed: %d %1pe\n",
> > +                      ret, ERR_PTR(ret));
> >                 return ret;
> >         }
> >
> > @@ -440,28 +439,28 @@ static int smb_direct_listen(struct smb_direct_listener *listener,
> >                                      smb_direct_logging_vaprintf);
> >         ret = smbdirect_socket_set_initial_parameters(sc, sp);
> >         if (ret) {
> > -               pr_err("Failed smbdirect_socket_set_initial_parameters(): %d %s\n",
> > -                      ret, errname(ret));
> > +               pr_err("Failed smbdirect_socket_set_initial_parameters(): %d %1pe\n",
> > +                      ret, ERR_PTR(ret));
> >                 goto err;
> >         }
> >         ret = smbdirect_socket_set_kernel_settings(sc, IB_POLL_WORKQUEUE, KSMBD_DEFAULT_GFP);
> >         if (ret) {
> > -               pr_err("Failed smbdirect_socket_set_kernel_settings(): %d %s\n",
> > -                      ret, errname(ret));
> > +               pr_err("Failed smbdirect_socket_set_kernel_settings(): %d %1pe\n",
> > +                      ret, ERR_PTR(ret));
> >                 goto err;
> >         }
> >
> >         ret = smbdirect_socket_bind(sc, (struct sockaddr *)&sin);
> >         if (ret) {
> > -               pr_err("smbdirect_socket_bind() failed: %d %s\n",
> > -                      ret, errname(ret));
> > +               pr_err("smbdirect_socket_bind() failed: %d %1pe\n",
> > +                      ret, ERR_PTR(ret));
> >                 goto err;
> >         }
> >
> >         ret = smbdirect_socket_listen(sc, 10);
> >         if (ret) {
> > -               pr_err("Port[%d] smbdirect_socket_listen() failed: %d %s\n",
> > -                      port, ret, errname(ret));
> > +               pr_err("Port[%d] smbdirect_socket_listen() failed: %d %1pe\n",
> > +                      port, ret, ERR_PTR(ret));
> >                 goto err;
> >         }
> >
> > @@ -473,8 +472,8 @@ static int smb_direct_listen(struct smb_direct_listener *listener,
> >                               "ksmbd-smbdirect-listener-%u", port);
> >         if (IS_ERR(kthread)) {
> >                 ret = PTR_ERR(kthread);
> > -               pr_err("Can't start ksmbd listen kthread: %d %s\n",
> > -                      ret, errname(ret));
> > +               pr_err("Can't start ksmbd listen kthread: %d %1pe\n",
> > +                      ret, ERR_PTR(ret));
> >                 goto err;
> >         }
> >
> >
>
>
> --
> Thanks,
>
> Steve



-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v5 000/144] smb: smbdirect/client/server: moving to common functions and smbdirect.ko
  2026-02-17  2:16                           ` Steve French
@ 2026-02-17  9:25                             ` Stefan Metzmacher
  2026-02-17 22:34                               ` Steve French
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Metzmacher @ 2026-02-17  9:25 UTC (permalink / raw)
  To: Steve French
  Cc: Namjae Jeon, David Howells, Paulo Alcantara, Tom Talpey, CIFS,
	samba-technical, Arnd Bergmann

Am 17.02.26 um 03:16 schrieb Steve French:
> I noticed build warnings on two files when I build with your updated
> branch. See below:
> 
>    CHECK   client/smbdirect.c
> client/smbdirect.c:97:1: error: bad integer constant expression
> client/smbdirect.c:97:1: error: static assertion failed:
> "MODULE_INFO(parmtype, ...) contains embedded NUL byte"
> client/smbdirect.c:98:1: error: bad integer constant expression
> client/smbdirect.c:98:1: error: static assertion failed:
> "MODULE_INFO(parm, ...) contains embedded NUL byte"
> client/smbdirect.c:104:1: error: bad integer constant expression
> client/smbdirect.c:104:1: error: static assertion failed:
> "MODULE_INFO(parmtype, ...) contains embedded NUL byte"
> client/smbdirect.c:105:1: error: bad integer constant expression
> client/smbdirect.c:105:1: error: static assertion failed:
> "MODULE_INFO(parm, ...) contains embedded NUL byte"
>    CC [M]  server/server.o
>    CHECK   server/server.c
> server/server.c:629:1: error: bad integer constant expression
> server/server.c:629:1: error: static assertion failed:
> "MODULE_INFO(author, ...) contains embedded NUL byte"
> server/server.c:630:1: error: bad integer constant expression
> server/server.c:630:1: error: static assertion failed:
> "MODULE_INFO(description, ...) contains embedded NUL byte"
> server/server.c:631:1: error: bad integer constant expression
> server/server.c:631:1: error: static assertion failed:
> "MODULE_INFO(license, ...) contains embedded NUL byte"
> server/server.c:632:1: error: bad integer constant expression
> server/server.c:632:1: error: static assertion failed:
> "MODULE_INFO(softdep, ...) contains embedded NUL byte"
> server/server.c:633:1: error: bad integer constant expression
> server/server.c:633:1: error: static assertion failed:
> "MODULE_INFO(softdep, ...) contains embedded NUL byte"
> server/server.c:634:1: error: bad integer constant expression
> server/server.c:634:1: error: static assertion failed:
> "MODULE_INFO(softdep, ...) contains embedded NUL byte"
> server/server.c:635:1: error: bad integer constant expression
> server/server.c:635:1: error: static assertion failed:
> "MODULE_INFO(softdep, ...) contains embedded NUL byte"
> server/server.c:636:1: error: bad integer constant expression
> server/server.c:636:1: error: static assertion failed:
> "MODULE_INFO(softdep, ...) contains embedded NUL byte"
> server/server.c:637:1: error: bad integer constant expression
> server/server.c:637:1: error: static assertion failed:
> "MODULE_INFO(softdep, ...) contains embedded NUL byte"
> server/server.c:638:1: error: bad integer constant expression
> server/server.c:638:1: error: static assertion failed:
> "MODULE_INFO(softdep, ...) contains embedded NUL byte"

I didn't change any MODULE_INFO() code, I guess it also happens
without my patches?

I saw something similar with MODULE_LICENSE and maybe MODULE_DESCRIPTION
in the 6.19 merge windows.

And it was a bug in sparse.

I updated the version I use to this commit:
https://git.kernel.org/pub/scm/linux/kernel/git/viro/sparse.git/commit/?id=2634e39bf02697a18fece057208150362c985992
which is one above https://git.kernel.org/pub/scm/devel/sparse/sparse.git/

metze

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v5 000/144] smb: smbdirect/client/server: moving to common functions and smbdirect.ko
  2026-02-17  9:25                             ` Stefan Metzmacher
@ 2026-02-17 22:34                               ` Steve French
  0 siblings, 0 replies; 14+ messages in thread
From: Steve French @ 2026-02-17 22:34 UTC (permalink / raw)
  To: Stefan Metzmacher
  Cc: Namjae Jeon, David Howells, Paulo Alcantara, Tom Talpey, CIFS,
	samba-technical, Arnd Bergmann, LKML

On Tue, Feb 17, 2026 at 3:25 AM Stefan Metzmacher <metze@samba.org> wrote:
>
> Am 17.02.26 um 03:16 schrieb Steve French:
> > I noticed build warnings on two files when I build with your updated
> > branch. See below:
> >
> >    CHECK   client/smbdirect.c
> > client/smbdirect.c:97:1: error: bad integer constant expression
> > client/smbdirect.c:97:1: error: static assertion failed:
> > "MODULE_INFO(parmtype, ...) contains embedded NUL byte"
> > client/smbdirect.c:98:1: error: bad integer constant expression
> > client/smbdirect.c:98:1: error: static assertion failed:
> > "MODULE_INFO(parm, ...) contains embedded NUL byte"
> > client/smbdirect.c:104:1: error: bad integer constant expression
> > client/smbdirect.c:104:1: error: static assertion failed:
> > "MODULE_INFO(parmtype, ...) contains embedded NUL byte"
> > client/smbdirect.c:105:1: error: bad integer constant expression
> > client/smbdirect.c:105:1: error: static assertion failed:
> > "MODULE_INFO(parm, ...) contains embedded NUL byte"
> >    CC [M]  server/server.o
> >    CHECK   server/server.c
> > server/server.c:629:1: error: bad integer constant expression
> > server/server.c:629:1: error: static assertion failed:
> > "MODULE_INFO(author, ...) contains embedded NUL byte"
> > server/server.c:630:1: error: bad integer constant expression
> > server/server.c:630:1: error: static assertion failed:
> > "MODULE_INFO(description, ...) contains embedded NUL byte"
> > server/server.c:631:1: error: bad integer constant expression
> > server/server.c:631:1: error: static assertion failed:
> > "MODULE_INFO(license, ...) contains embedded NUL byte"
> > server/server.c:632:1: error: bad integer constant expression
> > server/server.c:632:1: error: static assertion failed:
> > "MODULE_INFO(softdep, ...) contains embedded NUL byte"
> > server/server.c:633:1: error: bad integer constant expression
> > server/server.c:633:1: error: static assertion failed:
> > "MODULE_INFO(softdep, ...) contains embedded NUL byte"
> > server/server.c:634:1: error: bad integer constant expression
> > server/server.c:634:1: error: static assertion failed:
> > "MODULE_INFO(softdep, ...) contains embedded NUL byte"
> > server/server.c:635:1: error: bad integer constant expression
> > server/server.c:635:1: error: static assertion failed:
> > "MODULE_INFO(softdep, ...) contains embedded NUL byte"
> > server/server.c:636:1: error: bad integer constant expression
> > server/server.c:636:1: error: static assertion failed:
> > "MODULE_INFO(softdep, ...) contains embedded NUL byte"
> > server/server.c:637:1: error: bad integer constant expression
> > server/server.c:637:1: error: static assertion failed:
> > "MODULE_INFO(softdep, ...) contains embedded NUL byte"
> > server/server.c:638:1: error: bad integer constant expression
> > server/server.c:638:1: error: static assertion failed:
> > "MODULE_INFO(softdep, ...) contains embedded NUL byte"
>
> I didn't change any MODULE_INFO() code, I guess it also happens
> without my patches?
>
> I saw something similar with MODULE_LICENSE and maybe MODULE_DESCRIPTION
> in the 6.19 merge windows.
>
> And it was a bug in sparse.
>
> I updated the version I use to this commit:
> https://git.kernel.org/pub/scm/linux/kernel/git/viro/sparse.git/commit/?id=2634e39bf02697a18fece057208150362c985992
> which is one above https://git.kernel.org/pub/scm/devel/sparse/sparse.git/

Good catch - you were right it is a bug in sparse tool, not something
you changed (I had to upgrade sparse since it wasn't getting run for
the last few days due to requiring an upgrade).   I added the fix from
Al which fixed the incorrect warning.


-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-02-17 22:34 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
     [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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox