From patchwork Fri Dec 12 16:50:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arlin Davis X-Patchwork-Id: 5484201 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 6762BBEEA8 for ; Fri, 12 Dec 2014 16:51:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9507620103 for ; Fri, 12 Dec 2014 16:51:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9BE7820122 for ; Fri, 12 Dec 2014 16:51:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030434AbaLLQv2 (ORCPT ); Fri, 12 Dec 2014 11:51:28 -0500 Received: from mga09.intel.com ([134.134.136.24]:5864 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030303AbaLLQv1 (ORCPT ); Fri, 12 Dec 2014 11:51:27 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 12 Dec 2014 08:49:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,565,1413270000"; d="scan'208";a="652947844" Received: from cst-linux.jf.intel.com ([10.23.221.72]) by orsmga002.jf.intel.com with ESMTP; 12 Dec 2014 08:50:50 -0800 From: arlin.r.davis@intel.com To: linux-rdma@vger.kernel.org Cc: Arlin Davis Subject: [PATCH 4/4] mpxyd/mcm: add provider specific attribute DAT_IB_PROXY_VERSION Date: Fri, 12 Dec 2014 08:50:43 -0800 Message-Id: <1418403043-2221-5-git-send-email-arlin.r.davis@intel.com> X-Mailer: git-send-email 1.7.3 In-Reply-To: <1418403043-2221-1-git-send-email-arlin.r.davis@intel.com> References: <1418403043-2221-1-git-send-email-arlin.r.davis@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: Arlin Davis Signed-off-by: Arlin Davis --- dapl/openib_common/util.c | 31 ++++++++++++++++++++----------- dapl/openib_mcm/dapl_ib_util.h | 1 + 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/dapl/openib_common/util.c b/dapl/openib_common/util.c index d253f6e..b924b64 100644 --- a/dapl/openib_common/util.c +++ b/dapl/openib_common/util.c @@ -425,10 +425,11 @@ DAT_RETURN dapls_ib_query_hca(IN DAPL_HCA * hca_ptr, hca_ptr->ib_trans.na.mode = "DIRECT"; hca_ptr->ib_trans.na.read = "FALSE"; - if (!hca_ptr->ib_trans.pr_attr.cpu_family && hca_ptr->ib_trans.scif_ep) { + if (!hca_ptr->ib_trans.pr_attr.cpu_family && hca_ptr->ib_trans.self.node) { dapli_mix_get_attr(&hca_ptr->ib_trans, &hca_ptr->ib_trans.pr_attr); sprintf(hca_ptr->ib_trans.fam_str, "%d", hca_ptr->ib_trans.pr_attr.cpu_family); sprintf(hca_ptr->ib_trans.mod_str, "%d", hca_ptr->ib_trans.pr_attr.cpu_model); + sprintf(hca_ptr->ib_trans.ver_str, "%d", DAT_MIX_VER); } #else hca_ptr->ib_trans.na.mode = "DIRECT"; @@ -725,14 +726,6 @@ DAT_NAMED_ATTR ib_attrs[] = { { "DAT_IB_PORT_STATUS", "UNKNOWN"} , -#ifdef _OPENIB_MCM_ - { - "DAT_IB_PROXY_CPU_FAMILY", "UNKNOWN"} - , - { - "DAT_IB_PROXY_CPU_MODEL", "UNKNOWN"} - , -#endif #ifdef DAT_EXTENSIONS { "DAT_EXTENSION_INTERFACE", "TRUE"} @@ -778,6 +771,17 @@ DAT_NAMED_ATTR ib_attrs[] = { DAT_ATTR_COUNTERS, "TRUE"} , #endif /* DAPL_COUNTERS */ +#ifdef _OPENIB_MCM_ + { + "DAT_IB_PROXY_CPU_FAMILY", "UNKNOWN"} + , + { + "DAT_IB_PROXY_CPU_MODEL", "UNKNOWN"} + , + { + "DAT_IB_PROXY_VERSION", "UNKNOWN"} + , +#endif #endif }; @@ -801,8 +805,13 @@ void dapls_query_provider_specific_attr(IN DAPL_IA * ia_ptr, ib_attrs[5].value = ia_ptr->hca_ptr->ib_trans.na.mtu; ib_attrs[6].value = ia_ptr->hca_ptr->ib_trans.na.port; #ifdef _OPENIB_MCM_ - ib_attrs[7].value = ia_ptr->hca_ptr->ib_trans.fam_str; - ib_attrs[8].value = ia_ptr->hca_ptr->ib_trans.mod_str; + if (ia_ptr->hca_ptr->ib_trans.self.node) { /* only on MIC */ + int i = attr_ptr->num_provider_specific_attr; + ib_attrs[i-3].value = ia_ptr->hca_ptr->ib_trans.fam_str; + ib_attrs[i-2].value = ia_ptr->hca_ptr->ib_trans.mod_str; + ib_attrs[i-1].value = ia_ptr->hca_ptr->ib_trans.ver_str; + } else + attr_ptr->num_provider_specific_attr -= 3; #endif } diff --git a/dapl/openib_mcm/dapl_ib_util.h b/dapl/openib_mcm/dapl_ib_util.h index dad8212..9d9d73c 100644 --- a/dapl/openib_mcm/dapl_ib_util.h +++ b/dapl/openib_mcm/dapl_ib_util.h @@ -150,6 +150,7 @@ typedef struct _ib_hca_transport char guid_str[32]; char fam_str[8]; char mod_str[8]; + char ver_str[8]; ib_named_attr_t na; dat_mix_prov_attr_t pr_attr; /* attributes from proxy */