From patchwork Tue Sep 10 03:36:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Upinder Malhi (umalhi)" X-Patchwork-Id: 2863861 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6A64E9F485 for ; Tue, 10 Sep 2013 03:37:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 53961202B3 for ; Tue, 10 Sep 2013 03:37:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5DBEE201EC for ; Tue, 10 Sep 2013 03:37:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754510Ab3IJDhE (ORCPT ); Mon, 9 Sep 2013 23:37:04 -0400 Received: from rcdn-iport-7.cisco.com ([173.37.86.78]:55646 "EHLO rcdn-iport-7.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754325Ab3IJDhA convert rfc822-to-8bit (ORCPT ); Mon, 9 Sep 2013 23:37:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2514; q=dns/txt; s=iport; t=1378784220; x=1379993820; h=from:to:cc:subject:date:message-id:content-id: content-transfer-encoding:mime-version; bh=PY33XAvdvZKp/pXtWYNodePLEJM0pAJxd1/zyJFAFHo=; b=kXdQUi8LvP+CJTM4pBDx1QF5LnpSHNgqP660eJ72ZjhKcA0dM8YpXDwG zTj/VieoGv7jO3c1gCGZzc8T/1a6mH+ZEW6fQE93KHyMSzf0oOOwBx4md 7i3y1EjoKx2aG1Ki073lQKW3gy77NAmslu78mGn27yRKvKQiTfxgidVeA M=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsoFAE2SLlKtJV2a/2dsb2JhbABbgweBCcIrgSoWbQeCJwEEJxM/EgEqFEInBA4FCId6wn2POjGDJIEAA6lbgyCCKg X-IronPort-AV: E=Sophos;i="4.90,875,1371081600"; d="scan'208";a="257600205" Received: from rcdn-core-3.cisco.com ([173.37.93.154]) by rcdn-iport-7.cisco.com with ESMTP; 10 Sep 2013 03:37:00 +0000 Received: from xhc-aln-x01.cisco.com (xhc-aln-x01.cisco.com [173.36.12.75]) by rcdn-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id r8A3ax8I020027 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 10 Sep 2013 03:36:59 GMT Received: from xmb-rcd-x09.cisco.com ([169.254.9.162]) by xhc-aln-x01.cisco.com ([173.36.12.75]) with mapi id 14.02.0318.004; Mon, 9 Sep 2013 22:36:59 -0500 From: "Upinder Malhi (umalhi)" To: "roland@purestorage.com" CC: "linux-rdma@vger.kernel.org" , "Jeff Squyres (jsquyres)" Subject: [PATCH V2 1/4] IB/core: Cisco VIC - usNIC rdma node and transport Thread-Topic: [PATCH V2 1/4] IB/core: Cisco VIC - usNIC rdma node and transport Thread-Index: AQHOrdcBkBZcEVKkwUeVeG38HsfovQ== Date: Tue, 10 Sep 2013 03:36:59 +0000 Message-ID: <47A33601BBFF7E4B8F0D5D0C96F3022C013CF304@xmb-rcd-x09.cisco.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.89.15.35] Content-ID: MIME-Version: 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=-7.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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 patch adds new rdma node and new rdma transport, and supporting code used by Cisco's low latency driver called usNIC. usNIC uses its own transport, distinct from IB and iWARP. Signed-off-by: Upinder Malhi Signed-off-by: Jeff Squyres --- drivers/infiniband/core/sysfs.c | 1 + drivers/infiniband/core/verbs.c | 3 +++ include/rdma/ib_verbs.h | 6 ++++-- 3 files changed, 8 insertions(+), 2 deletions(-) -- 1.8.1 -- 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/core/sysfs.c b/drivers/infiniband/core/sysfs.c index cde1e7b..faad2ca 100644 --- a/drivers/infiniband/core/sysfs.c +++ b/drivers/infiniband/core/sysfs.c @@ -612,6 +612,7 @@ static ssize_t show_node_type(struct device *device, switch (dev->node_type) { case RDMA_NODE_IB_CA: return sprintf(buf, "%d: CA\n", dev->node_type); case RDMA_NODE_RNIC: return sprintf(buf, "%d: RNIC\n", dev->node_type); + case RDMA_NODE_USNIC: return sprintf(buf, "%d: usNIC\n", dev->node_type); case RDMA_NODE_IB_SWITCH: return sprintf(buf, "%d: switch\n", dev->node_type); case RDMA_NODE_IB_ROUTER: return sprintf(buf, "%d: router\n", dev->node_type); default: return sprintf(buf, "%d: \n", dev->node_type); diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index 22192de..84cef2e 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -114,6 +114,8 @@ rdma_node_get_transport(enum rdma_node_type node_type) return RDMA_TRANSPORT_IB; case RDMA_NODE_RNIC: return RDMA_TRANSPORT_IWARP; + case RDMA_NODE_USNIC: + return RDMA_TRANSPORT_USNIC; default: BUG(); return 0; @@ -130,6 +132,7 @@ enum rdma_link_layer rdma_port_get_link_layer(struct ib_device *device, u8 port_ case RDMA_TRANSPORT_IB: return IB_LINK_LAYER_INFINIBAND; case RDMA_TRANSPORT_IWARP: + case RDMA_TRANSPORT_USNIC: return IB_LINK_LAYER_ETHERNET; default: return IB_LINK_LAYER_UNSPECIFIED; diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 645c3ce..880d83d 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -67,12 +67,14 @@ enum rdma_node_type { RDMA_NODE_IB_CA = 1, RDMA_NODE_IB_SWITCH, RDMA_NODE_IB_ROUTER, - RDMA_NODE_RNIC + RDMA_NODE_RNIC, + RDMA_NODE_USNIC, }; enum rdma_transport_type { RDMA_TRANSPORT_IB, - RDMA_TRANSPORT_IWARP + RDMA_TRANSPORT_IWARP, + RDMA_TRANSPORT_USNIC }; enum rdma_transport_type