From: Herbert Xu Subject: Re: [PATCH v2] crypto/caam: add backlogging support Date: Wed, 23 Sep 2015 20:02:00 +0800 Message-ID: <20150923120200.GA21368@gondor.apana.org.au> References: <1442434361-15123-1-git-send-email-alexandru.porosanu@freescale.com> <20150918132443.GG7638@gondor.apana.org.au> <20150918135017.GA9152@gondor.apana.org.au> <20150918141040.GL9249@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "linux-crypto@vger.kernel.org" , Geanta Neag Horia , Pop Mircea To: Porosanu Alexandru Return-path: Received: from helcar.hengli.com.au ([209.40.204.226]:58601 "EHLO helcar.hengli.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754447AbbIWMCI (ORCPT ); Wed, 23 Sep 2015 08:02:08 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-crypto-owner@vger.kernel.org List-ID: On Fri, Sep 18, 2015 at 02:27:12PM +0000, Porosanu Alexandru wrote: > > Well, the HW has less than the whole RAM for backlogging requests, it has the # of available backlogging requests slots. > Then it will start dropping, just like in the out-of-mem case. OK I think that's where our misunderstanding is. For a backlogged request you do not give it to the hardware immediately. In fact a request should only be backlogged when the hardware queue is completely full. It should stay in a software queue until the hardware has space for it. When that happens you move it onto the hardware queue and invoke the completion function with err set to -EINPROGRESS. This tells the caller to enqueue that it may enqueue more requests. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt