Skip to contentSkip to conversation

smb: smbdirect: select CONFIG_SG_POOL

PATCH In review Arnd Bergmann 3 participants 5 messages Feb 16

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 smb: smbdirect: select CONFIG_SG_POOL

From: Arnd Bergmann <[email protected]>

The smbdirect code now uses the scatter/gather pool interface. This causes a build failure when the interface is disabled:

In file included from fs/smb/client/../common/smbdirect/smbdirect_all_c_files.c:21,

                 from fs/smb/client/smbdirect.c:176:
fs/smb/client/../common/smbdirect/smbdirect_rw.c: In function 'smbdirect_connection_rw_io_free':
fs/smb/client/../common/smbdirect/smbdirect_rw.c:76:9: error: implicit declaration of function 'sg_free_table_chained' [-Wimplicit-function-declaration]
   76 |         sg_free_table_chained(&msg->sgt, SG_CHUNK_SIZE);
      |         ^~~~~~~~~~~~~~~~~~~~~

The other users of this interface all 'select SG_POOL', so so the same here.

Fixes 5ab0987c492e ("smb: smbdirect: introduce smbdirect_rw.c with server rw code")
---
 fs/smb/client/Kconfig | 1 +
 1 file changed, 1 insertion(+)
fs/smb/client/Kconfig +1 -0
index 17bd368574e9..725422b45ef4 100644
@@ -182,6 +182,7 @@ if CIFS
 config CIFS_SMB_DIRECT
 	bool "SMB Direct support"
 	depends on CIFS=m && INFINIBAND && INFINIBAND_ADDR_TRANS || CIFS=y && INFINIBAND=y && INFINIBAND_ADDR_TRANS=y
+	select SG_POOL
 	help
 	  Enables SMB Direct support for SMB 3.0, 3.02 and 3.1.1.
 	  SMB Direct allows transferring SMB packets over RDMA. If unsure,
Signature · 1 line
2.39.5
#1 lore raw

Hi Arnd,

I'm wondering what the top commit is that you where compiling, I guess that's before the 'smb: client: make use of smbdirect.ko' commit.

As we have this at the end of the patchset in ksmbd-for-next:

fs/smb/common/smbdirect/Kconfig

config SMB_COMMON_SMBDIRECT

        def_tristate n
        depends on INFINIBAND && INFINIBAND_ADDR_TRANS
        depends on m || INFINIBAND != m
        select SG_POOL

I'll try to change the patches to have your hunk in the temporary phase in the patchset where we use smbdirect_all_c_files, as it's gone at the end of the patchset.

Thanks!
metze

Am 16.02.26 um 11:54 schrieb Arnd Bergmann:

Quoted 33 lines

From: Arnd Bergmann <[email protected]>

The smbdirect code now uses the scatter/gather pool interface. This causes a build failure when the interface is disabled:

In file included from fs/smb/client/../common/smbdirect/smbdirect_all_c_files.c:21,

                  from fs/smb/client/smbdirect.c:176:
fs/smb/client/../common/smbdirect/smbdirect_rw.c: In function 'smbdirect_connection_rw_io_free':
fs/smb/client/../common/smbdirect/smbdirect_rw.c:76:9: error: implicit declaration of function 'sg_free_table_chained' [-Wimplicit-function-declaration]
    76 |         sg_free_table_chained(&msg->sgt, SG_CHUNK_SIZE);
       |         ^~~~~~~~~~~~~~~~~~~~~

The other users of this interface all 'select SG_POOL', so so the same here.

Fixes 5ab0987c492e ("smb: smbdirect: introduce smbdirect_rw.c with server rw code")
---
  fs/smb/client/Kconfig | 1 +
  1 file changed, 1 insertion(+)
fs/smb/client/Kconfig +1 -0
index 17bd368574e9..725422b45ef4 100644
@@ -182,6 +182,7 @@ if CIFS
  config CIFS_SMB_DIRECT
  	bool "SMB Direct support"
  	depends on CIFS=m && INFINIBAND && INFINIBAND_ADDR_TRANS || CIFS=y && INFINIBAND=y && INFINIBAND_ADDR_TRANS=y
+	select SG_POOL
  	help
  	  Enables SMB Direct support for SMB 3.0, 3.02 and 3.1.1.
  	  SMB Direct allows transferring SMB packets over RDMA. If unsure,
#2 lore raw

