From patchwork Mon May 18 08:41:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Wang X-Patchwork-Id: 6426851 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 C07A99F318 for ; Mon, 18 May 2015 08:42:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C96CE2061F for ; Mon, 18 May 2015 08:42:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C7E112061D for ; Mon, 18 May 2015 08:42:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752277AbbERImC (ORCPT ); Mon, 18 May 2015 04:42:02 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:34366 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752085AbbERIls (ORCPT ); Mon, 18 May 2015 04:41:48 -0400 Received: by wicmc15 with SMTP id mc15so83496705wic.1 for ; Mon, 18 May 2015 01:41:47 -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=Fmzdv/cpclHSB9QIEGxKC9vzJD5R4Kvkr6Te1qvDiB4=; b=CDgDloR/KpAQ4/fn7jEoLhpdMd2W5Kqpxfc8CmtBW9zmxdp8rjZNBy7QzwArattq5a Sv0so0PZ3tBXAXzxSU0c1Y9QTrtPfrUsCwGsjSt7Due+b/w/YOkEcEi1VVcTtKUkwKhz dpS42BpV5OU+ocVwrpHs075sRtYMgVRhJ/+TRm6est0OqRLLBwDZg+pXRHEBHWHz4SdH 21UIK+P8oDAHeelZPKBjzzY58B29LqS996ATKL2eUY+3+uOC5P562Cjnzs8MvCPlo/30 AkRGBBZGD/b2n9qeBgX0avEgBDxXXS3ckruQNdyF08YwHCM9mcqeY2r+tN/iqb7yyeTH 36mg== X-Gm-Message-State: ALoCoQn76GEL2/8ceiTPnzO/3AYOKVfRjCSGgdHZ28HqHz8upWBZYX7i5QyDFjZePEhuwo/+SJj/ X-Received: by 10.180.84.201 with SMTP id b9mr19403163wiz.49.1431938507489; Mon, 18 May 2015 01:41:47 -0700 (PDT) Received: from ubuntu.pb.local ([62.217.45.26]) by mx.google.com with ESMTPSA id fs9sm15747389wjc.34.2015.05.18.01.41.46 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 May 2015 01:41:46 -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 v2] Documentation/infiniband: Add docs for rdma-helpers Date: Mon, 18 May 2015 10:41:45 +0200 Message-Id: <1431938505-31779-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 Since v1: * Merge the descriptions from Doug: http://www.spinics.net/lists/linux-rdma/msg25172.html 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 Signed-off-by: Michael Wang --- Documentation/infiniband/rdma_helpers.txt | 79 +++++++++++++++++++++++++++++++ 1 file changed, 79 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..be9416d --- /dev/null +++ b/Documentation/infiniband/rdma_helpers.txt @@ -0,0 +1,79 @@ +RDMA HELPERS + + The following helpers are used to check the specific capabilities of a + particular port before utilizing those capabilities. + + 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 Join/Leave Protocol. + rdma_cap_read_multi_sge - RDMA Read Work Request Support Multiple SGE. + rdma_cap_af_ib - Native Infiniband Address. + rdma_cap_eth_ah - InfiniBand Transport With Ethernet Address. + +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) are a required part of the InfiniBand + specification and are supported on all InfiniBand devices. A slightly + extended version are also supported on OPA interfaces. + + rdma_cap_ib_smi + --------------- + Subnet Management Interface (SMI) will handle SMP packet from SM + in an infiniband fabric. + + rdma_cap_ib_cm + --------------- + Communication Manager (CM) service, used to ease the process of connecting + to a remote host. The IB-CM can be used to connect to remote hosts using + either InfiniBand or RoCE connections, iWARP has its own CM. + + rdma_cap_iw_cm + --------------- + iWARP Communication Manager (CM), Similar to the IB-CM, but only used on + iWARP devices. + + rdma_cap_ib_sa + --------------- + Subnet Administration (SA) is the database built by SM in an + infiniband fabric. + + rdma_cap_ib_mcast + --------------- + InfiniBand (and OPA) use a different multicast mechanism rather than + traditional IP multicast found on Ethernet devices. If this is true, then + traditional IPv4/IPv6 multicast is handled by the IPoIB layer and direct + multicast joins and leaves are handled per the InfiniBand specifications. + + rdma_cap_read_multi_sge + --------------- + Certain devices (iWARP in particular) have restrictions on the number of + scatter gather elements that can be present in an RDMA READ work request, + this is true if the device does not have that restriction. + + rdma_cap_af_ib + --------------- + Many code paths for traditional InfiniBand and RoCE links are the same, + but need minor differences to accommodate the different addresses on the + two types of connections. This helper is true when the address of the + specific connection is of the InfiniBand native variety. + + rdma_cap_eth_ah + --------------- + Queue Pair is InfiniBand transport, but uses Ethernet address instead + of native InfiniBand address (aka, this is a RoCE QP, and that means + ethertype 0x8915 + GRH for RoCEv1 and IP/UDP to well known UDP port for + RoCEv2), this is true when the address family of the specific queue pair + is of the Ethernet (RoCE) variety.