From patchwork Mon Jun 9 16:16:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 4322871 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 79B12BEEAA for ; Mon, 9 Jun 2014 16:17:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B321120221 for ; Mon, 9 Jun 2014 16:17:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C117C20136 for ; Mon, 9 Jun 2014 16:17:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932675AbaFIQRB (ORCPT ); Mon, 9 Jun 2014 12:17:01 -0400 Received: from mail-wg0-f52.google.com ([74.125.82.52]:63895 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932653AbaFIQRA (ORCPT ); Mon, 9 Jun 2014 12:17:00 -0400 Received: by mail-wg0-f52.google.com with SMTP id b13so1290391wgh.11 for ; Mon, 09 Jun 2014 09:16:59 -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=5xjVm2GRhSY9+uopuuQRUTmuE+SRMTDXYrJGYbnTwUA=; b=R3EG5Ee22tlTRJyBdScOLgKVnI6IL4Xys3DDCcGpYG7wUZSzX1FwB4DGSKRdnBVhcd TZGyzEl1mgy/l1NmsvTtvRMSNzTzqPI85QQIfM/f9O2UctCWbhhxIAzyVRYooqJtN9iA f121nSLtPV/Ga19ys9kPH1O1iSZ0vCQR1NCdi5wz69QwAzrORP3OvyFc/iwtrrY5WpW1 dG1t9JY9kKRt9wByF69YBGy45kuBDPu6WihEL/175CnhxrfE31TVEnXRErb+i5bml6az UxIUh96CH7qhSjIixMH15CQm6++/Bgpow6VaVHbdGH03oUWEdgfYfKrYaxErLD5ySJoC lc8Q== X-Gm-Message-State: ALoCoQkxjBL5B8si65WLtRl37NHb2rdcSki2trtRYAYA/jHJgfLWBNMGzAhWKWifBqzs/wsO/GdB X-Received: by 10.180.11.37 with SMTP id n5mr32941476wib.41.1402330618994; Mon, 09 Jun 2014 09:16:58 -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 u10sm25599467wjz.43.2014.06.09.09.16.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 09 Jun 2014 09:16:58 -0700 (PDT) Message-ID: <5395DDF7.6040006@dev.mellanox.co.il> Date: Mon, 09 Jun 2014 12:16:55 -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: "linux-rdma (linux-rdma@vger.kernel.org)" CC: Vladimir Koushnir Subject: [PATCH opensm] libvendor/osm_vendor_ibumad.c: Check the next CA card if the error is returned for the current one Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.5 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 From: Vladimir Koushnir osm_vendor_open_port should check matching of the input GUID on all CA cards. When umad_get_ca_portguids returns an error on the current CA card,next card should be examined. This change resolves an issue with Win opensm. Win lower layers are not following libibumad Linux convention/assumption and are sometimes returning an error when umad_get_ca_portguids is called from osm_vendor_open_port. Signed-off-by: Vladimir Koushnir Signed-off-by: Hal Rosenstock --- libvendor/osm_vendor_ibumad.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/libvendor/osm_vendor_ibumad.c b/libvendor/osm_vendor_ibumad.c index 69020f2..838923b 100644 --- a/libvendor/osm_vendor_ibumad.c +++ b/libvendor/osm_vendor_ibumad.c @@ -727,10 +727,14 @@ osm_vendor_open_port(IN osm_vendor_t * const p_vend, for (ca = 0; ca < p_vend->ca_count; ca++) { if ((r = umad_get_ca_portguids(p_vend->ca_names[ca], portguids, OSM_UMAD_MAX_PORTS_PER_CA + 1)) < 0) { +#ifdef __WIN__ + OSM_LOG(p_vend->p_log, OSM_LOG_VERBOSE, +#else OSM_LOG(p_vend->p_log, OSM_LOG_ERROR, "ERR 5421: " +#endif "Unable to get CA %s port guids (%s)\n", p_vend->ca_names[ca], strerror(r)); - goto Exit; + continue; } for (i = 0; i < r; i++) if (port_guid == portguids[i]) {