From patchwork Wed Jul 2 06:11:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hefty, Sean" X-Patchwork-Id: 4463611 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 57DA99F26C for ; Wed, 2 Jul 2014 06:12:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7810020211 for ; Wed, 2 Jul 2014 06:12:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8088D2021A for ; Wed, 2 Jul 2014 06:12:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752048AbaGBGME (ORCPT ); Wed, 2 Jul 2014 02:12:04 -0400 Received: from mga01.intel.com ([192.55.52.88]:11007 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752584AbaGBGMC (ORCPT ); Wed, 2 Jul 2014 02:12:02 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 01 Jul 2014 23:11:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,586,1400050800"; d="scan'208";a="563985217" Received: from cst-linux.jf.intel.com ([10.23.221.72]) by fmsmga002.fm.intel.com with ESMTP; 01 Jul 2014 23:11:36 -0700 From: sean.hefty@intel.com To: linux-rdma@vger.kernel.org Cc: Sean Hefty Subject: [PATCH 3/8] build: Add build support for XRC Date: Tue, 1 Jul 2014 23:11:14 -0700 Message-Id: <1404281479-6755-4-git-send-email-sean.hefty@intel.com> X-Mailer: git-send-email 1.7.3 In-Reply-To: <1404281479-6755-1-git-send-email-sean.hefty@intel.com> References: <1404281479-6755-1-git-send-email-sean.hefty@intel.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=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 From: Sean Hefty Modify autotools to check for and require a libibverbs version that includes XRC and extension support. Remove any code used to support older versions of libibverbs. Signed-off-by: Sean Hefty --- configure.ac | 8 ++------ src/cma.h | 42 +----------------------------------------- 2 files changed, 3 insertions(+), 47 deletions(-) diff --git a/configure.ac b/configure.ac index 7581df4..0b8d6ec 100644 --- a/configure.ac +++ b/configure.ac @@ -40,14 +40,10 @@ dnl Checks for libraries AC_CHECK_LIB(pthread, pthread_mutex_init, [], AC_MSG_ERROR([pthread_mutex_init() not found. librdmacm requires libpthread.])) if test "$disable_libcheck" != "yes"; then -AC_CHECK_LIB(ibverbs, ibv_get_device_list, [], - AC_MSG_ERROR([ibv_get_device_list() not found. librdmacm requires libibverbs.])) +AC_CHECK_LIB(ibverbs, ibv_cmd_open_xrcd, [], + AC_MSG_ERROR([ibv_cmd_open_xrcd() not found. librdmacm requires libibverbs 1.1.8 or later.])) fi -AC_CHECK_MEMBER(struct ibv_path_record.service_id, [], - AC_DEFINE(DEFINE_PATH_RECORD, 1, [adding path record definition]), - [#include ]) - dnl Check for gcc atomic intrinsics AC_MSG_CHECKING(compiler support for atomics) AC_LINK_IFELSE([AC_LANG_PROGRAM([[int i = 0;]], diff --git a/src/cma.h b/src/cma.h index a7bab0f..98eba8d 100644 --- a/src/cma.h +++ b/src/cma.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005-2012 Intel Corporation. All rights reserved. + * Copyright (c) 2005-2014 Intel Corporation. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -167,46 +167,6 @@ void ucma_ib_init(); void ucma_ib_cleanup(); void ucma_ib_resolve(struct rdma_addrinfo **rai, struct rdma_addrinfo *hints); -/* Define path record definition if using older version of libibverbs */ -#ifdef DEFINE_PATH_RECORD -#define IBV_PATH_RECORD_REVERSIBLE 0x80 - -struct ibv_path_record -{ - uint64_t service_id; - union ibv_gid dgid; - union ibv_gid sgid; - uint16_t dlid; - uint16_t slid; - uint32_t flowlabel_hoplimit; /* resv-31:28 flow label-27:8 hop limit-7:0*/ - uint8_t tclass; - uint8_t reversible_numpath; /* reversible-7:7 num path-6:0 */ - uint16_t pkey; - uint16_t qosclass_sl; /* qos class-15:4 sl-3:0 */ - uint8_t mtu; /* mtu selector-7:6 mtu-5:0 */ - uint8_t rate; /* rate selector-7:6 rate-5:0 */ - uint8_t packetlifetime; /* lifetime selector-7:6 lifetime-5:0 */ - uint8_t preference; - uint8_t reserved[6]; -}; - -#define IBV_PATH_FLAG_GMP (1<<0) -#define IBV_PATH_FLAG_PRIMARY (1<<1) -#define IBV_PATH_FLAG_ALTERNATE (1<<2) -#define IBV_PATH_FLAG_OUTBOUND (1<<3) -#define IBV_PATH_FLAG_INBOUND (1<<4) -#define IBV_PATH_FLAG_INBOUND_REVERSE (1<<5) -#define IBV_PATH_FLAG_BIDIRECTIONAL (IBV_PATH_FLAG_OUTBOUND | \ - IBV_PATH_FLAG_INBOUND_REVERSE) - -struct ibv_path_data -{ - uint32_t flags; - uint32_t reserved; - struct ibv_path_record path; -}; -#endif - struct ib_connect_hdr { uint8_t cma_version; uint8_t ip_version; /* IP version: 7:4 */