From patchwork Wed Oct 10 23:40:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 1577421 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 5849D40135 for ; Wed, 10 Oct 2012 23:40:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757469Ab2JJXkS (ORCPT ); Wed, 10 Oct 2012 19:40:18 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:53301 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757485Ab2JJXkR (ORCPT ); Wed, 10 Oct 2012 19:40:17 -0400 Received: by mail-qc0-f174.google.com with SMTP id d3so892249qch.19 for ; Wed, 10 Oct 2012 16:40:16 -0700 (PDT) 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=uTSUfC88Y6tMNK1iiHpEpfAx7PxliIMhtdxjSy4tGlY=; b=QBHL6sw5Oz1bXpSJU58ILqOoCtPBAEwedzfyv6FzlLEFDUJOTjwPYxq75iPazeeth0 BryIfmeKDUG7Uey8itCbeEJxLuthf3oq6Q5uYGEF8g6ObOZ5KV3AsX9TYKAMU20LCvLg MjjllK1497r8+QVDlYgyx80XmDHKtYjHp6FLP3JznlZg9T/UQrh8I4HnefCnG6Hk76bm iQ00RWCNYpPgiFJJTJnxMIC1WpDOgZPhAhXWtbd35TqkbA8t/Bxmgd35lDnGAf7Zp1/Q QbauGrft6LLMrWLbUBhGu/8j4PL9hXcuU7vP5qbdTjY4SN8kPjKSsjQrUKxb75rYxKz4 kHFw== Received: by 10.49.14.193 with SMTP id r1mr5902143qec.50.1349912416542; Wed, 10 Oct 2012 16:40:16 -0700 (PDT) Received: from [192.168.1.103] (c-71-192-10-85.hsd1.ma.comcast.net. [71.192.10.85]) by mx.google.com with ESMTPS id ck18sm2993152qab.7.2012.10.10.16.40.15 (version=SSLv3 cipher=OTHER); Wed, 10 Oct 2012 16:40:15 -0700 (PDT) Message-ID: <5076075D.9000509@dev.mellanox.co.il> Date: Wed, 10 Oct 2012 19:40:13 -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: Alex Netes CC: "linux-rdma (linux-rdma@vger.kernel.org)" , Jim Schutt Subject: [PATCH 2/2] opensm/osm_torus.c: Check fabric minimum data VLs on switch external ports X-Gm-Message-State: ALoCoQnvcObXfW7xzMcHvLxDw8+fkWCsuWc7eoNArlZULUTs4oIZ5U9SDS8H/eSdzXNBr9WwbRHl Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Also, in sl2vl_entry, use that value when appropriate Signed-off-by: Hal Rosenstock Reviewed-by: Jim Schutt --- opensm/osm_torus.c | 35 ++++++++++++++++++++++------------- 1 files changed, 22 insertions(+), 13 deletions(-) diff --git a/opensm/osm_torus.c b/opensm/osm_torus.c index ec2c5ef..82c1db1 100644 --- a/opensm/osm_torus.c +++ b/opensm/osm_torus.c @@ -7027,22 +7027,27 @@ bool verify_setup(struct torus *t, struct fabric *f) "ERR 4E20: missing required torus size specification!\n"); goto out; } - if (t->osm->subn.min_data_vls < 2) + if (t->osm->subn.min_data_vls < 2 || t->osm->subn.min_sw_data_vls < 2) OSM_LOG(&t->osm->log, OSM_LOG_INFO, "Warning: Too few data VLs to support torus routing " - "without credit loops (have %d need 2)\n", - (int)t->osm->subn.min_data_vls); - if (t->osm->subn.min_data_vls < 4) + "without credit loops (have endport %d switchport %d " + "need 2)\n", + (int)t->osm->subn.min_data_vls, + (int)t->osm->subn.min_sw_data_vls); + if (t->osm->subn.min_data_vls < 4 || t->osm->subn.min_sw_data_vls < 4) OSM_LOG(&t->osm->log, OSM_LOG_INFO, "Warning: Too few data VLs to support torus routing " - "with a failed switch without credit loops" - "(have %d need 4)\n", - (int)t->osm->subn.min_data_vls); - if (t->osm->subn.min_data_vls < 8) + "with a failed switch without credit loops " + "(have endport %d switchport %d need 4)\n", + (int)t->osm->subn.min_data_vls, + (int)t->osm->subn.min_sw_data_vls); + if (t->osm->subn.min_data_vls < 8 || t->osm->subn.min_sw_data_vls < 8) OSM_LOG(&t->osm->log, OSM_LOG_INFO, "Warning: Too few data VLs to support torus routing " - "with two QoS levels (have %d need 8)\n", - (int)t->osm->subn.min_data_vls); + "with two QoS levels (have endport %d switchport %d " + "need 8)\n", + (int)t->osm->subn.min_data_vls, + (int)t->osm->subn.min_sw_data_vls); /* * Be sure all the switches in the torus support the port * ordering that might have been configured. @@ -7982,7 +7987,10 @@ unsigned sl2vl_entry(struct torus *t, struct t_switch *sw, else od = TORUS_MAX_DIM; - data_vls = t->osm->subn.min_data_vls; + if (sw) + data_vls = t->osm->subn.min_sw_data_vls; + else + data_vls = t->osm->subn.min_data_vls; vl = 0; if (data_vls >= 2) @@ -9251,9 +9259,10 @@ int torus_build_lfts(void *context) OSM_LOG(&torus->osm->log, OSM_LOG_INFO, "Found fabric w/ %d links, %d switches, %d CA ports, " - "minimum %d data VLs\n", + "minimum data VLs: endport %d, switchport %d\n", (int)fabric->link_cnt, (int)fabric->switch_cnt, - (int)fabric->ca_cnt, (int)ctx->osm->subn.min_data_vls); + (int)fabric->ca_cnt, (int)ctx->osm->subn.min_data_vls, + (int)ctx->osm->subn.min_sw_data_vls); if (!verify_setup(torus, fabric)) goto out;