From patchwork Mon Jun 24 14:33:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 2771791 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 048329F758 for ; Mon, 24 Jun 2013 14:33:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1511620247 for ; Mon, 24 Jun 2013 14:33:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1C22F20244 for ; Mon, 24 Jun 2013 14:33:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751411Ab3FXOdN (ORCPT ); Mon, 24 Jun 2013 10:33:13 -0400 Received: from mail-bk0-f50.google.com ([209.85.214.50]:51625 "EHLO mail-bk0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751072Ab3FXOdM (ORCPT ); Mon, 24 Jun 2013 10:33:12 -0400 Received: by mail-bk0-f50.google.com with SMTP id ik8so4183816bkc.23 for ; Mon, 24 Jun 2013 07:33:10 -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=oRbClUw2k1I026qruL3jx3tClFWo2yvxYKENVIDXGlA=; b=ge3YUUPOPovFFWiM9Y8s5s6Yfp68RfiveZcyuLMJbt+3fa69ZYEXRyJgoLTydaOtY4 QEkSSzL+wbj5IzheHL3oyLalH6RNLonbJG4G0w/qXS8N6wMtF/zk9tr2lO6qdxJsJ+vo 5Ha3zUrFK7CfDp2KJW3lqwqhPKBoJTO5YU339gjcb2rqXP/jags4A7y0afCrwsb9GVXy GF2dME8+XGCBeYBCeFtsQEwfZKFOtMRG/qEbAOAVtkhnuCR6L0yD8Eq3YhpEAMEaP2/B B2bPSABLSkujv8O5CYxSYFPx++QYb44iBABXcrVSBvyH+WbAtHVezmNqC0/CrJdXmFAw Mtfg== X-Received: by 10.205.112.9 with SMTP id eq9mr3759287bkc.178.1372084390583; Mon, 24 Jun 2013 07:33:10 -0700 (PDT) Received: from [192.168.1.102] (c-71-234-225-85.hsd1.ct.comcast.net. [71.234.225.85]) by mx.google.com with ESMTPSA id fz10sm5197417bkc.9.2013.06.24.07.33.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Jun 2013 07:33:09 -0700 (PDT) Message-ID: <51C858A1.2050307@dev.mellanox.co.il> Date: Mon, 24 Jun 2013 10:33:05 -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] osm_ucast_mgr.c: Fix duplicated code for fallback routing engine X-Gm-Message-State: ALoCoQmM7f/z68V2Ux3wwQJ0f8j2/yYQ3dSbSdZeimV5hA0nOkHXu2+PGieXKaYXvuxRHPIjaBiD Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-8.0 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 Signed-off-by: Vladimir Koushnir Signed-off-by: Hal Rosenstock --- opensm/osm_ucast_mgr.c | 9 +-------- 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/opensm/osm_ucast_mgr.c b/opensm/osm_ucast_mgr.c index 611c5bc..aea69ef 100644 --- a/opensm/osm_ucast_mgr.c +++ b/opensm/osm_ucast_mgr.c @@ -1537,14 +1537,7 @@ int osm_ucast_mgr_process(IN osm_ucast_mgr_t * p_mgr) if (!p_osm->routing_engine_used && p_osm->no_fallback_routing_engine != TRUE) { /* If configured routing algorithm failed, use default MinHop */ - struct osm_routing_engine *r = p_osm->default_routing_engine; - - r->build_lid_matrices(r->context); - failed = r->ucast_build_fwd_tables(r->context); - if (!failed) { - p_osm->routing_engine_used = r; - osm_ucast_mgr_set_fwd_tables(p_mgr); - } + failed = ucast_mgr_route(p_osm->default_routing_engine, p_osm); } /* if for some reason different routing engine is used */