From patchwork Wed Sep 4 03:47:05 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: 2853481 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D9A7BC0AB5 for ; Wed, 4 Sep 2013 03:56:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 02486202D1 for ; Wed, 4 Sep 2013 03:56:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DCEC8202B3 for ; Wed, 4 Sep 2013 03:56:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754319Ab3IDD4i (ORCPT ); Tue, 3 Sep 2013 23:56:38 -0400 Received: from rcdn-iport-1.cisco.com ([173.37.86.72]:64276 "EHLO rcdn-iport-1.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752626Ab3IDD4h convert rfc822-to-8bit (ORCPT ); Tue, 3 Sep 2013 23:56:37 -0400 X-Greylist: delayed 573 seconds by postgrey-1.27 at vger.kernel.org; Tue, 03 Sep 2013 23:56:37 EDT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2493; q=dns/txt; s=iport; t=1378266997; x=1379476597; h=from:to:cc:subject:date:message-id:content-id: content-transfer-encoding:mime-version; bh=3dPUMGvyRMy/8EiHx+s+EibJi6osVKgwYlXW/EJUloE=; b=CQ/JpTlFlLdSNh6dGd0/6M9gPWbc+/ClFnYVgCWadpWZae753bAYpqDc eniOAsqSw1JOtfJWW7mvfIQS4rZnhYEMxzyThk9p1qzkr84FKZ9c3Jucw KnS91AZljoK62q+mhm4jov3kFPldc8mAs0Unj+9nCPOXybiIiEvPk2kcm c=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArwFAImsJlKtJXG//2dsb2JhbABbgweBBsE9gSsWbQeCJgEEJxM/EgEqFEInBA4FCId6uU6PRTGDJIEAA6lbgyCCKg X-IronPort-AV: E=Sophos;i="4.89,1017,1367971200"; d="scan'208";a="255051691" Received: from rcdn-core2-4.cisco.com ([173.37.113.191]) by rcdn-iport-1.cisco.com with ESMTP; 04 Sep 2013 03:47:07 +0000 Received: from xhc-rcd-x06.cisco.com (xhc-rcd-x06.cisco.com [173.37.183.80]) by rcdn-core2-4.cisco.com (8.14.5/8.14.5) with ESMTP id r843l746029671 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 4 Sep 2013 03:47:07 GMT Received: from xmb-rcd-x09.cisco.com ([169.254.9.162]) by xhc-rcd-x06.cisco.com ([173.37.183.80]) with mapi id 14.02.0318.004; Tue, 3 Sep 2013 22:47:06 -0500 From: "Upinder Malhi (umalhi)" To: "roland@purestorage.com" CC: "linux-rdma@vger.kernel.org" , "Jeff Squyres (jsquyres)" Subject: [RFC][PATCH 1/4] IB/core: Cisco VIC - usNIC rdma node and transport Thread-Topic: [RFC][PATCH 1/4] IB/core: Cisco VIC - usNIC rdma node and transport Thread-Index: AQHOqSFs/gwaqqZTuUm7OVBp1QkcIw== Date: Wed, 4 Sep 2013 03:47:05 +0000 Message-ID: <47A33601BBFF7E4B8F0D5D0C96F3022C013BC786@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.14.133] Content-ID: <58B7CF7A5E4FC942B5976C43E635863D@emea.cisco.com> 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=-9.2 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.7.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