From patchwork Sun Mar 15 22:50:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 11439429 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 B5E091667 for ; Sun, 15 Mar 2020 22:50:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 81108206E9 for ; Sun, 15 Mar 2020 22:50:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="W3eCO7z8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729288AbgCOWuX (ORCPT ); Sun, 15 Mar 2020 18:50:23 -0400 Received: from mail-qk1-f170.google.com ([209.85.222.170]:35333 "EHLO mail-qk1-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729274AbgCOWuW (ORCPT ); Sun, 15 Mar 2020 18:50:22 -0400 Received: by mail-qk1-f170.google.com with SMTP id d8so23048542qka.2 for ; Sun, 15 Mar 2020 15:50:21 -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; bh=1yhoUv4kMXivgY0Sb7etbcjFy39MOeOnu80PF6qEXxU=; b=W3eCO7z8rT4gPvjr2fsnZMo6/ZhY+NdcFkyZPqJpyWJMzWopnoYOnwvjjL8yYKqabI vWlKE3jBP8ZjU4j5qX56GymNVL2TIdfECJZ9EyOqRcsmgFXGhsQoCd8hGu2CkYnChA3j phL4t5vBVcyHoTUiZysNh7EZvBqXTBICRRTCIO7mRAINNFH3WjDKu9oyE7+9PlUwPPv8 WqFnuGxrBO0ZFSjC3a4WjOHAz78xJR2RcVnASfFCJxCthO4t1l01axYJrdFxBfP4zlZe 5Z7K+S3mE2OBXQSjTLc0fORZlvGrEpjhhiOCEIZiLjE1LwXsj/Y2+g55uhxU34y15RmY M9uQ== 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; bh=1yhoUv4kMXivgY0Sb7etbcjFy39MOeOnu80PF6qEXxU=; b=EUvT0ew2kcaLufVnxYj6xKYX49BnOA7ex6qAm4/2i0XATMrdMI1V32170egfBiVkG1 lYAp89g6Y/ENwetFPZjTnniCMlmIZ8wMf76ASPuea1bbGDH6HYcC7Jlq6URmogSVJATm tCxFQO+hotXkAdE1/WNk9T528KGKqtts5n+zAy+z8f1ZlvFxgP5z6bpwUTjBq2LTXpbO bXmK84lEKVYmsFLQLLJI9rc8S5/Q8bfLFn8jlbCB7bxbRSI5ijorHI7H22EII+J5AQAP H+MnkWbVJmUX3shVPkS3uzbw9jD8c+O5xGUM8ClpXXaFHespvqj/91J0P67X6gKaDpBv 1/lw== X-Gm-Message-State: ANhLgQ1lDoStPSrFEyqcZBGqxp7y5Xl+YewbKouP5/F7qg57NDeagivg 5rhQas2yfJNAYAWWT5q521p+BUQsCKD5Apw8jfLGfXjK X-Google-Smtp-Source: ADFU+vtdKxen4Ixwp1iR7WDaYWja5LFL8CFEtu1wHKEsxR5juGB1Z3gJoq/bLxbmVT6yLXtIQxmLsoDJt32n7Q2rVOc= X-Received: by 2002:a25:f20f:: with SMTP id i15mr30560794ybe.364.1584312621004; Sun, 15 Mar 2020 15:50:21 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Sun, 15 Mar 2020 17:50:09 -0500 Message-ID: Subject: [SMB3] New compression flags To: CIFS , samba-technical Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Some compression related flags I noticed were added in the latest MS-SMB2 From 12837ae091d533b58c80a0da43b92980b7ff5b6b Mon Sep 17 00:00:00 2001 From: Steve French Date: Sun, 15 Mar 2020 17:42:41 -0500 Subject: [PATCH] SMB3: Add new compression flags Additional compression capabilities can now be negotiated and a new compression algorithm. Add the flags for these. See newly updated MS-SMB2 sections 3.1.4.4.1 and 2.2.3.1.3 Signed-off-by: Steve French --- fs/cifs/smb2pdu.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h index 817bc0531536..4a7d154fffae 100644 --- a/fs/cifs/smb2pdu.h +++ b/fs/cifs/smb2pdu.h @@ -307,11 +307,17 @@ struct smb2_encryption_neg_context { #define SMB3_COMPRESS_LZNT1 cpu_to_le16(0x0001) #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) + +/* Compression Flags */ +#define SMB2_COMPRESSION_CAPABILITIES_FLAG_NONE cpu_to_le32(0x00000000) +#define SMB2_COMPRESSION_CAPABILITIES_FLAG_CHAINED cpu_to_le32(0x00000001) struct smb2_compression_capabilities_context { __le16 ContextType; /* 3 */ __le16 DataLength; - __u32 Reserved; + __u32 Flags; __le16 CompressionAlgorithmCount; __u16 Padding; __u32 Reserved1; -- 2.20.1