From patchwork Mon Aug 2 22:39:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralph Campbell X-Patchwork-Id: 116629 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o72MdRca026929 for ; Mon, 2 Aug 2010 22:39:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753494Ab0HBWj0 (ORCPT ); Mon, 2 Aug 2010 18:39:26 -0400 Received: from vpn.pathscale.com ([198.186.3.75]:37594 "HELO mx.mv.qlogic.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with SMTP id S1752046Ab0HBWjZ (ORCPT ); Mon, 2 Aug 2010 18:39:25 -0400 Received: from chromite.mv.qlogic.com (chromite.mv.qlogic.com [10.29.2.82]) by mx.mv.qlogic.com (Postfix) with ESMTP id 01CFD14300A2; Mon, 2 Aug 2010 15:39:24 -0700 (PDT) Received: from chromite.mv.qlogic.com (localhost.localdomain [127.0.0.1]) by chromite.mv.qlogic.com (Postfix) with ESMTP id E30201429B0; Mon, 2 Aug 2010 15:39:24 -0700 (PDT) From: Ralph Campbell Subject: [PATCH 1/2] IB/qib: limit the number of packets processed per interrupt To: Roland Dreier Cc: linux-rdma@vger.kernel.org Date: Mon, 02 Aug 2010 15:39:24 -0700 Message-ID: <20100802223924.8701.14389.stgit@chromite.mv.qlogic.com> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 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]); Mon, 02 Aug 2010 22:39:27 +0000 (UTC) diff --git a/drivers/infiniband/hw/qib/qib_driver.c b/drivers/infiniband/hw/qib/qib_driver.c index f15ce07..9cd1936 100644 --- a/drivers/infiniband/hw/qib/qib_driver.c +++ b/drivers/infiniband/hw/qib/qib_driver.c @@ -335,7 +335,7 @@ u32 qib_kreceive(struct qib_ctxtdata *rcd, u32 *llic, u32 *npkts) smp_rmb(); /* prevent speculative reads of dma'ed hdrq */ } - for (last = 0, i = 1; !last; i += !last) { + for (last = 0, i = 1; !last && i <= 64; i += !last) { hdr = dd->f_get_msgheader(dd, rhf_addr); eflags = qib_hdrget_err_flags(rhf_addr); etype = qib_hdrget_rcv_type(rhf_addr);