[PATCH 1/5] smb: common: split out smb_direct related header files
Stefan Metzmacher
metze at samba.org
Tue May 27 19:59:25 UTC 2025
Am 27.05.25 um 20:50 schrieb Tom Talpey:
> I love the idea. Couple of questions on the pathnames...
>
> On 5/27/2025 12:12 PM, Stefan Metzmacher wrote:
>> This is just a start moving into a common smb_direct layer.
>>
>> Cc: Steve French <smfrench at gmail.com>
>> Cc: Tom Talpey <tom at talpey.com>
>> Cc: Long Li <longli at microsoft.com>
>> Cc: Namjae Jeon <linkinjeon at kernel.org>
>> Cc: Hyunchul Lee <hyc.lee at gmail.com>
>> Cc: linux-cifs at vger.kernel.org
>> Cc: samba-technical at lists.samba.org
>> Signed-off-by: Stefan Metzmacher <metze at samba.org>
>> ---
>> fs/smb/common/smb_direct/smb_direct.h | 11 +++++
>> fs/smb/common/smb_direct/smb_direct_pdu.h | 51 +++++++++++++++++++++++
>
> Why the underscore in "smb_direct", in both components? The protocol
> doesn't use this, and it seems awkward and search-unfriendly.
Yes, I'd also prefer smbdirect and I just used it because I had
my existing wip driver under that name, but that should not matter.
The other reason was that the existing structures used smb_direct_
as prefix, but I'll also change that.
>> fs/smb/server/transport_rdma.h | 43 +------------------
>> 3 files changed, 64 insertions(+), 41 deletions(-)
>> create mode 100644 fs/smb/common/smb_direct/smb_direct.h
>> create mode 100644 fs/smb/common/smb_direct/smb_direct_pdu.h
>>
>> diff --git a/fs/smb/common/smb_direct/smb_direct.h b/fs/smb/common/smb_direct/smb_direct.h
>> new file mode 100644
>> index 000000000000..c745c37a3fea
>> --- /dev/null
>> +++ b/fs/smb/common/smb_direct/smb_direct.h
>> @@ -0,0 +1,11 @@
>> +/* SPDX-License-Identifier: GPL-2.0-or-later */
>> +/*
>> + * Copyright (C) 2025, Stefan Metzmacher <metze at samba.org>
>> + */
>> +
>> +#ifndef __FS_SMB_COMMON_SMB_DIRECT_SMB_DIRECT_H__
>> +#define __FS_SMB_COMMON_SMB_DIRECT_SMB_DIRECT_H__
>> +
>> +#include "smb_direct_pdu.h"
>
> And, why the empty redirection? It seems unnecessary, do I assume it
> will later contain API signatures for the planned common layer? Perhaps
> it should say this, to avoid confusion while that work is being done.
I'll think about it maybe I'll remove the redirection.
In the end the pdu definitions belong only in a single common .c files,
but it will take a lot of steps to get there.
I'll post a v2 tomorrow or next week.
Thanks!
metze
More information about the samba-technical
mailing list