From patchwork Mon Dec 3 15:25:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 1834281 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 B7B6C3FC5A for ; Mon, 3 Dec 2012 15:25:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755360Ab2LCPZn (ORCPT ); Mon, 3 Dec 2012 10:25:43 -0500 Received: from mail-la0-f46.google.com ([209.85.215.46]:40738 "EHLO mail-la0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755312Ab2LCPZn (ORCPT ); Mon, 3 Dec 2012 10:25:43 -0500 Received: by mail-la0-f46.google.com with SMTP id p5so2365349lag.19 for ; Mon, 03 Dec 2012 07:25:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding:x-gm-message-state; bh=pl0eAUyRb99geMldn0o845428Wb26KSeyyaBbCsX6ow=; b=jpJJuKNfHsSqqr3j0Ub7aASzKqQvG6qDxSv4Ty7r6WHhPkQau+su0KGrKYhZmvbjSB JJNtPBYtS+J5DOXMSBiK6Sl7BNOioMzlQTuT3s9nokmV/pp7AsQQS+bWMJk1m1ylrKFP Xb+CS9f7rQIRxAfw6OTzm2+iU66CbTEUmMcfp8bbOpgtL+5Z3T+RCeDozoHGf10VZaLH SRsfhMy2ecoa/y68Iko5rJCMhjjt8E6oNDfMevhF9e0+rlVcAsSpDudjCo5kdrPiD98m TCBgmQ+1H6B8yCfsAajwI88xLgHt2aSylLykmfwQ4UxI+GCD435bP8ZzVXOW50GU7PFz IqRQ== Received: by 10.112.47.42 with SMTP id a10mr4508011lbn.30.1354548342526; Mon, 03 Dec 2012 07:25:42 -0800 (PST) Received: from [192.168.1.102] (c-71-192-10-85.hsd1.ma.comcast.net. [71.192.10.85]) by mx.google.com with ESMTPS id pw17sm5471600lab.5.2012.12.03.07.25.41 (version=SSLv3 cipher=OTHER); Mon, 03 Dec 2012 07:25:42 -0800 (PST) Message-ID: <50BCC473.3060000@dev.mellanox.co.il> Date: Mon, 03 Dec 2012 10:25:39 -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)" , Jim Foraker Subject: [PATCH] opensm/osm_subnet.c: Improve error messages in subn_validate_neighbor X-Gm-Message-State: ALoCoQmB/0z4p7UesMS2rx2+nHp9DzEPodAfU47hk5cyCX4cSKskYoeYyY/IDYr7xgE4pSyP4eQj Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Signed-off-by: Hal Rosenstock --- opensm/osm_subnet.c | 22 ++++++++++++++++------ 1 files changed, 16 insertions(+), 6 deletions(-) diff --git a/opensm/osm_subnet.c b/opensm/osm_subnet.c index a3fc0b5..c716839 100644 --- a/opensm/osm_subnet.c +++ b/opensm/osm_subnet.c @@ -946,7 +946,8 @@ static void subn_validate_neighbor(osm_subn_t *p_subn) valid_entry = TRUE; OSM_LOG(&(p_subn->p_osm->log), OSM_LOG_DEBUG, - "Validating neighbor for 0x%016" PRIx64 ", port %d\n", + "Validating neighbor for guid:0x%016" PRIx64 + ", port %d\n", p_item->guid, p_item->portnum); if (p_item->guid == 0) { OSM_LOG(&(p_subn->p_osm->log), OSM_LOG_ERROR, @@ -954,31 +955,40 @@ static void subn_validate_neighbor(osm_subn_t *p_subn) valid_entry = FALSE; } else if (p_item->portnum == 0) { OSM_LOG(&(p_subn->p_osm->log), OSM_LOG_ERROR, - "ERR 7514: found invalid zero port\n"); + "ERR 7514: found invalid zero port for " + "guid: 0x%016" PRIx64 "\n", + p_item->guid); valid_entry = FALSE; } else if (osm_db_neighbor_get(p_subn->p_neighbor, p_item->guid, p_item->portnum, &guid, &port)) { OSM_LOG(&(p_subn->p_osm->log), OSM_LOG_ERROR, "ERR 7515: could not find neighbor for " - "guid: 0x%016" PRIx64 "\n", p_item->guid); + "guid: 0x%016" PRIx64 ", port %d\n", + p_item->guid, p_item->portnum); valid_entry = FALSE; } else if (guid == 0) { OSM_LOG(&(p_subn->p_osm->log), OSM_LOG_ERROR, "ERR 7516: found invalid neighbor " - "zero guid"); + "zero guid for guid: 0x%016" PRIx64 + ", port %d\n", + p_item->guid, p_item->portnum); valid_entry = FALSE; } else if (port == 0) { OSM_LOG(&(p_subn->p_osm->log), OSM_LOG_ERROR, "ERR 7517: found invalid neighbor " - "zero port\n"); + "zero port for guid: 0x%016" PRIx64 + ", port %d\n", + p_item->guid, p_item->portnum); valid_entry = FALSE; } else if (osm_db_neighbor_get(p_subn->p_neighbor, guid, port, &guid, &port) || guid != p_item->guid || port != p_item->portnum) { OSM_LOG(&(p_subn->p_osm->log), OSM_LOG_ERROR, "ERR 7518: neighbor does not point " - "back at us\n"); + "back at us (guid: 0x%016" PRIx64 + ", port %d)\n", + p_item->guid, p_item->portnum); valid_entry = FALSE; }