From patchwork Sat May 30 22:13:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 11580559 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ECE63139A for ; Sat, 30 May 2020 22:13:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD1E3207BB for ; Sat, 30 May 2020 22:13:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gMoW8EnT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729183AbgE3WNv (ORCPT ); Sat, 30 May 2020 18:13:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729083AbgE3WNu (ORCPT ); Sat, 30 May 2020 18:13:50 -0400 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6127C03E969 for ; Sat, 30 May 2020 15:13:49 -0700 (PDT) Received: by mail-yb1-xb2f.google.com with SMTP id y13so1001051ybj.10 for ; Sat, 30 May 2020 15:13:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=Xv8kKKg/z6tYKPlyvVwWQTDcY+FWSdDFJ4coDTSzcv0=; b=gMoW8EnTlwjDqxHwNw623mFHhPy3vZwdDJcf187l1jH47Zddp2KvSe00ZQRT+Lbaak xp5ePrWunc29uB+qJnLqEaZxnkGaWZW8dPgzhHTZJ4y8e0Xipwht/n1H1QDrgEF69HNl 0HGVvBgIdxmoI2DFHiPLU/L4ARe5POg3wHxqR6wE8CppADsBJyv4/YJgIjhNQDupJXEq 8YUvIw4mAwxqqxNfG6duN3KBTf65o1hVoUHnhVGNoRt0/GjkQeCQKt4X3IV1N3fRrHKN WCIKuqV8vfL4zSKjntEEeFPRHR5xVcBhCbseuZ8XGqyEfudLF9ViulJGqYW0rHxC/XoS GJRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=Xv8kKKg/z6tYKPlyvVwWQTDcY+FWSdDFJ4coDTSzcv0=; b=jAUBNqiTR81ugj/e9yjC8yRh488gJUbsaI4ipfKraDYhvtVayRNwrVbejhc6h4P+7o rqIUicnOpuszxAWztX7/E2/Mnj2NihGBWtMaXNdFwrt9Lw5aMUYlHbwNpCP2OW9brjND LVFIBrVPcKYig33CSz6z7dgMPBekvtanGhio1a1UgIUVyXCMJtiTOKaVLb3f+QhcGZu+ yJOedOH4XZ1FOsW1/323Sk8VxkRghHSMUp1soF+Yoy3fTvUUW7JBGj4z8FPvmvRq5G1b zVc2Ijkp/bJzSquEMg2voc+sVaZ6oUw1frWSCK+p6En/H0n+2QjP2yaxY9HcjDwyFeIc bkJw== X-Gm-Message-State: AOAM5332ZGm7Anlc+UX6pWdPLmPi0tXiBZkXdSfLqUpPWg8chvqoc1D6 X7skl6SJ0N9deBp6vKLbQ+2h5ZbqgFsvjryc7EC+rNnNCYQ= X-Google-Smtp-Source: ABdhPJxWkBFE7En1mDyCtp/NW13ukTw3z/JC07L55HgTHhJo3Vp4iBW1mn9kz3GtfAlcP9lofiHnJ2L5aghZg2+5XmI= X-Received: by 2002:a25:6c6:: with SMTP id 189mr13036293ybg.375.1590876828739; Sat, 30 May 2020 15:13:48 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Sat, 30 May 2020 17:13:37 -0500 Message-ID: Subject: [PATCH][smb3] minor update to compression header definitions To: CIFS Cc: samba-technical , =?utf-8?q?Aur=C3=A9li?= =?utf-8?q?en_Aptel?= Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org MS-SMB2 specification was updated in March. Make minor additions and corrections to compression related definitions in smb2pdu.h Reviewed-by: Aurelien Aptel From b799f8fd72bb4919280bab988f9e5e9c9cc7b21f Mon Sep 17 00:00:00 2001 From: Steve French 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 --- 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