From patchwork Wed Dec 23 13:25:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matan Barak X-Patchwork-Id: 7912481 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 0176D9F349 for ; Wed, 23 Dec 2015 13:25:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D4FB320461 for ; Wed, 23 Dec 2015 13:25:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9093D2045B for ; Wed, 23 Dec 2015 13:25:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753009AbbLWNZX (ORCPT ); Wed, 23 Dec 2015 08:25:23 -0500 Received: from mail-ob0-f177.google.com ([209.85.214.177]:35691 "EHLO mail-ob0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752681AbbLWNZX (ORCPT ); Wed, 23 Dec 2015 08:25:23 -0500 Received: by mail-ob0-f177.google.com with SMTP id 18so165405664obc.2 for ; Wed, 23 Dec 2015 05:25:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dev-mellanox-co-il.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=WN/brBfLPCvzU7MKfoTkNlNU33Sh/9pWLXxj6a4USaI=; b=G4Ev6G6MedGub3BXFsMths3WEbOUt68A45Bcxg4GWVYum6NZZmRqLVRflP7qgdaqm3 modpougCm2Qn1bMXjvhsyhcqfcvKxNmdYxldwlE9x21PbK94dg/Bi8ETDWgIHBR7o7J/ dcYgBHTsfc4u2S3X4tnYg3vnrkpZ79y4Il8LqKPwC1B2kYeyAjDFVSkvTa/8BkIPtbWe Gh0Jk5BgRx0rzT5WRjqfy4fhYqRon7GA6+Ewc6gICcy6T1DyxlWH78cHytARCLg/hWNC dzbpCKWhDbPNjmNpen3Vqhi00VzeZ+vJWEzd0HKJ/3nRW/GF+xVVN6gBaizqbhi/DW87 cUnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=WN/brBfLPCvzU7MKfoTkNlNU33Sh/9pWLXxj6a4USaI=; b=jQKZfq82uJ0VaNx+Pg3LFNGVSaQmg61E15o8JJmLsy55e7/kIF1Jd42rxBgSwd3K4q E8eQqXOz2zOuydBbtFvitTe8QEVljOWLRUFWW/cqwHlBe+o3t2DXSQC3iO3xUVL7hv2C VkPx/fM1F2LaIOig1PiXq4Pe7VV1xSdg0iNMY9OWX+CeHXAgddrvXh4xLNRMNjxXiqZY ox1KSdTwaYvml/tPNV+HXfO6UQSZMAaL6DLylbmGQZqt1s0CLHtcodJpT9X048ui+gdY si5A9rAnRV4tO0VDxlBPFRncMmHPHMZkEKyZyUOu/yRC2/nOs+YwBbd2exCPgiOxyTNi 7UjQ== X-Gm-Message-State: ALoCoQmgnDDxn7dPvYD8e1RqT45gqEKkKxH3+I5NuEEWKwvfQyxzyWkO9t4/mZ5aGRQGuPrJnaS2l37hJG70F3SrRA143S1Org== MIME-Version: 1.0 X-Received: by 10.182.128.229 with SMTP id nr5mr14142945obb.85.1450877122554; Wed, 23 Dec 2015 05:25:22 -0800 (PST) Received: by 10.202.71.6 with HTTP; Wed, 23 Dec 2015 05:25:22 -0800 (PST) In-Reply-To: <1450875417-19262-1-git-send-email-matanb@mellanox.com> References: <1450875417-19262-1-git-send-email-matanb@mellanox.com> Date: Wed, 23 Dec 2015 15:25:22 +0200 Message-ID: Subject: Re: [PATCH for-next V3 00/11] Add RoCE v2 support From: Matan Barak To: Matan Barak Cc: Doug Ledford , linux-rdma , Eran Ben Elisha , Haggai Eran , Or Gerlitz , Jason Gunthorpe , Somnath Kotur , Majd Dibbiny 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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 On Wed, Dec 23, 2015 at 2:56 PM, Matan Barak wrote: > Hi Doug, > > This series adds the support for RoCE v2. In order to support RoCE v2, > we add gid_type attribute to every GID. When the RoCE GID management > populates the GID table, it duplicates each GID with all supported types. > This gives the user the ability to communicate over each supported > type. > > Patch 0001, 0002 and 0003 add support for multiple GID types to the > cache and related APIs. The third patch exposes the GID attributes > information is sysfs. > > Patch 0004 adds the RoCE v2 GID type and the capabilities required > from the vendor in order to implement RoCE v2. These capabilities > are grouped together as RDMA_CORE_PORT_IBA_ROCE_UDP_ENCAP. > > RoCE v2 could work at IPv4 and IPv6 networks. When receiving ib_wc, this > information should come from the vendor's driver. In case the vendor > doesn't supply this information, we parse the packet headers and resolve > its network type. Patch 0005 adds this information and required utilities. > > Patches 0006 and 0007 adds route validation. This is mandatory to ensure > that we send packets using GIDS which corresponds to a net-device that > can be routed to the destination. > > Patches 0008 and 0009 add configfs support (and the required > infrastructure) for CMA. The administrator should be able to set the > default RoCE type. This is done through a new per-port > default_roce_mode configfs file. > > Patch 0010 formats a QP1 packet in order to support RoCE v2 CM > packets. This is required for vendors which implement their > QP1 as a Raw QP. > > Patch 0011 adds support for IPv4 multicast as an IPv4 network > requires IGMP to be sent in order to join multicast groups. > > Vendors code aren't part of this patch-set. Soft-Roce will be > sent soon and depends on these patches. Other vendors, like > mlx4, ocrdma and mlx5 will follow. > > This patch is applied on the "Change per-entry locks in GID cache to > table lock" series which was sent to the mailing list. > > Thanks, > Matan > > Changes from V2: > - Rebase over Doug's k.o/for-4.5 > - Make INFINIBAND_ADDR_TRANS_CONFIGFS depends on CONFIGFS > > Changes from V1: > - Rebased against Linux 4.4-rc2 master branch. > - Add route validation > - ConfigFS - avoid compiling INFINIBAND=y and CONFIGFS_FS=m > - Add documentation for configfs and sysfs ABI > - Remove ifindex and gid_type from mcmember > > Changes from V0: > - Rebased patches against Doug's latest k.o/for-4.4 tree. > - Fixed a bug in configfs (rmdir caused an incorrect free). > > Matan Barak (8): > IB/core: Add gid_type to gid attribute > IB/cm: Use the source GID index type > IB/core: Add gid attributes to sysfs > IB/core: Add ROCE_UDP_ENCAP (RoCE V2) type > IB/core: Move rdma_is_upper_dev_rcu to header file > IB/core: Validate route in ib_init_ah_from_wc and > ib_init_ah_from_path > IB/rdma_cm: Add wrapper for cma reference count > IB/cma: Add configfs for rdma_cm > > Moni Shoua (2): > IB/core: Initialize UD header structure with IP and UDP headers > IB/cma: Join and leave multicast groups with IGMP > > Somnath Kotur (1): > IB/core: Add rdma_network_type to wc > > Documentation/ABI/testing/configfs-rdma_cm | 22 ++ > Documentation/ABI/testing/sysfs-class-infiniband | 16 + > drivers/infiniband/Kconfig | 9 + > drivers/infiniband/core/Makefile | 2 + > drivers/infiniband/core/addr.c | 185 +++++++++---- > drivers/infiniband/core/cache.c | 169 ++++++++--- > drivers/infiniband/core/cm.c | 31 ++- > drivers/infiniband/core/cma.c | 259 ++++++++++++++++-- > drivers/infiniband/core/cma_configfs.c | 322 ++++++++++++++++++++++ > drivers/infiniband/core/core_priv.h | 45 +++ > drivers/infiniband/core/device.c | 9 +- > drivers/infiniband/core/multicast.c | 17 +- > drivers/infiniband/core/roce_gid_mgmt.c | 81 ++++-- > drivers/infiniband/core/sa_query.c | 76 +++++- > drivers/infiniband/core/sysfs.c | 184 ++++++++++++- > drivers/infiniband/core/ud_header.c | 155 ++++++++++- > drivers/infiniband/core/uverbs_marshall.c | 1 + > drivers/infiniband/core/verbs.c | 170 ++++++++++-- > drivers/infiniband/hw/mlx4/qp.c | 7 +- > drivers/infiniband/hw/mthca/mthca_qp.c | 2 +- > drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 2 +- > include/rdma/ib_addr.h | 11 +- > include/rdma/ib_cache.h | 4 + > include/rdma/ib_pack.h | 45 +++- > include/rdma/ib_sa.h | 3 + > include/rdma/ib_verbs.h | 78 +++++- > 26 files changed, 1703 insertions(+), 202 deletions(-) > create mode 100644 Documentation/ABI/testing/configfs-rdma_cm > create mode 100644 Documentation/ABI/testing/sysfs-class-infiniband > create mode 100644 drivers/infiniband/core/cma_configfs.c > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html If you've merged the previous version (v2), please add the following fixups: commit 72bc2f5b46a4d0c194b66f6f90ce4a879363983d Author: Matan Barak Date: Mon Dec 14 14:24:14 2015 +0200 fixup! IB/cma: Add configfs for rdma_cm --- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig index f5312da..018685f 100644 --- a/drivers/infiniband/Kconfig +++ b/drivers/infiniband/Kconfig @@ -56,7 +56,7 @@ config INFINIBAND_ADDR_TRANS config INFINIBAND_ADDR_TRANS_CONFIGFS bool - depends on INFINIBAND_ADDR_TRANS && !(INFINIBAND=y && CONFIGFS_FS=m) + depends on INFINIBAND_ADDR_TRANS && CONFIGFS_FS && !(INFINIBAND=y && CONFIGFS_FS=m) default y ---help--- ConfigFS support for RDMA communication manager (CM). Author: Matan Barak Date: Thu Dec 10 19:34:32 2015 +0200 fixup! IB/core: Validate route in ib_init_ah_from_wc and ib_init_ah_from_path diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index 57eda11..0b5f245 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c @@ -326,7 +326,7 @@ static int addr_resolve_neigh(struct dst_entry *dst, return ret; } - /* If the device does ARP internally */ + /* If the device doesn't do ARP internally */ if (!(dst->dev->flags & IFF_NOARP)) { const struct sockaddr_in *dst_in4 = (const struct sockaddr_in *)dst_in; @@ -494,7 +494,7 @@ int rdma_resolve_ip_route(struct sockaddr *src_addr, const struct sockaddr *dst_addr, struct rdma_dev_addr *addr) { - struct sockaddr_storage ssrc_addr; + struct sockaddr_storage ssrc_addr = {}; struct sockaddr *src_in = (struct sockaddr *)&ssrc_addr; if (src_addr->sa_family != dst_addr->sa_family)