From patchwork Wed May 13 13:24:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Wang X-Patchwork-Id: 6397171 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 51CDA9F32E for ; Wed, 13 May 2015 13:24:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 753C02026F for ; Wed, 13 May 2015 13:24:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 78F9C20155 for ; Wed, 13 May 2015 13:24:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934347AbbEMNYh (ORCPT ); Wed, 13 May 2015 09:24:37 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:38147 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934202AbbEMNYf (ORCPT ); Wed, 13 May 2015 09:24:35 -0400 Received: by wicnf17 with SMTP id nf17so55735320wic.1 for ; Wed, 13 May 2015 06:24:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+m04TPboqIRfrJ9pd9Io/eodfxCt1q/aZBYBh/mexHA=; b=hPW37ZHTGXxKq3VnEDOXHnvJW/RLDAY69BxQaGbKgMCwunNlYFS08QBzcjDq6dXUr9 e+cJoUipORAs+NB1bS+YdpN4kZ7l4tStF82LKpdtyue0+gJH+X7GUIlzqdU4zRjPq9df 8JYIrSxLD5sXVYf1ndxlNmqMpigr2YEIZexggxP7etsyfEkqLK0wQWMaHWaOhaq3sbO7 CA5KVDr6pLMNO8h0Miax+Bd7gChgYt9xenUX1tGV6CRnlZ9GEfeGSSLB+LDA27IsDggV QT4JmgCtDZvNqdRzAuvXx/WP6ibZyhxBIB7wCseV1w22Pek31+P92yo8mtcju/r26yWN 0dQQ== X-Gm-Message-State: ALoCoQluD9CxSuJAQtrDbXsPrlYOJ4F02MUF7AuJ5M58XXA+gc/uGAgaB6llVh3OqEl+Wt4O3wFM X-Received: by 10.180.88.72 with SMTP id be8mr39383861wib.45.1431523474424; Wed, 13 May 2015 06:24:34 -0700 (PDT) Received: from ubuntu.pb.local ([62.217.45.26]) by mx.google.com with ESMTPSA id cf9sm7361486wjc.27.2015.05.13.06.24.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 May 2015 06:24:33 -0700 (PDT) From: Michael Wang To: Roland Dreier , Sean Hefty , Hal Rosenstock , Doug Ledford , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: Michael Wang , Or Gerlitz , Ira Weiny , Jason Gunthorpe Subject: [PATCH RFC] Documentation/infiniband: Add docs for rdma-helpers Date: Wed, 13 May 2015 15:24:32 +0200 Message-Id: <1431523472-10888-1-git-send-email-yun.wang@profitbricks.com> X-Mailer: git-send-email 2.1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is the following patch for: https://lkml.org/lkml/2015/5/5/417 which try to document the settled rdma_cap_XX(). Highlights: There could be many missing/mistakes/misunderstanding, please don't be hesitate to point out the issues, any suggestions to improve or complete the description are very welcomed ;-) Signed-off-by: Michael Wang --- Documentation/infiniband/rdma_helpers.txt | 76 +++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Documentation/infiniband/rdma_helpers.txt diff --git a/Documentation/infiniband/rdma_helpers.txt b/Documentation/infiniband/rdma_helpers.txt new file mode 100644 index 0000000..abc75ec --- /dev/null +++ b/Documentation/infiniband/rdma_helpers.txt @@ -0,0 +1,76 @@ +RDMA HELPERS + + For core layer, below helpers are used to check if a paticular capability + is supported by the port. + + rdma_cap_ib_mad - Infiniband Management Datagrams. + rdma_cap_ib_smi - Infiniband Subnet Management Interface. + rdma_cap_ib_cm - Infiniband Communication Manager. + rdma_cap_iw_cm - IWARP Communication Manager. + rdma_cap_ib_sa - Infiniband Subnet Administration. + rdma_cap_ib_mcast - Infiniband Multicast. + rdma_cap_read_multi_sge - RDMA Read Multiple Scatter-Gather Entries. + rdma_cap_af_ib - Native Infiniband Address. + rdma_cap_eth_ah - Ethernet Address Handler. + +USAGE + + if (rdma_cap_XX(device, i)) { + /* The port i of device support XX */ + ... + } else { + /* The port i of device don't support XX */ + ... + } + + rdma_cap_ib_mad + --------------- + Management Datagrams (MAD) is the prototype of management packet + to be used by all the kinds of infiniband managers, use the helper + to verify the port before utilize related features. + + rdma_cap_ib_smi + --------------- + Subnet Management Interface (SMI) will handle SMP packet from SM + in an infiniband fabric, use the helper to verify the port before + utilize related features. + + rdma_cap_ib_cm + --------------- + Communication Manager (CM) will handle the connections between + adaptors, currently there are two different implementation, + IB or IWARP, use the helper to verify whether the port using + IB-CM or not + + rdma_cap_iw_cm + --------------- + IWARP has it's own implemented CM which is different from infiniband, + use the helper to check whether the port using IWARP-CM or not. + + rdma_cap_ib_sa + --------------- + Subnet Administration (SA) is the database built by SM in an + infiniband fabric, use the helper to verify the port before + utilize related features. + + rdma_cap_ib_mcast + --------------- + Multicast is the feature for one QP to send messages to multiple + QP in an infiniband fabric, use the helper to verify the port before + utilize related features. + + rdma_cap_read_multi_sge + --------------- + RDMA read operation could support multiple scatter-gather entries, + use the helper to verify wthether the port support this feature + or not. + + rdma_cap_af_ib + --------------- + RDMA address format could be ethernet or infiniband, use the helper + to verify whether the port support infiniband format or not. + + rdma_cap_eth_ah + --------------- + Infiniband address handler format is special in ethernet fabric, use + the helper to verify whether the port is using ethernet format or not.