From patchwork Mon Dec 7 10:26:20 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yevgeny Kliteynik X-Patchwork-Id: 65486 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 nB7AJ3Wc026097 for ; Mon, 7 Dec 2009 10:19:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935002AbZLGKSb (ORCPT ); Mon, 7 Dec 2009 05:18:31 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934916AbZLGKSb (ORCPT ); Mon, 7 Dec 2009 05:18:31 -0500 Received: from mail.mellanox.co.il ([194.90.237.43]:48101 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935002AbZLGKSY (ORCPT ); Mon, 7 Dec 2009 05:18:24 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from kliteyn@dev.mellanox.co.il) with SMTP; 7 Dec 2009 12:26:37 +0200 Received: from [10.4.1.29] ([10.4.1.29]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 7 Dec 2009 12:17:49 +0200 Message-ID: <4B1CD84C.3060902@dev.mellanox.co.il> Date: Mon, 07 Dec 2009 12:26:20 +0200 From: Yevgeny Kliteynik Reply-To: kliteyn@dev.mellanox.co.il User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: Sasha Khapyorsky CC: Linux RDMA Subject: [PATCH] opensm/osm_sa_mcmember_record.c: trivial optimization X-OriginalArrivalTime: 07 Dec 2009 10:17:49.0693 (UTC) FILETIME=[875C82D0:01CA7726] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17054.006 X-TM-AS-Result: No--5.611400-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org diff --git a/opensm/opensm/osm_sa_mcmember_record.c b/opensm/opensm/osm_sa_mcmember_record.c index a4d86e3..07aeb6c 100644 --- a/opensm/opensm/osm_sa_mcmember_record.c +++ b/opensm/opensm/osm_sa_mcmember_record.c @@ -1013,7 +1013,9 @@ static void mcmr_rcv_join_mgrp(IN osm_sa_t * sa, IN osm_madw_t * p_madw) goto Exit; } - if (!osm_physp_share_pkey(sa->p_log, p_physp, p_request_physp)) { + proxy = (p_physp != p_request_physp); + + if (proxy && !osm_physp_share_pkey(sa->p_log, p_physp, p_request_physp)) { CL_PLOCK_RELEASE(sa->p_lock); OSM_LOG(sa->p_log, OSM_LOG_VERBOSE, "Port and requester don't share pkey\n"); @@ -1021,8 +1023,6 @@ static void mcmr_rcv_join_mgrp(IN osm_sa_t * sa, IN osm_madw_t * p_madw) goto Exit; } - proxy = (p_physp != p_request_physp); - ib_member_get_scope_state(p_recvd_mcmember_rec->scope_state, NULL, &join_state);