From patchwork Tue Jul 31 16:04:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Netes X-Patchwork-Id: 1260921 X-Patchwork-Delegate: alexne@voltaire.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id D3948DF26F for ; Tue, 31 Jul 2012 16:09:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755434Ab2GaQJE (ORCPT ); Tue, 31 Jul 2012 12:09:04 -0400 Received: from mail-vc0-f174.google.com ([209.85.220.174]:39764 "EHLO mail-vc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755453Ab2GaQJD (ORCPT ); Tue, 31 Jul 2012 12:09:03 -0400 Received: by vcbfk26 with SMTP id fk26so5978255vcb.19 for ; Tue, 31 Jul 2012 09:09:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=AIxLCk0yDUVw6sZcZvwVjBi+mwYMz5AjnaDEwY74J4I=; b=fioW3wAtjdR6I233I7YmQQvmVZItOKeDSLwtpuVAxzlnjvVrWik6atA2TYlzO/cuta TYL8Vd34guWGILppp+3b9POQhcU+zCOTmXBEJ6Ysc7lrGQEpd/a7oJdv0Lzx6laBg3wt H+2PGEYBpTpUKLtjHvFFyIrvGWwr9SGjTOnt9/aQCrVvBklvnLllb1yTUQgasUeQ+j+Q C0JP++jX7BV4IsNdHDJeDBRyr1tDVk1IVL3vFrTrOcmnh3b7dzLk28HjDPjYMSVSJzTg x+DoUVxVYKwF9naLyBl391VNmpfQFfdy6D2Ru5iFAiYDdPeI40tyTJP92M1jgka7B7cZ AjaQ== Received: by 10.221.1.5 with SMTP id no5mr14431317vcb.67.1343750942948; Tue, 31 Jul 2012 09:09:02 -0700 (PDT) Received: from localhost ([193.47.165.251]) by mx.google.com with ESMTPS id cz2sm431686vdb.3.2012.07.31.09.09.01 (version=SSLv3 cipher=OTHER); Tue, 31 Jul 2012 09:09:02 -0700 (PDT) From: Alex Netes To: linux-rdma@vger.kernel.org Cc: Alex Netes Subject: [PATCH 13/27] Fix pre-creation of MC group with MGID containing P_Key Date: Tue, 31 Jul 2012 19:04:41 +0300 Message-Id: <1343750695-28063-13-git-send-email-alexne@mellanox.com> X-Mailer: git-send-email 1.7.11.2 In-Reply-To: <1343750695-28063-1-git-send-email-alexne@mellanox.com> References: <1343750695-28063-1-git-send-email-alexne@mellanox.com> X-Gm-Message-State: ALoCoQk2CrrxXTs+G8FMAF46fAzulioo/RRttjIkhFBnqY8INMRha1JyofUv2MqyG1+7rIbfl7hv Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org IPoIB MGID can contain only full P_Key. Signed-off-by: Alex Netes --- opensm/osm_prtn_config.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/opensm/osm_prtn_config.c b/opensm/osm_prtn_config.c index 750cbe0..8714eba 100644 --- a/opensm/osm_prtn_config.c +++ b/opensm/osm_prtn_config.c @@ -129,8 +129,10 @@ static inline boolean_t ip_mgroup_pkey_ok(struct part_conf *conf, char gid_str[INET6_ADDRSTRLEN]; if (mgid_is_broadcast(&group->mgid) - || mpkey == 0x0000 /* user requested "wild card" of pkey */ - || mpkey == conf->p_prtn->pkey) /* user was smart enough to match */ + /* user requested "wild card" of pkey */ + || mpkey == 0x0000 + /* user was smart enough to match */ + || mpkey == (conf->p_prtn->pkey | cl_hton16(0x8000))) return (TRUE); OSM_LOG(conf->p_log, OSM_LOG_ERROR,