• Pascal van Leeuwen's avatar
    crypto: inside-secure - Fix Unable to fit even 1 command desc error w/ EIP97 · 098e51e5
    Pascal van Leeuwen authored
    Due to the additions of support for modes like AES-CCM and AES-GCM, which
    require large command tokens, the size of the descriptor has grown such that
    it now does not fit into the descriptor cache of a standard EIP97 anymore.
    This means that the driver no longer works on the Marvell Armada 3700LP chip
    (as used on e.g. Espressobin) that it has always supported.
    Additionally, performance on EIP197's like Marvell A8K may also degrade
    due to being able to fit less descriptors in the on-chip cache.
    Putting these tokens into the descriptor was really a hack and not how the
    design was supposed to be used - resource allocation did not account for it.
    
    So what this patch does, is move the command token out of the descriptor.
    To avoid having to allocate buffers on the fly for these command tokens,
    they are stuffed in a "shadow ring", which is a circular buffer of fixed
    size blocks that runs in lock-step with the descriptor ring. i.e. there is
    one token block per descriptor. The descriptor ring itself is then pre-
    populated with the pointers to these token blocks so these do not need to
    be filled in when building the descriptors later.
    Signed-off-by: default avatarPascal van Leeuwen <pvanleeuwen@rambus.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    098e51e5
safexcel_ring.c 6.55 KB