From patchwork Wed Aug 14 10:26:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Line Holen X-Patchwork-Id: 2844313 X-Patchwork-Delegate: hal@mellanox.com 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 864209F2F4 for ; Wed, 14 Aug 2013 10:26:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6891120516 for ; Wed, 14 Aug 2013 10:26:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C472320517 for ; Wed, 14 Aug 2013 10:26:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759429Ab3HNK0s (ORCPT ); Wed, 14 Aug 2013 06:26:48 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:41026 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759175Ab3HNK0s convert rfc822-to-8bit (ORCPT ); Wed, 14 Aug 2013 06:26:48 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r7EAQieS030046 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 14 Aug 2013 10:26:45 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r7EAQgOH024755 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 14 Aug 2013 10:26:43 GMT Received: from abhmt107.oracle.com (abhmt107.oracle.com [141.146.116.59]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r7EAQgnq016773; Wed, 14 Aug 2013 10:26:42 GMT MIME-Version: 1.0 Message-ID: Date: Wed, 14 Aug 2013 03:26:42 -0700 (PDT) From: Line Holen To: Cc: Subject: [PATCH] osm_port_info_rcv.c Issue a log message if we cannot read the MKey of a port X-Mailer: Zimbra on Oracle Beehive Content-Disposition: inline X-Source-IP: ucsinet22.oracle.com [156.151.31.94] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Signed-off-by: Line Holen --- -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/opensm/osm_port_info_rcv.c b/opensm/osm_port_info_rcv.c index 7dcd15e..961b376 100644 --- a/opensm/osm_port_info_rcv.c +++ b/opensm/osm_port_info_rcv.c @@ -85,7 +85,7 @@ static void pi_rcv_process_endport(IN osm_sm_t * sm, IN osm_physp_t * p_physp, osm_madw_context_t context; ib_api_status_t status; ib_net64_t port_guid; - uint8_t rate, mtu; + uint8_t rate, mtu, mpb; unsigned data_vls; cl_qmap_t *p_sm_tbl; osm_remote_sm_t *p_sm; @@ -126,6 +126,14 @@ static void pi_rcv_process_endport(IN osm_sm_t * sm, IN osm_physp_t * p_physp, } } + /* Check M_Key vs M_Key protect, can we control the port ? */ + mpb = ib_port_info_get_mpb(p_pi); + if (mpb > 0 && p_pi->m_key == 0) { + OSM_LOG(sm->p_log, OSM_LOG_INFO, + "Port 0x%" PRIx64 " has unknown M_Key, protection level %u\n", + cl_ntoh64(port_guid), mpb); + } + if (port_guid != sm->p_subn->sm_port_guid) { p_sm_tbl = &sm->p_subn->sm_guid_tbl; if (p_pi->capability_mask & IB_PORT_CAP_IS_SM) {