]> git.droids-corp.org - dpdk.git/commitdiff
crypto/cnxk: remove redundant code
authorTejasree Kondoj <ktejasree@marvell.com>
Wed, 1 Sep 2021 10:19:25 +0000 (15:49 +0530)
committerAkhil Goyal <gakhil@marvell.com>
Mon, 6 Sep 2021 19:44:08 +0000 (21:44 +0200)
Removing redundant code in cn10k lookaside IPsec.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
drivers/crypto/cnxk/cn10k_ipsec.c
drivers/crypto/cnxk/cn10k_ipsec.h
drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c

index 408a682b21cef045bbbfae237511aa9b34b39eb4..944e0a7e3bae30f05ab77e7bf76755e08d5685af 100644 (file)
@@ -270,9 +270,6 @@ cn10k_sec_session_create(void *device, struct rte_security_session_conf *conf,
        if (conf->action_type != RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL)
                return -EINVAL;
 
-       if (rte_security_dynfield_register() < 0)
-               return -ENOTSUP;
-
        if (rte_mempool_get(mempool, (void **)&priv)) {
                plt_err("Could not allocate security session private data");
                return -ENOMEM;
@@ -280,8 +277,6 @@ cn10k_sec_session_create(void *device, struct rte_security_session_conf *conf,
 
        set_sec_session_private_data(sess, priv);
 
-       priv->userdata = conf->userdata;
-
        if (conf->protocol != RTE_SECURITY_PROTOCOL_IPSEC) {
                ret = -ENOTSUP;
                goto mempool_put;
index 668282f7aae4e0d4ad8fb6947c873a439ac3bd7a..c30492e14989bd4d2a04f0ff8d7a585e721c3149 100644 (file)
@@ -27,8 +27,6 @@ struct cn10k_ipsec_sa {
 
 struct cn10k_sec_session {
        struct cn10k_ipsec_sa sa;
-       void *userdata;
-       /**< Userdata registered by the application */
 } __rte_cache_aligned;
 
 void cn10k_sec_ops_override(void);
index 47274b2c241cb5fd35760c170f8c13185de09e21..9430ca5d005c00d56c277cf0354ffcc33b57a4e4 100644 (file)
@@ -810,7 +810,6 @@ static const struct rte_security_capability sec_caps_templ[] = {
                        .options = { 0 }
                },
                .crypto_capabilities = NULL,
-               .ol_flags = RTE_SECURITY_TX_OLOAD_NEED_MDATA
        },
        {       /* IPsec Lookaside Protocol ESP Tunnel Egress */
                .action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL,
@@ -822,7 +821,6 @@ static const struct rte_security_capability sec_caps_templ[] = {
                        .options = { 0 }
                },
                .crypto_capabilities = NULL,
-               .ol_flags = RTE_SECURITY_TX_OLOAD_NEED_MDATA
        },
        {
                .action = RTE_SECURITY_ACTION_TYPE_NONE