[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201009094830.57736e5d@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Fri, 9 Oct 2020 09:48:30 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: poojatrivedi@...il.com, linux-crypto@...r.kernel.org,
mallesh537@...il.com, josh.tway@...ckpath.com,
netdev@...r.kernel.org
Subject: Re: [RFC 1/1] net/tls(TLS_SW): Handle -ENOSPC error return from
device/AES-NI
On Thu, 8 Oct 2020 16:35:34 +1100 Herbert Xu wrote:
> Jakub Kicinski <kuba@...nel.org> wrote:
> >
> > Why would the driver return EBUSY from an async API? What's the caller
> > supposed to do with that?
>
> The Crypto API offers two modes for callers to deal with congestion.
> If the request can be safely dropped (e.g., IPsec) then ENOSPC will
> be returned and should be dealt with accordingly.
>
> If the request cannot be dropped then EBUSY is returned to indicate
> congestion, and the caller must refrain from issuing any more
> requests until the Crypto API signals that there is space for them.
>
> The request flag CRYPTO_TFM_REQ_MAY_BACKLOG is used to indicate
> which mode you wish to use.
Are you saying that if we set CRYPTO_TFM_REQ_MAY_BACKLOG we should
never see ENOSPC with a correctly functioning driver? Or do we need
to handle both errors, regardless?
Powered by blists - more mailing lists