On Wed, Oct 28, 2020 at 5:43 PM Srujana Challa <schalla@xxxxxxxxxxx> wrote: > > CPT offload module utilises the linux crypto framework to offload > crypto processing. This patch registers supported algorithms by > calling registration functions provided by the kernel crypto API. > > The module currently supports: > - AES block cipher in CBC,ECB,XTS and CFB mode. > - 3DES block cipher in CBC and ECB mode. > - AEAD algorithms. > authenc(hmac(sha1),cbc(aes)), > authenc(hmac(sha256),cbc(aes)), > authenc(hmac(sha384),cbc(aes)), > authenc(hmac(sha512),cbc(aes)), > authenc(hmac(sha1),ecb(cipher_null)), > authenc(hmac(sha256),ecb(cipher_null)), > authenc(hmac(sha384),ecb(cipher_null)), > authenc(hmac(sha512),ecb(cipher_null)), > rfc4106(gcm(aes)). > > Signed-off-by: Suheil Chandran <schandran@xxxxxxxxxxx> > Signed-off-by: Srujana Challa <schalla@xxxxxxxxxxx> > --- > drivers/crypto/marvell/Kconfig | 4 + > drivers/crypto/marvell/octeontx2/Makefile | 3 +- > .../marvell/octeontx2/otx2_cpt_reqmgr.h | 1 + > .../marvell/octeontx2/otx2_cptvf_algs.c | 1665 +++++++++++++++++ > .../marvell/octeontx2/otx2_cptvf_algs.h | 170 ++ These files are almost verbatim copies of .../marvell/octeontx/otx_cptvf_algs.(ch), with the usual name changes otx_ to otx2_ Is there some way to avoid code duplication? I guess this is not uncommon for subsequent hardware device drivers from the same vendor. If nothing else, knowing this makes reviewing a lot easier.