From patchwork Fri Jan 11 19:33:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 1967161 X-Patchwork-Delegate: alexne@voltaire.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 9E1643FE37 for ; Fri, 11 Jan 2013 19:33:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754036Ab3AKTda (ORCPT ); Fri, 11 Jan 2013 14:33:30 -0500 Received: from mail-qa0-f53.google.com ([209.85.216.53]:46642 "EHLO mail-qa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753347Ab3AKTda (ORCPT ); Fri, 11 Jan 2013 14:33:30 -0500 Received: by mail-qa0-f53.google.com with SMTP id a19so101514qad.19 for ; Fri, 11 Jan 2013 11:33:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:content-type:content-transfer-encoding:x-gm-message-state; bh=5LRRCjtPXNi2/TyZSYMTElvFtzQnfnxlLHRdqMvvxzE=; b=NeGivOiHnwcQExK+sQ5rv1vyzAa5VHi+LqWEwoVRFLzaS8Jze0JXWSpdkPxZIEuOT4 Iy2FVnH94GtLodisytEOJmIevw0QCvzTi8Vxqx21VXTQWdQUPWrBvtRrlMaMgF5r7Tz0 PFZjsmNLrE/9+FvIaWzLAvQWO3y/zP07cvAnHBmCDr98Q8HBT0accidg/A+/nNBdYYzo 6IADqAFYl6mAHiLnVEiIYA7yh3hPJoUXKGcPjJ057FOoRN8fO/+9HFWgcuEnsV8F9Z9s rF7KXURpldbcNTbWGFk8+8zRvfd8FO2tuQ4fj8wFJ1UHDNPD5YrWXp+p4zX2ZFKVwq2a EwlA== X-Received: by 10.224.31.196 with SMTP id z4mr62043371qac.20.1357932809740; Fri, 11 Jan 2013 11:33:29 -0800 (PST) Received: from [192.168.1.102] (c-71-234-225-85.hsd1.ct.comcast.net. [71.234.225.85]) by mx.google.com with ESMTPS id i15sm4270202qah.21.2013.01.11.11.33.28 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Jan 2013 11:33:28 -0800 (PST) Message-ID: <50F06924.8070005@dev.mellanox.co.il> Date: Fri, 11 Jan 2013 14:33:56 -0500 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: Alex Netes CC: "linux-rdma (linux-rdma@vger.kernel.org)" Subject: [PATCH][MINOR] opensm/osm_sa_mcmember_record.c: Return proper scope for query with valid SA key X-Gm-Message-State: ALoCoQmMEbCoTzT4ItwF91iH/+JmDkz4+rHe/PngsYjWKQdpzhmycBB0//sdaaoKY+EJ6RmOOuQR Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Rather than return Scope 2, Scope 0 is returned when SA MCMemberRecord queried with valid SA key. saquery MCMR --mlid 0xc000 MCMember Record dump: MGID....................ff12:401b:ffff::ffff:ffff PortGid.................:: qkey....................0xb1b mlid....................0xc000 mtu.....................0x84 TClass..................0x0 pkey....................0xffff rate....................0x83 pkt_life................0x92 SL......................0x0 FlowLabel...............0x0 HopLimit................0x0 Scope...................0x2 JoinState...............0x0 ProxyJoin...............0x0 saquery MCMR --mlid 0xc000 --smkey 1 MCMember Record dump: MGID....................ff12:401b:ffff::ffff:ffff PortGid.................fe80::8:f104:39a:169 qkey....................0xb1b mlid....................0xc000 mtu.....................0x84 TClass..................0x0 pkey....................0xffff rate....................0x83 pkt_life................0x92 SL......................0x0 FlowLabel...............0x0 HopLimit................0x0 Scope...................0x0 JoinState...............0x1 ProxyJoin...............0x0 Signed-off-by: Hal Rosenstock --- -- 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_sa_mcmember_record.c b/opensm/osm_sa_mcmember_record.c index 4a5113a..96c1139 100644 --- a/opensm/osm_sa_mcmember_record.c +++ b/opensm/osm_sa_mcmember_record.c @@ -97,6 +97,7 @@ static void copy_from_create_mc_rec(IN ib_member_rec_t * dest, dest->tclass = src->tclass; dest->pkey = src->pkey; dest->sl_flow_hop = src->sl_flow_hop; + dest->scope_state = src->scope_state; dest->mtu = src->mtu; dest->rate = src->rate; dest->pkt_life = src->pkt_life;