From patchwork Tue Apr 26 14:55:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 8939691 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0A454BF29F for ; Tue, 26 Apr 2016 14:55:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2869820120 for ; Tue, 26 Apr 2016 14:55:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D8524201F2 for ; Tue, 26 Apr 2016 14:55:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751317AbcDZOzm (ORCPT ); Tue, 26 Apr 2016 10:55:42 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:32835 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751101AbcDZOzm (ORCPT ); Tue, 26 Apr 2016 10:55:42 -0400 Received: by mail-wm0-f65.google.com with SMTP id r12so5138308wme.0 for ; Tue, 26 Apr 2016 07:55:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=IgmaEaMwc36/8ejeNeYpO6f020wVKbVPxf2KNwHxCK0=; b=Ivdscy/0Rny7xTHIjxFEzzsIni48KDUmLxPjr7Qpj+cnp7A52ZyC5prEfS2R9dWR5n UD9yd4yH4r3rhWmkTeINtRclNgDTWGl4BRxyNzjhmdCy6opG9+AgP6k/wmcbH6f5PaQ4 pkrEIi3Ly0Lh4FWh409TqVJFOI7Un/HOpuRl7xNU7l4weHQHZDuPFZeRztFx6OeHuIoA Wmro98I1cRuw6rijr4jNrc6TYkSxk9+IKP2wMcDkHum/J2E6UyOkzA0xaa+idT4GcT3B n/Ud0TrCOFb7nnT4GqIU4HAqSydjxymXOeTsqBLMv38UOMVwR5772uxzg+BUbgiWrnom PMkg== X-Gm-Message-State: AOPr4FWU6O0yAqcxfLXUkHST4SipqhSoeS9gKi9t7eXkYqwMgrwhCkaoSKQy4hbmwe3WNw== X-Received: by 10.194.61.231 with SMTP id t7mr4108190wjr.32.1461682540867; Tue, 26 Apr 2016 07:55:40 -0700 (PDT) Received: from sagi-Latitude-E7470 ([87.69.91.8]) by smtp.gmail.com with ESMTPSA id b12sm21116962wmb.0.2016.04.26.07.55.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Apr 2016 07:55:40 -0700 (PDT) Received: by sagi-Latitude-E7470 (Postfix, from userid 1000) id 205DDA61C8D; Tue, 26 Apr 2016 17:55:38 +0300 (IDT) From: Sagi Grimberg To: linux-rdma@vger.kernel.org Cc: Steve Wise , Christoph Hellwig Subject: [PATCH] IB/core: Don't drain the receive queue for srq attached queue-pair Date: Tue, 26 Apr 2016 17:55:38 +0300 Message-Id: <1461682538-19647-1-git-send-email-sagi@grimberg.me> X-Mailer: git-send-email 1.9.1 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY, URIBL_BLACK 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 SRQ attached QPs will fail receive work posts does not have a receive queue that needs to be drained, the receive queue is shared. Fixes: 765d67748bcf ("IB: new common API for draining queues") Signed-off-by: Sagi Grimberg Reviewed-by: Steve Wise --- drivers/infiniband/core/verbs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index 769b000e8360..566bfb31cadb 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -1897,6 +1897,7 @@ EXPORT_SYMBOL(ib_drain_rq); void ib_drain_qp(struct ib_qp *qp) { ib_drain_sq(qp); - ib_drain_rq(qp); + if (!qp->srq) + ib_drain_rq(qp); } EXPORT_SYMBOL(ib_drain_qp);