Am 16.02.26 um 12:15 schrieb Stefan Metzmacher via samba-technical:

Quoted 46 lines

Hi Arnd,

I'm wondering what the top commit is that you where compiling, I guess that's before the 'smb: client: make use of smbdirect.ko' commit.

As we have this at the end of the patchset in ksmbd-for-next:

fs/smb/common/smbdirect/Kconfig

config SMB_COMMON_SMBDIRECT
        def_tristate n
        depends on INFINIBAND && INFINIBAND_ADDR_TRANS depends on m || INFINIBAND != m select SG_POOL

I'll try to change the patches to have your hunk in the temporary phase in the patchset where we use smbdirect_all_c_files, as it's gone at the end of the patchset.

Thanks!
metze

Am 16.02.26 um 11:54 schrieb Arnd Bergmann:

Quoted 21 lines

From: Arnd Bergmann <[email protected]>

The smbdirect code now uses the scatter/gather pool interface. This causes a build failure when the interface is disabled:

In file included from fs/smb/client/../common/smbdirect/smbdirect_all_c_files.c:21,
                  from fs/smb/client/smbdirect.c:176:
fs/smb/client/../common/smbdirect/smbdirect_rw.c: In function 'smbdirect_connection_rw_io_free':
fs/smb/client/../common/smbdirect/smbdirect_rw.c:76:9: error: implicit declaration of function 'sg_free_table_chained' [-Wimplicit-function-declaration] 76 |         sg_free_table_chained(&msg->sgt, SG_CHUNK_SIZE);
       |         ^~~~~~~~~~~~~~~~~~~~~

The other users of this interface all 'select SG_POOL', so so the same here.

Fixes 5ab0987c492e ("smb: smbdirect: introduce smbdirect_rw.c with server rw code")

---
  fs/smb/client/Kconfig | 1 +

  1 file changed, 1 insertion(+)
Quoted 9 lines
Quoted 9 lines
fs/smb/client/Kconfig +0 -0
index 17bd368574e9..725422b45ef4 100644
@@ -182,6 +182,7 @@ if CIFS

  config CIFS_SMB_DIRECT
      bool "SMB Direct support"
      depends on CIFS=m && INFINIBAND && INFINIBAND_ADDR_TRANS || CIFS=y && INFINIBAND=y && INFINIBAND_ADDR_TRANS=y +    select SG_POOL

I'm squashing this into the
'smb: client: include smbdirect_all_c_files.c' commit and the 'smb: client: make use of smbdirect.ko' commit will remove it again.

metze

#3 lore raw
In reply to Stefan Metzmacher
Quoted 5 lines · Stefan Metzmacher

Hi Arnd,

I'm wondering what the top commit is that you where compiling, I guess that's before the 'smb: client: make use of smbdirect.ko' commit.

I'm on today's linux-next-20260213, which contains

4c91b67f87ac smb: client: fix data corruption due to racy lease checks 3774289f525c smb/client: move NT_STATUS_MORE_ENTRIES
617a5d2473dc smb/client: rename to NT_ERROR_INVALID_DATATYPE
fa34d0a57033 smb/client: rename to NT_STATUS_SOME_NOT_MAPPED
4da735c48a27 smb/client: map NT_STATUS_PRIVILEGE_NOT_HELD
3e5f08342860 smb/client: map NT_STATUS_MORE_PROCESSING_REQUIRED
e4424687fc6d smb/client: map NT_STATUS_BUFFER_OVERFLOW
ba39063ca3ee smb/client: map NT_STATUS_NOTIFY_ENUM_DIR
66dc58bdbd7c cifs: SMB1 split: Remove duplicate include of cifs_debug.h 72f4d4803486 smb: client: fix regression with mount options parsing 72f4d4803486 smb: client: fix regression with mount options parsing 4c91b67f87ac smb: client: fix data corruption due to racy lease checks 3774289f525c smb/client: move NT_STATUS_MORE_ENTRIES
617a5d2473dc smb/client: rename to NT_ERROR_INVALID_DATATYPE
fa34d0a57033 smb/client: rename to NT_STATUS_SOME_NOT_MAPPED
4da735c48a27 smb/client: map NT_STATUS_PRIVILEGE_NOT_HELD
3e5f08342860 smb/client: map NT_STATUS_MORE_PROCESSING_REQUIRED
e4424687fc6d smb/client: map NT_STATUS_BUFFER_OVERFLOW
ba39063ca3ee smb/client: map NT_STATUS_NOTIFY_ENUM_DIR
66dc58bdbd7c cifs: SMB1 split: Remove duplicate include of cifs_debug.h 72f4d4803486 smb: client: fix regression with mount options parsing d53f4d93f3d6 Merge tag 'v7.0-rc-part1-ksmbd-and-smbdirect-fixes' of git://git.samba.org/ksmbd
8f7df60fe063 ("ksmbd: fix non-IPv6 build")
...

Quoted 3 lines

As we have this at the end of the patchset in ksmbd-for-next:

fs/smb/common/smbdirect/Kconfig

This file is not in linux-next as of today, as far as I can tell.

Quoted 10 lines

config SMB_COMMON_SMBDIRECT

         def_tristate n
         depends on INFINIBAND && INFINIBAND_ADDR_TRANS
         depends on m || INFINIBAND != m
         select SG_POOL

I'll try to change the patches to have your hunk in the temporary phase in the patchset where we use smbdirect_all_c_files, as it's gone at the end of the patchset.

Ok, thanks!

Arnd

#4 lore raw

Am 16.02.26 um 12:48 schrieb Arnd Bergmann:

Quoted 25 lines · Stefan Metzmacher
Quoted 5 lines

Hi Arnd,

I'm wondering what the top commit is that you where compiling, I guess that's before the 'smb: client: make use of smbdirect.ko' commit.

I'm on today's linux-next-20260213, which contains

4c91b67f87ac smb: client: fix data corruption due to racy lease checks 3774289f525c smb/client: move NT_STATUS_MORE_ENTRIES 617a5d2473dc smb/client: rename to NT_ERROR_INVALID_DATATYPE fa34d0a57033 smb/client: rename to NT_STATUS_SOME_NOT_MAPPED 4da735c48a27 smb/client: map NT_STATUS_PRIVILEGE_NOT_HELD 3e5f08342860 smb/client: map NT_STATUS_MORE_PROCESSING_REQUIRED e4424687fc6d smb/client: map NT_STATUS_BUFFER_OVERFLOW ba39063ca3ee smb/client: map NT_STATUS_NOTIFY_ENUM_DIR 66dc58bdbd7c cifs: SMB1 split: Remove duplicate include of cifs_debug.h 72f4d4803486 smb: client: fix regression with mount options parsing 72f4d4803486 smb: client: fix regression with mount options parsing 4c91b67f87ac smb: client: fix data corruption due to racy lease checks 3774289f525c smb/client: move NT_STATUS_MORE_ENTRIES 617a5d2473dc smb/client: rename to NT_ERROR_INVALID_DATATYPE fa34d0a57033 smb/client: rename to NT_STATUS_SOME_NOT_MAPPED 4da735c48a27 smb/client: map NT_STATUS_PRIVILEGE_NOT_HELD

Quoted 12 lines

3e5f08342860 smb/client: map NT_STATUS_MORE_PROCESSING_REQUIRED
e4424687fc6d smb/client: map NT_STATUS_BUFFER_OVERFLOW
ba39063ca3ee smb/client: map NT_STATUS_NOTIFY_ENUM_DIR
66dc58bdbd7c cifs: SMB1 split: Remove duplicate include of cifs_debug.h 72f4d4803486 smb: client: fix regression with mount options parsing d53f4d93f3d6 Merge tag 'v7.0-rc-part1-ksmbd-and-smbdirect-fixes' of git://git.samba.org/ksmbd
8f7df60fe063 ("ksmbd: fix non-IPv6 build")
...

Quoted 3 lines

As we have this at the end of the patchset in ksmbd-for-next:

fs/smb/common/smbdirect/Kconfig

Ah, ok, that was because Steve only had 1/3 of the patchset applied last week.

So this problem should be gone in the next linux-next round, will not have the problem.

Quoted 12 lines

This file is not in linux-next as of today, as far as I can tell.

Quoted 10 lines

config SMB_COMMON_SMBDIRECT

          def_tristate n
          depends on INFINIBAND && INFINIBAND_ADDR_TRANS
          depends on m || INFINIBAND != m
          select SG_POOL

I'll try to change the patches to have your hunk in the temporary phase in the patchset where we use smbdirect_all_c_files, as it's gone at the end of the patchset.

And once I tested my updated patchset and Steve
applied it, it should even work for every single
patch.

metze