From patchwork Tue Sep 3 11:30:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Line Holen X-Patchwork-Id: 2853185 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 973B3C0AB5 for ; Tue, 3 Sep 2013 11:30:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ED7C9200E9 for ; Tue, 3 Sep 2013 11:30:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A59C9200D4 for ; Tue, 3 Sep 2013 11:30:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756545Ab3ICLaW (ORCPT ); Tue, 3 Sep 2013 07:30:22 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:33054 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755920Ab3ICLaW convert rfc822-to-8bit (ORCPT ); Tue, 3 Sep 2013 07:30:22 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r83BUHD1001490 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 3 Sep 2013 11:30:19 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r83BUG5W029016 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 3 Sep 2013 11:30:16 GMT Received: from abhmt118.oracle.com (abhmt118.oracle.com [141.146.116.70]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r83BUG1A029008; Tue, 3 Sep 2013 11:30:16 GMT MIME-Version: 1.0 Message-ID: <6914cb0e-d864-4b06-abb6-59d392de852a@default> Date: Tue, 3 Sep 2013 04:30:16 -0700 (PDT) From: Line Holen To: Cc: Linux-Rdma Subject: [PATCH] osm_sa_guidinfo_record.c False duplicate GUID error messages X-Mailer: Zimbra on Oracle Beehive Content-Disposition: inline X-Source-IP: acsinet22.oracle.com [141.146.126.238] 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=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 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 --- -- 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..cfaf6f3 100644 --- a/opensm/osm_sa_guidinfo_record.c +++ b/opensm/osm_sa_guidinfo_record.c @@ -638,6 +638,14 @@ static void set_guidinfo(IN osm_sa_t *sa, IN osm_madw_t *p_madw, } add_alias_guid: + /* Check whether the port already contain this alias guid + at this index. If so we're done, continue to next */ + if (set_alias_guid == (*p_port->p_physp->p_guids)[i]) { + OSM_LOG(sa->p_log, OSM_LOG_DEBUG, + "The alias GUID is already correctly assigned, continue\n"); + continue; + } + /* allocate alias guid and add to alias guid table */ p_alias_guid = osm_alias_guid_new(set_alias_guid, p_port); if (!p_alias_guid) { @@ -656,9 +664,12 @@ add_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", + " 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->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;