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: 1301292 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-cifs-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=gMoW8EnT; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 49ZG1J6yzgz9sSF for ; Sun, 31 May 2020 08:13:56 +1000 (AEST) 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