Title should be cryptodev: add SM4-XTS > add support of sm4 xts . > > Signed-off-by: Hanxiao Li <li.hanx...@zte.com.cn>
Send this patch (along with test cases) as a separate patchset "not included in this series." Update documentation doc/guides/cryptodevs/features/defaults.ini Update release notes for adding new algo. > --- > lib/cryptodev/rte_crypto_sym.h | 4 +++- > lib/cryptodev/rte_cryptodev.c | 3 ++- > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h > index 53b18b9412..b34d041fe0 100644 > --- a/lib/cryptodev/rte_crypto_sym.h > +++ b/lib/cryptodev/rte_crypto_sym.h > @@ -176,8 +176,10 @@ enum rte_crypto_cipher_algorithm { > /**< ShangMi 4 (SM4) algorithm in CTR mode */ > RTE_CRYPTO_CIPHER_SM4_OFB, > /**< ShangMi 4 (SM4) algorithm in OFB mode */ > - RTE_CRYPTO_CIPHER_SM4_CFB > + RTE_CRYPTO_CIPHER_SM4_CFB, > /**< ShangMi 4 (SM4) algorithm in CFB mode */ > + RTE_CRYPTO_CIPHER_SM4_XTS > + /**< ShangMi 4 (SM4) algorithm in XTS mode */ > }; > > /** Symmetric Cipher Direction */ > diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c > index 682c9f49d0..83ead956a8 100644 > --- a/lib/cryptodev/rte_cryptodev.c > +++ b/lib/cryptodev/rte_cryptodev.c > @@ -97,7 +97,8 @@ crypto_cipher_algorithm_strings[] = { > [RTE_CRYPTO_CIPHER_SM4_CBC] = "sm4-cbc", > [RTE_CRYPTO_CIPHER_SM4_CTR] = "sm4-ctr", > [RTE_CRYPTO_CIPHER_SM4_CFB] = "sm4-cfb", > - [RTE_CRYPTO_CIPHER_SM4_OFB] = "sm4-ofb" > + [RTE_CRYPTO_CIPHER_SM4_OFB] = "sm4-ofb", > + [RTE_CRYPTO_CIPHER_SM4_XTS] = "sm4-xts" > }; > > /** > -- > 2.27.0