From patchwork Wed Sep 30 23:13:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hefty, Sean" X-Patchwork-Id: 50786 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8UNDPc2014699 for ; Wed, 30 Sep 2009 23:13:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754487AbZI3XNO (ORCPT ); Wed, 30 Sep 2009 19:13:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754548AbZI3XNO (ORCPT ); Wed, 30 Sep 2009 19:13:14 -0400 Received: from mga11.intel.com ([192.55.52.93]:63381 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754487AbZI3XNN (ORCPT ); Wed, 30 Sep 2009 19:13:13 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 30 Sep 2009 16:00:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.44,482,1249282800"; d="scan'208";a="498637122" Received: from mshefty-mobl2.amr.corp.intel.com (HELO msheftyMOBL2) ([10.24.91.232]) by fmsmga002.fm.intel.com with ESMTP; 30 Sep 2009 16:05:01 -0700 From: "Sean Hefty" To: "Hefty, Sean" , "linux-rdma" , "Davis, Arlin R" References: Subject: [PATCH 2/4] dapl/dtest: remove direct include of infiniband/verbs.h Date: Wed, 30 Sep 2009 16:13:04 -0700 Message-ID: MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcpCI1FOzr31gWWuRKua65YShGUa7wAABBhw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 In-Reply-To: Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org diff --git a/test/dtest/dtest.c b/test/dtest/dtest.c index 75cbe4c..22999f7 100755 --- a/test/dtest/dtest.c +++ b/test/dtest/dtest.c @@ -100,7 +100,6 @@ #define MAX_PROCS 1000 /* Header files needed for DAT/uDAPL */ -#include "infiniband/verbs.h" #include "dat2/udat.h" /* definitions */ @@ -219,7 +218,7 @@ union dcm_addr { uint8_t port_num; uint16_t lid; uint32_t qpn; - union ibv_gid gid; + uint8_t gid[16]; } ib; }; @@ -447,15 +446,12 @@ int main(int argc, char **argv) (void*)ia_attr.ia_address_ptr, sizeof(DAT_SOCK_ADDR6)); - if (local.ib.qp_type == IBV_QPT_UD) { - ucm = 1; - printf("%d Local uCM Address = QPN=0x%x, LID=0x%x\n", - getpid(), ntohl(local.ib.qpn), - ntohs(local.ib.lid)); - printf("%d Remote uCM Address = QPN=0x%x, LID=0x%x\n", - getpid(), ntohl(remote.ib.qpn), - ntohs(remote.ib.lid)); - } + printf("%d Local Address %s port %d\n", getpid(), + inet_ntoa(((struct sockaddr_in *) &local)->sin_addr), + ((struct sockaddr_in *) &local)->sin_port); + printf("%d Local Address QPN=0x%x, LID=0x%x\n", + getpid(), ntohl(local.ib.qpn), + ntohs(local.ib.lid)); /* Create Protection Zone */ start = get_time(); diff --git a/test/dtest/dtestcm.c b/test/dtest/dtestcm.c index 5b0272a..427a25e 100644 --- a/test/dtest/dtestcm.c +++ b/test/dtest/dtestcm.c @@ -97,7 +97,6 @@ #define MAX_POLLING_CNT 50000 /* Header files needed for DAT/uDAPL */ -#include "infiniband/verbs.h" #include "dat2/udat.h" #include "dat2/dat_ib_extensions.h" @@ -109,7 +108,7 @@ union dcm_addr { uint8_t port_num; uint16_t lid; uint32_t qpn; - union ibv_gid gid; + uint8_t gid[16]; } ib; }; @@ -338,15 +337,12 @@ int main(int argc, char **argv) (void*)ia_attr.ia_address_ptr, sizeof(DAT_SOCK_ADDR6)); - if (local.ib.qp_type == IBV_QPT_UD) { - ucm = 1; - printf("%d Local uCM Address = QPN=0x%x, LID=0x%x\n", - getpid(), ntohl(local.ib.qpn), - ntohs(local.ib.lid)); - printf("%d Remote uCM Address = QPN=0x%x, LID=0x%x\n", - getpid(), ntohl(remote.ib.qpn), - ntohs(remote.ib.lid)); - } + printf("%d Local Address %s port %d\n", getpid(), + inet_ntoa(((struct sockaddr_in *) &local)->sin_addr), + ((struct sockaddr_in *) &local)->sin_port); + printf("%d Local Address QPN=0x%x, LID=0x%x\n", + getpid(), ntohl(local.ib.qpn), + ntohs(local.ib.lid)); /* Create Protection Zone */ start = get_time(); diff --git a/test/dtest/dtestx.c b/test/dtest/dtestx.c index 6e17b6d..f41ad66 100755 --- a/test/dtest/dtestx.c +++ b/test/dtest/dtestx.c @@ -65,7 +65,6 @@ #endif -#include "infiniband/verbs.h" #include "dat2/udat.h" #include "dat2/dat_ib_extensions.h" @@ -189,7 +188,7 @@ union dcm_addr { uint8_t port_num; uint16_t lid; uint32_t qpn; - union ibv_gid gid; + uint8_t gid[16]; } ib; }; @@ -444,23 +443,12 @@ int connect_ep(char *hostname) (void*)ia_attr.ia_address_ptr, sizeof(DAT_SOCK_ADDR6)); - if (local.ib.qp_type == IBV_QPT_UD) { - ucm = 1; - - if (ud_test) { - printf("%d UD test over UCM provider not supported\n", - getpid()); - exit(1); - } - - printf("%d Local uCM Address = QPN=0x%x, LID=0x%x\n", - getpid(), ntohl(local.ib.qpn), - ntohs(local.ib.lid)); - printf("%d Remote uCM Address = QPN=0x%x, LID=0x%x\n", - getpid(), ntohl(remote.ib.qpn), - ntohs(remote.ib.lid)); - } - + printf("%d Local Address %s port %d\n", getpid(), + inet_ntoa(((struct sockaddr_in *) &local)->sin_addr), + ((struct sockaddr_in *) &local)->sin_port); + printf("%d Local Address QPN=0x%x, LID=0x%x\n", + getpid(), ntohl(local.ib.qpn), + ntohs(local.ib.lid)); /* Print provider specific attributes */ for (i = 0; i < prov_attrs.num_provider_specific_attr; i++) {