* [PATCH][smb3] minor update to compression header definitions
@ 2020-05-30 22:13 Steve French
2020-06-02 9:07 ` Aurélien Aptel
0 siblings, 1 reply; 2+ messages in thread
From: Steve French @ 2020-05-30 22:13 UTC (permalink / raw)
To: CIFS; +Cc: samba-technical, Aurélien Aptel
[-- Attachment #1: Type: text/plain, Size: 154 bytes --]
MS-SMB2 specification was updated in March. Make minor additions
and corrections to compression related definitions in smb2pdu.h
--
Thanks,
Steve
[-- Attachment #2: 0001-smb3-minor-update-to-compression-header-definitions.patch --]
[-- Type: text/x-patch, Size: 1604 bytes --]
From b799f8fd72bb4919280bab988f9e5e9c9cc7b21f Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Sat, 30 May 2020 17:10:16 -0500
Subject: [PATCH] smb3: minor update to compression header definitions
MS-SMB2 specification was updated in March. Make minor additions
and corrections to compression related definitions in smb2pdu.h
Signed-off-by: Steve French <stfrench@microsoft.com>
---
fs/cifs/smb2pdu.h | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h
index 10acf90f858d..3b0e6acf9d7d 100644
--- a/fs/cifs/smb2pdu.h
+++ b/fs/cifs/smb2pdu.h
@@ -143,8 +143,17 @@ struct smb2_transform_hdr {
__u64 SessionId;
} __packed;
+/* See MS-SMB2 2.2.42 */
+struct smb2_compression_transform_hdr {
+ __le32 ProtocolId; /* 0xFC 'S' 'M' 'B' */
+ __le32 OriginalCompressedSegmentSize;
+ __le16 CompressionAlgorithm;
+ __le16 Flags;
+ __le16 Length; /* if chained it is length, else offset */
+} __packed;
+
/* See MS-SMB2 2.2.42.1 */
-struct compression_playload_header {
+struct compression_payload_header {
__le16 AlgorithmId;
__le16 Reserved;
__le32 Length;
@@ -333,7 +342,7 @@ struct smb2_encryption_neg_context {
#define SMB3_COMPRESS_LZ77 cpu_to_le16(0x0002)
#define SMB3_COMPRESS_LZ77_HUFF cpu_to_le16(0x0003)
/* Pattern scanning algorithm See MS-SMB2 3.1.4.4.1 */
-#define SMB3_COMPRESS_PATTERN cpu_to_le16(0x0004)
+#define SMB3_COMPRESS_PATTERN cpu_to_le16(0x0004) /* Pattern_V1 */
/* Compression Flags */
#define SMB2_COMPRESSION_CAPABILITIES_FLAG_NONE cpu_to_le32(0x00000000)
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][smb3] minor update to compression header definitions
2020-05-30 22:13 [PATCH][smb3] minor update to compression header definitions Steve French
@ 2020-06-02 9:07 ` Aurélien Aptel
0 siblings, 0 replies; 2+ messages in thread
From: Aurélien Aptel @ 2020-06-02 9:07 UTC (permalink / raw)
To: Steve French, CIFS; +Cc: samba-technical
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
--
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-02 9:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-30 22:13 [PATCH][smb3] minor update to compression header definitions Steve French
2020-06-02 9:07 ` Aurélien Aptel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.