From patchwork Wed Apr 3 13:13:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Squyres X-Patchwork-Id: 2387341 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 89393DFB79 for ; Wed, 3 Apr 2013 13:22:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761509Ab3DCNWl (ORCPT ); Wed, 3 Apr 2013 09:22:41 -0400 Received: from mtv-iport-2.cisco.com ([173.36.130.13]:50592 "EHLO mtv-iport-2.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760987Ab3DCNWk (ORCPT ); Wed, 3 Apr 2013 09:22:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1655; q=dns/txt; s=iport; t=1364995360; x=1366204960; h=from:to:cc:subject:date:message-id; bh=kEYzE0UG4zwu00+Nc+qj5OzKq5uv5bZBHjc+pbNhvMw=; b=F6XkXw76/zxXwfcC3fBXf8Llz/GN+QwX6Sit9hqc/pojfgP8Li+pLLrR h00PSg0Qs87gPvcz2RNxJ8UsMW0Jqn7vwfy3f2IBf7Ylvk67jEE9oWqzN mP0cQXDlrckV7Fm9xU2TUzAk4O9b1y735rd+pa4aSZs7LHj3IZncmOPFb s=; X-IronPort-AV: E=Sophos;i="4.87,401,1363132800"; d="scan'208";a="77733025" Received: from mtv-core-3.cisco.com ([171.68.58.8]) by mtv-iport-2.cisco.com with ESMTP; 03 Apr 2013 13:13:17 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by mtv-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id r33DDHPe005225; Wed, 3 Apr 2013 13:13:17 GMT Received: by cisco.com (Postfix, from userid 182726) id 1566E3FAA580; Wed, 3 Apr 2013 06:13:17 -0700 (PDT) From: Jeff Squyres To: linux-rdma@vger.kernel.org Cc: umalhi@cisco.com, Jeff Squyres Subject: [PATCH 1/2] Add RDMA_*_USNIC enums for the Cisco Ethernet Virtual NIC. Date: Wed, 3 Apr 2013 06:13:15 -0700 Message-Id: <1364994796-10642-1-git-send-email-jsquyres@cisco.com> X-Mailer: git-send-email 1.8.1.1 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Per off-list conversation with Roland, add some new enums for the Cisco Ethernet Virtual NIC (it's not an RNIC/iWARP device, so it doesn't fit in the same category as RDMA_NODE_RNIC / RDMA_TRANSPORT_IWARP). "USNIC" = "Userspace NIC". --- drivers/infiniband/core/verbs.c | 3 +++ include/rdma/ib_verbs.h | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index a8fdd33..2a35518 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 98cc4b2..8a66758 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