From patchwork Wed Aug 2 20:10:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Li X-Patchwork-Id: 9877653 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E0ABF603B4 for ; Wed, 2 Aug 2017 20:24:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D30E628800 for ; Wed, 2 Aug 2017 20:24:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8273286BB; Wed, 2 Aug 2017 20:24:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D1FE2877B for ; Wed, 2 Aug 2017 20:24:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752435AbdHBUXn (ORCPT ); Wed, 2 Aug 2017 16:23:43 -0400 Received: from a2nlsmtp01-05.prod.iad2.secureserver.net ([198.71.225.49]:47934 "EHLO a2nlsmtp01-05.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752118AbdHBUMO (ORCPT ); Wed, 2 Aug 2017 16:12:14 -0400 Received: from linuxonhyperv.com ([107.180.71.197]) by : HOSTING RELAY : with SMTP id czz6d3Vwb80gSczz6dCUTH; Wed, 02 Aug 2017 13:11:13 -0700 x-originating-ip: 107.180.71.197 Received: from longli by linuxonhyperv.com with local (Exim 4.89) (envelope-from ) id 1dczz6-0005Fq-Ca; Wed, 02 Aug 2017 13:11:12 -0700 From: Long Li To: Steve French , linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-kernel@vger.kernel.org Cc: Long Li Subject: [[PATCH v1] 02/37] [CIFS] SMBD: Add structure for SMBD transport Date: Wed, 2 Aug 2017 13:10:13 -0700 Message-Id: <1501704648-20159-3-git-send-email-longli@exchange.microsoft.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1501704648-20159-1-git-send-email-longli@exchange.microsoft.com> References: <1501704648-20159-1-git-send-email-longli@exchange.microsoft.com> X-CMAE-Envelope: MS4wfHi11Yd1shjLymHD0rLLx5EeLLGLqdNg5CVdpppTid5nbv8Zn2wpliEU0ltn2u6VjlibXTxoSzawgm75ixHcGuuHdj+e/Fsx4oR/lTZuBMoKHp8rR3EB V2EAkh/E+FSY/OCS6mcGvnU0BEWChKLliarDJkAe8F5L8qcRV9QDVuh9nMzD94y/eG6nknkJ8LZ+HZTiDYOTOmNS2AdUrC8deGdBIKkN0e1uXtO1d4ai5a9h unkkmugOzyEjtSfTrEMdF07gwbHmLjcdYxRfbEbm63D26nKGRBZ+QdlEC6wiHdDQXbzniq4z5qkv7SDdnWsdGAi1KyTyfGlT3a1kxTjmkiw= Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Long Li Define a new structure for SMBD transport. This stucture will have all the information on the transport, and it will be stored in the current SMB session. Signed-off-by: Long Li --- fs/cifs/cifsrdma.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/cifs/cifsrdma.h | 45 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 fs/cifs/cifsrdma.c create mode 100644 fs/cifs/cifsrdma.h diff --git a/fs/cifs/cifsrdma.c b/fs/cifs/cifsrdma.c new file mode 100644 index 0000000..a2c0478 --- /dev/null +++ b/fs/cifs/cifsrdma.c @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2017, Microsoft Corporation. + * + * Author(s): Long Li + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See + * the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "cifspdu.h" +#include "cifsglob.h" +#include "cifsproto.h" +#include "cifs_unicode.h" +#include "cifs_debug.h" +#include "cifs_fs_sb.h" +#include "ntlmssp.h" +#include "nterr.h" +#include "rfc1002pdu.h" +#include "fscache.h" + +#include "cifsrdma.h" + diff --git a/fs/cifs/cifsrdma.h b/fs/cifs/cifsrdma.h new file mode 100644 index 0000000..ec6aa61 --- /dev/null +++ b/fs/cifs/cifsrdma.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2017, Microsoft Corporation. + * + * Author(s): Long Li + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See + * the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef _CIFS_RDMA_H +#define _CIFS_RDMA_H + +#include "cifsglob.h" +#include +#include +#include + +/* + * The context for the SMBDirect transport + * Everything related to the transport is here. It has several logical parts + * 1. RDMA related structures + * 2. SMBDirect connection parameters + * 3. Reassembly queue for data receive path + * 4. mempools for allocating packets + */ +struct cifs_rdma_info { + struct TCP_Server_Info *server_info; + + // for debug purposes + unsigned int count_receive_buffer; + unsigned int count_get_receive_buffer; + unsigned int count_put_receive_buffer; + unsigned int count_send_empty; +}; +#endif