lkml.org 
[lkml]   [2016]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH v2 0/4] Introduce bulk mode for crypto engine framework
    From
    On 18 April 2016 at 16:31, Herbert Xu <herbert@gondor.apana.org.au> wrote:
    > On Mon, Apr 18, 2016 at 04:28:46PM +0800, Baolin Wang wrote:
    >>
    >> What I meaning is if the xts engine can support bulk block, then the
    >> engine driver can select bulk mode to do encryption, but if their xts
    >> engine can not support bulk mode, which depends on hardware design,
    >> the engine driver can not select bulk mode. So the dm-crypt can not
    >> know what will be selected by the engine driver, it can not send one
    >> bulk block each time.
    >
    > Why can't the xts code just break it up if it can't handle it?

    Simply to say, now there are many different hardware engines for
    different vendors, some engines can support bulk block but some can
    not (or no cipher hardware engine), then the dm-crypt can not know
    your hardware engine features. If the dm-crypt send one bulk block to
    low level, but the engine driver can not support bulk block, then it
    will crash. So we did the merging action in driver level not dm-crypt
    level.

    >
    > You want to postpone splitting as much as possible. Even if the
    > underlying xts code couldn't handle it, it would still make sense
    > for the crypto API to see the request in one piece.
    >
    > Cheers,
    > --
    > Email: Herbert Xu <herbert@gondor.apana.org.au>
    > Home Page: http://gondor.apana.org.au/~herbert/
    > PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



    --
    Baolin.wang
    Best Regards

    \
     
     \ /
      Last update: 2016-04-18 11:01    [W:2.581 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site