From patchwork Thu Jan 16 01:02:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Upinder Malhi (umalhi)" X-Patchwork-Id: 3496041 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 A1FF2C02DD for ; Thu, 16 Jan 2014 01:02:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DC68020172 for ; Thu, 16 Jan 2014 01:02:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0CB6320170 for ; Thu, 16 Jan 2014 01:02:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752343AbaAPBCk (ORCPT ); Wed, 15 Jan 2014 20:02:40 -0500 Received: from mtv-iport-3.cisco.com ([173.36.130.14]:37503 "EHLO mtv-iport-3.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752349AbaAPBCj (ORCPT ); Wed, 15 Jan 2014 20:02:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1907; q=dns/txt; s=iport; t=1389834159; x=1391043759; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=5i0n4r1iRlus7bvXul9ZVz4tVTJiDfIdeT/iX43QGZo=; b=EO31b5Zni3SMi6/mWhPD7xZ281CAba8S6wKfSByvv5YBUya4+nmpJEp6 b2DYPO8/yaVvy/KRh9vcCy+aQl+l0dKOpszYLKApEwkuqr+Tkv+zEOqct KpkEskNMsYgfBCwt4nLevWOQk+iyuj2wpbOcKQITZHoJLYxytRDw7C7wb s=; X-IronPort-AV: E=Sophos;i="4.95,665,1384300800"; d="scan'208";a="100532507" Received: from mtv-core-1.cisco.com ([171.68.58.6]) by mtv-iport-3.cisco.com with ESMTP; 16 Jan 2014 01:02:38 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by mtv-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id s0G12cXD003904; Thu, 16 Jan 2014 01:02:38 GMT Received: by cisco.com (Postfix, from userid 246720) id 964203FAA47B; Wed, 15 Jan 2014 17:02:38 -0800 (PST) From: Upinder Malhi To: linux-rdma@vger.kernel.org, roland@kernel.org Cc: Upinder Malhi Subject: [PATCH for-next 1/2] IB/core: Add support for RDMA_NODE_USNIC_UDP Date: Wed, 15 Jan 2014 17:02:36 -0800 Message-Id: <1389834157-16635-2-git-send-email-umalhi@cisco.com> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1389834157-16635-1-git-send-email-umalhi@cisco.com> References: <1389834157-16635-1-git-send-email-umalhi@cisco.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-14.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY, USER_IN_DEF_DKIM_WL 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 Add the complementary RDMA_NODE_USNIC_UDP for RDMA_TRANSPORT_USNIC_UDP. Signed-off-by: Upinder Malhi --- drivers/infiniband/core/sysfs.c | 1 + drivers/infiniband/core/verbs.c | 2 ++ include/rdma/ib_verbs.h | 1 + 3 files changed, 4 insertions(+) diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c index faad2ca..7d3292c 100644 --- a/drivers/infiniband/core/sysfs.c +++ b/drivers/infiniband/core/sysfs.c @@ -613,6 +613,7 @@ static ssize_t show_node_type(struct device *device, 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_USNIC_UDP: return sprintf(buf, "%d: usNIC UDP\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 c1cfeda..3ac7951 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -118,6 +118,8 @@ rdma_node_get_transport(enum rdma_node_type node_type) case RDMA_NODE_RNIC: return RDMA_TRANSPORT_IWARP; case RDMA_NODE_USNIC: + return RDMA_TRANSPORT_USNIC; + case RDMA_NODE_USNIC_UDP: return RDMA_TRANSPORT_USNIC_UDP; default: BUG(); diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index dbf6a3c..8d4a1c0 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -70,6 +70,7 @@ enum rdma_node_type { RDMA_NODE_IB_ROUTER, RDMA_NODE_RNIC, RDMA_NODE_USNIC, + RDMA_NODE_USNIC_UDP, }; enum rdma_transport_type {