From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753157AbbKQIyK (ORCPT ); Tue, 17 Nov 2015 03:54:10 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:37555 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752975AbbKQIyH (ORCPT ); Tue, 17 Nov 2015 03:54:07 -0500 Subject: Re: [PATCH 3/9] IB: add a helper to safely drain a QP To: Steve Wise , "'Christoph Hellwig'" , linux-rdma@vger.kernel.org References: <1447422410-20891-1-git-send-email-hch@lst.de> <1447422410-20891-4-git-send-email-hch@lst.de> <564851BB.1020004@dev.mellanox.co.il> <564A067B.8030504@opengridcomputing.com> <003001d1209c$ecb70760$c6251620$@opengridcomputing.com> <564A2270.1040004@dev.mellanox.co.il> <003801d120a1$799338d0$6cb9aa70$@opengridcomputing.com> Cc: bart.vanassche@sandisk.com, axboe@fb.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org From: Sagi Grimberg Message-ID: <564AEB29.4080304@dev.mellanox.co.il> Date: Tue, 17 Nov 2015 10:54:01 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <003801d120a1$799338d0$6cb9aa70$@opengridcomputing.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > That won't work for iWARP. Is this code new? I didn't see any errors that would result from this code when I tested iSER over > cxgb4 with the old iwarp support patches. It's there since ~3.17 I think... > > Perhaps we need another way to do this? Like a completion object in the QP that gets triggered when the SQ and RQ become empty > after a transition to ERROR (and CLOSING for iwarp). Then a core service that just waits until the QP is empty. Implementation of > this design would hit the providers though since only they know when the flush is completed. ULPs need a drain functionality, so ib_drain_qp() is the way to go... How about we add a drain_qp() callout and have: if (qp->device->drain_qp) { qp->device->drain_qp(); return; } IB drain qp logic... This way iWARP devices can have their own magic on how to implement this functionality. Thoughts?