From patchwork Sun Apr 18 15:56:36 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Khapyorsky X-Patchwork-Id: 93358 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3IFuQqf026517 for ; Sun, 18 Apr 2010 15:56:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753832Ab0DRP4Z (ORCPT ); Sun, 18 Apr 2010 11:56:25 -0400 Received: from mail-ww0-f46.google.com ([74.125.82.46]:41404 "EHLO mail-ww0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753126Ab0DRP4Y (ORCPT ); Sun, 18 Apr 2010 11:56:24 -0400 Received: by wwb24 with SMTP id 24so2057783wwb.19 for ; Sun, 18 Apr 2010 08:56:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:date:from:to :cc:subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=ppm4FifcgbrwDBOHlHjMeF62wqBsgXAiZR0JOtzYfZU=; b=TjpWhDBB41xA05Ecde7QznnoBoeHAM3mZB4ic+Xf+Bg7ewYbDVwz7o1B/ulDdya+Au aC1/fizIjjgccQnj70UQF6h/12kJJs01Id8RjJhYc8SFHcOEe7u+hmBR+DgyjbO0Y1Wk JQSCEmI3O4p8XIh38LBtOqvSEspYBZZJBq/Z0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=LOV4Nvg9nuKnpm/tzgasKL3fUhSFlwx50rJQjJBY4UZFFO7Ne5IPWzmzcAcJsg8wDs zj0rrl+Z3/+sXbVf7JFt1+S2GT1yzlHH+CeaWJ7M/YFt12rIe4lehLcySOvTxMZ1DCYF +5vdFfijq50SlINjGu3TbV5FfoJoFJKIPxNx4= Received: by 10.216.188.77 with SMTP id z55mr5382892wem.3.1271606183271; Sun, 18 Apr 2010 08:56:23 -0700 (PDT) Received: from me.localdomain (85.64.35.106.dynamic.barak-online.net [85.64.35.106]) by mx.google.com with ESMTPS id t27sm40499906wbc.5.2010.04.18.08.56.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 18 Apr 2010 08:56:22 -0700 (PDT) Received: by me.localdomain (Postfix, from userid 1000) id 89C7D11DF6; Sun, 18 Apr 2010 18:56:36 +0300 (IDT) Date: Sun, 18 Apr 2010 18:56:36 +0300 From: Sasha Khapyorsky To: Ira Weiny Cc: "linux-rdma@vger.kernel.org" , Hal Rosenstock Subject: [PATCH] libibnetdiscover: more outstanding MADs counting fix Message-ID: <20100418155636.GJ11943@me> References: <20100218124933.c018a23d.weiny2@llnl.gov> <20100413163836.GM10830@me> <20100413133826.00a8afc5.weiny2@llnl.gov> <20100413134446.72eb336a.weiny2@llnl.gov> <20100414102335.GT10830@me> <0EEE4F40-F1DD-46A6-B756-3C46DA06B403@llnl.gov> <20100416120505.GB11943@me> <20100418154950.GI11943@me> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100418154950.GI11943@me> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sun, 18 Apr 2010 15:56:26 +0000 (UTC) diff --git a/infiniband-diags/libibnetdisc/src/query_smp.c b/infiniband-diags/libibnetdisc/src/query_smp.c index 08e3ef7..3d10977 100644 --- a/infiniband-diags/libibnetdisc/src/query_smp.c +++ b/infiniband-diags/libibnetdisc/src/query_smp.c @@ -160,8 +160,6 @@ static int process_one_recv(smp_engine_t * engine) return -1; } - rc = process_smp_queue(engine); - mad = umad_get_mad(umad); trid = (uint32_t) mad_get_field64(mad, 0, IB_MAD_TRID_F); @@ -171,6 +169,8 @@ static int process_one_recv(smp_engine_t * engine) return -1; } + engine->num_smps_outstanding--; + rc = process_smp_queue(engine); if (rc) goto error; @@ -187,7 +187,6 @@ static int process_one_recv(smp_engine_t * engine) error: free(smp); - engine->num_smps_outstanding--; return rc; }