Re: Converting mac80211 CCMP to packet-at-a-time processing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pavel Roskin <proski@xxxxxxx> wrote:
>
>> You won't have to deal with completions if you allocate your
>> algorithm with the CRYPTO_ALG_ASYNC bit off.  Of course you won't
>> be able to use most hardware accelerations either.
> 
> Actually, I thought using CRYPTO_ALG_ASYNC in the mask meant to
> _exclude_ asynchronous algorithms.

That's what I just said, no?

> Is there any documentation for Linux crypto API that documents use of
> CRYPTO_ALG_ASYNC?  Also, I'd like to know meanings of
> CRYPTO_TFM_REQ_MAY_BACKLOG and CRYPTO_TFM_REQ_MAY_SLEEP.

Normally an async driver will simply drop requests and return
EBUSY when the hardware queue is full.  MAY_BACKLOG allows the
caller to place a single request on a backlog queue.  When that
request moves onto the hardware queue the caller will be notified
through the completion function with err set to EINPROGRESS.

This is used by drivers/md/dm-crypt.

MAY_SLEEP is only relevant for synchronous algorithms, it allows
the API to sleep which is useful if you are making a single large
request which would take an extended period of time to process.

> The crypto API feels like a minefield to me - I should check everything
> in the code or even experiment to figure out how the public API works.

Well patches to improve the API and/or documentation are welcome.

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux