From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932095AbcGLIgA (ORCPT ); Tue, 12 Jul 2016 04:36:00 -0400 Received: from helcar.hengli.com.au ([209.40.204.226]:54456 "EHLO helcar.hengli.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750794AbcGLIf6 (ORCPT ); Tue, 12 Jul 2016 04:35:58 -0400 Date: Tue, 12 Jul 2016 16:35:52 +0800 From: Herbert Xu To: Yeshaswi M R Gowda Cc: hariprasad@chelsio.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net, linux-crypto@vger.kernel.org, jlulla@chelsio.com, atul.gupta@chelsio.com, harsh@chelsio.com Subject: Re: [PATCH 2/3] chcr: Support for Chelsio's Crypto Hardware Message-ID: <20160712083552.GA29994@gondor.apana.org.au> References: <1468261688-24525-1-git-send-email-yeshaswi@chelsio.com> <1468261688-24525-3-git-send-email-yeshaswi@chelsio.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1468261688-24525-3-git-send-email-yeshaswi@chelsio.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 11, 2016 at 11:28:07AM -0700, Yeshaswi M R Gowda wrote: > > + u_ctx = ULD_CTX(ctx); > + if (cxgb4_is_crypto_q_full(u_ctx->lldi.ports[0], ctx->tx_channel_id)) > + return -EBUSY; You cannot just return -EBUSY. If the request has the MAY_BACKLOG bit set, it must be queued regardless, but you should return -EBUSY in order to throttle the user and then call the completion function with -EINPROGRESS once the queue can accept more requests from the user. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt