From patchwork Thu Sep 5 14:18:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 2854146 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 41BA49F557 for ; Thu, 5 Sep 2013 14:18:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1B1E120424 for ; Thu, 5 Sep 2013 14:18:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B927220415 for ; Thu, 5 Sep 2013 14:18:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752629Ab3IEOSm (ORCPT ); Thu, 5 Sep 2013 10:18:42 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:52908 "EHLO mail-bk0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752378Ab3IEOSl (ORCPT ); Thu, 5 Sep 2013 10:18:41 -0400 Received: by mail-bk0-f44.google.com with SMTP id mz10so792665bkb.31 for ; Thu, 05 Sep 2013 07:18:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:content-type:content-transfer-encoding; bh=Zo0ei4CTD5rOIvLJb2rU1Zm2EYkJrfZmB5w2GRudY6I=; b=DnAxnFRVA5/5rVOFd7m7Sw2UB5sNKjOy40aI2VJqP3z1a/rpOwGW8eY6ZO6j17pS4U 1vjWsyiE5b6izv0RG/y+3gRZW7V2ZUAw9fH/KfVviJ5Is8AX2+QhsWNpzIRLz9Okb6qx GZp0Akr2o8sb2D9bPn55hn3eEiOFmA1sNAsq20aJsNvwfO1psXJaGOii6MRiTC39NNQg ksanruaWLw+Z/4CG6V52TucGPppWN7zxPLKbY0p64tbHStC9ETo37trlc2/PdT9Y1iLS BO/cCoAHrwruKQcE9HKluNZT9rvPkSbxHepLkYSgv8ebDrI7Dc2mOkat8ZJUJ1YW0vmR d8lg== X-Gm-Message-State: ALoCoQktKKA21ZIMl3I/R3HVms8mbW1kdzrpKZVBfMHRyWORIPwZ0g6Zz5PWdsMvgArMcNz+ZmYD X-Received: by 10.205.22.71 with SMTP id qv7mr7452862bkb.20.1378390720221; Thu, 05 Sep 2013 07:18:40 -0700 (PDT) Received: from [192.168.1.102] (c-98-229-118-119.hsd1.ma.comcast.net. [98.229.118.119]) by mx.google.com with ESMTPSA id qx2sm8097216bkb.16.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Sep 2013 07:18:39 -0700 (PDT) Message-ID: <522892BE.7070002@dev.mellanox.co.il> Date: Thu, 05 Sep 2013 10:18:38 -0400 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: Line Holen CC: "linux-rdma (linux-rdma@vger.kernel.org)" Subject: [PATCH opensm] osm_sa_guidinfo_record.c: False duplicate GUID error messages 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.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 If the same request is received twice then the second one will cause error messages indicating duplicate alias GUIDs. In this case this is a false warning. The second request should be treated as a void and return success to the requester. Signed-off-by: Line Holen 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_guidinfo_record.c b/opensm/osm_sa_guidinfo_record.c index 8323b38..28f6c0f 100644 --- a/opensm/osm_sa_guidinfo_record.c +++ b/opensm/osm_sa_guidinfo_record.c @@ -653,15 +653,21 @@ add_alias_guid: p_alias_guid->alias_guid, &p_alias_guid->map_item); if (p_alias_guid_check != p_alias_guid) { - /* alias GUID is a duplicate */ - OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 5108: " - "Duplicate alias port GUID 0x%" PRIx64 - " index %d base port GUID 0x%" PRIx64 "\n", - cl_ntoh64(p_alias_guid->alias_guid), i, - cl_ntoh64(p_alias_guid->p_base_port->guid)); - osm_alias_guid_delete(&p_alias_guid); - /* clear response guid at index to indicate duplicate */ - p_rcvd_rec->guid_info.guid[i % 8] = 0; + /* alias GUID is a duplicate if it exists on another port or on the same port but at another index */ + if (p_alias_guid_check->p_base_port != p_port || + (*p_port->p_physp->p_guids)[i] != set_alias_guid) { + OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 5108: " + "Duplicate alias port GUID 0x%" PRIx64 + " index %d base port GUID 0x%" PRIx64 + ", alias GUID already assigned to " + "base port GUID 0x%" PRIx64 "\n", + cl_ntoh64(p_alias_guid->alias_guid), i, + cl_ntoh64(p_alias_guid->p_base_port->guid), + cl_ntoh64(p_alias_guid_check->p_base_port->guid)); + osm_alias_guid_delete(&p_alias_guid); + /* clear response guid at index to indicate duplicate */ + p_rcvd_rec->guid_info.guid[i % 8] = 0; + } } else { del_alias_guid = (*p_port->p_physp->p_guids)[i]; if (del_alias_guid) {