From patchwork Thu Mar 28 07:55:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Ben Yosef X-Patchwork-Id: 2355401 X-Patchwork-Delegate: ira.weiny@intel.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 2AA5E3FD40 for ; Thu, 28 Mar 2013 08:13:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755662Ab3C1INI (ORCPT ); Thu, 28 Mar 2013 04:13:08 -0400 Received: from eu1sys200aog108.obsmtp.com ([207.126.144.125]:38389 "EHLO eu1sys200aog108.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755653Ab3C1ING (ORCPT ); Thu, 28 Mar 2013 04:13:06 -0400 Received: from mtlsws123.lab.mtl.com ([82.166.227.17]) (using TLSv1) by eu1sys200aob108.postini.com ([207.126.147.11]) with SMTP ID DSNKUVP7jwVMdA2Y907iuOFkycXYJ+bQPtau@postini.com; Thu, 28 Mar 2013 08:13:06 UTC Received: from r-ufm5-17.mtr.labs.mlnx (r-ufm5-17.mtr.labs.mlnx [172.30.5.91]) by mtlsws123.lab.mtl.com (8.13.8/8.13.8) with ESMTP id r2S7teex013496; Thu, 28 Mar 2013 09:55:40 +0200 Received: from r-ufm5-17.mtr.labs.mlnx (localhost [127.0.0.1]) by r-ufm5-17.mtr.labs.mlnx (8.14.4/8.14.4) with ESMTP id r2S7te6m018644; Thu, 28 Mar 2013 09:55:40 +0200 Received: (from danby@localhost) by r-ufm5-17.mtr.labs.mlnx (8.14.4/8.14.4/Submit) id r2S7teQP018643; Thu, 28 Mar 2013 09:55:40 +0200 Date: Thu, 28 Mar 2013 09:55:40 +0200 From: Dan Ben Yosef To: Ira Weiny Cc: linux-rdma@vger.kernel.org Subject: [PATCH] infiniband-diags/ibroute.c: fix pull extra block for LFT Message-ID: <20130328075540.GA11235@r-ufm5-17.mtr.labs.mlnx> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org when we pull LFT we pull extra block, this may cause to failure. Signed-off-by: Dan Ben Yosef --- src/ibroute.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/ibroute.c b/src/ibroute.c index df48382..d4827c9 100644 --- a/src/ibroute.c +++ b/src/ibroute.c @@ -360,7 +360,7 @@ char *dump_unicast_tables(ib_portid_t * portid, int startlid, int endlid) printf(" Port Info \n"); startblock = startlid / IB_SMP_DATA_SIZE; endblock = ALIGN(endlid, IB_SMP_DATA_SIZE) / IB_SMP_DATA_SIZE; - for (block = startblock; block <= endblock; block++) { + for (block = startblock; block < endblock; block++) { int status; DEBUG("reading block %d", block); if (!smp_query_status_via(lft, portid, IB_ATTR_LINEARFORWTBL, block,