get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/61460/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 61460,
    "url": "http://patches.dpdk.org/api/patches/61460/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20191018075613.2784-3-hemant.agrawal@nxp.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20191018075613.2784-3-hemant.agrawal@nxp.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191018075613.2784-3-hemant.agrawal@nxp.com",
    "date": "2019-10-18T07:56:13",
    "name": "crypto/dpaa_sec: enable compilation without security",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "a4a250171b74206e2069fabf829b977a535535b1",
    "submitter": {
        "id": 477,
        "url": "http://patches.dpdk.org/api/people/477/?format=api",
        "name": "Hemant Agrawal",
        "email": "hemant.agrawal@nxp.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20191018075613.2784-3-hemant.agrawal@nxp.com/mbox/",
    "series": [
        {
            "id": 6930,
            "url": "http://patches.dpdk.org/api/series/6930/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=6930",
            "date": "2019-10-18T07:56:13",
            "name": "crypto/dpaa_sec: enable compilation without security",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/6930/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/61460/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/61460/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4BEEE1C0D0;\n\tFri, 18 Oct 2019 09:59:05 +0200 (CEST)",
            "from inva020.nxp.com (inva020.nxp.com [92.121.34.13])\n\tby dpdk.org (Postfix) with ESMTP id 31D121C0C1\n\tfor <dev@dpdk.org>; Fri, 18 Oct 2019 09:59:03 +0200 (CEST)",
            "from inva020.nxp.com (localhost [127.0.0.1])\n\tby inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 9FB6F1A00AE;\n\tFri, 18 Oct 2019 09:59:02 +0200 (CEST)",
            "from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com\n\t[165.114.16.14])\n\tby inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 06CF81A0021;\n\tFri, 18 Oct 2019 09:59:00 +0200 (CEST)",
            "from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net\n\t[10.232.133.63])\n\tby invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id BCDA240305;\n\tFri, 18 Oct 2019 15:58:56 +0800 (SGT)"
        ],
        "From": "Hemant Agrawal <hemant.agrawal@nxp.com>",
        "To": "dev@dpdk.org",
        "Cc": "akhil.goyal@nxp.com, thierry.herbelot@6wind.com,\n\tHemant Agrawal <hemant.agrawal@nxp.com>",
        "Date": "Fri, 18 Oct 2019 13:26:13 +0530",
        "Message-Id": "<20191018075613.2784-3-hemant.agrawal@nxp.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20191018075613.2784-1-hemant.agrawal@nxp.com>",
        "References": "<20191018075613.2784-1-hemant.agrawal@nxp.com>",
        "X-Virus-Scanned": "ClamAV using ClamSMTP",
        "Subject": "[dpdk-dev] [PATCH] crypto/dpaa_sec: enable compilation without\n\tsecurity",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This patch enables the dpaaX_sec compilation when SECURITY\nis disabled.\n\nSigned-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>\n---\n drivers/crypto/Makefile                     |  4 ++--\n drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 26 +++++++++++++++------\n drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h   | 11 +++++++--\n drivers/crypto/dpaa_sec/dpaa_sec.c          | 25 ++++++++++++++------\n drivers/crypto/dpaa_sec/dpaa_sec.h          | 10 ++++++--\n mk/rte.app.mk                               |  4 ++--\n 6 files changed, 58 insertions(+), 22 deletions(-)",
    "diff": "diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile\nindex 8b0085792..47a2a9e79 100644\n--- a/drivers/crypto/Makefile\n+++ b/drivers/crypto/Makefile\n@@ -16,14 +16,14 @@ DIRS-$(CONFIG_RTE_LIBRTE_PMD_KASUMI) += kasumi\n DIRS-$(CONFIG_RTE_LIBRTE_PMD_ZUC) += zuc\n DIRS-$(CONFIG_RTE_LIBRTE_PMD_MVSAM_CRYPTO) += mvsam\n DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += null\n-ifeq ($(CONFIG_RTE_LIBRTE_SECURITY),y)\n ifeq ($(CONFIG_RTE_EAL_VFIO)$(CONFIG_RTE_LIBRTE_FSLMC_BUS),yy)\n DIRS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) += dpaa2_sec\n endif # CONFIG_RTE_LIBRTE_FSLMC_BUS\n ifeq ($(CONFIG_RTE_LIBRTE_DPAA_BUS),y)\n DIRS-$(CONFIG_RTE_LIBRTE_PMD_DPAA_SEC) += dpaa_sec\n-DIRS-$(CONFIG_RTE_LIBRTE_PMD_CAAM_JR) += caam_jr\n endif # CONFIG_RTE_LIBRTE_PMD_DPAA_SEC\n+ifeq ($(CONFIG_RTE_LIBRTE_SECURITY),y)\n+DIRS-$(CONFIG_RTE_LIBRTE_PMD_CAAM_JR) += caam_jr\n endif # CONFIG_RTE_LIBRTE_SECURITY\n DIRS-$(CONFIG_RTE_LIBRTE_PMD_VIRTIO_CRYPTO) += virtio\n DIRS-$(CONFIG_RTE_LIBRTE_PMD_NITROX) += nitrox\ndiff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c\nindex b33dbca8b..41dbbb7da 100644\n--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c\n+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c\n@@ -166,6 +166,7 @@ build_proto_compound_sg_fd(dpaa2_sec_session *sess,\n \tip_fle->length = in_len;\n \tDPAA2_SET_FLE_FIN(sge);\n \n+#ifdef RTE_LIBRTE_SECURITY\n \t/* In case of PDCP, per packet HFN is stored in\n \t * mbuf priv after sym_op.\n \t */\n@@ -176,6 +177,7 @@ build_proto_compound_sg_fd(dpaa2_sec_session *sess,\n \t\tDPAA2_SET_FLE_INTERNAL_JD(op_fle, hfn_ovd);\n \t\tDPAA2_SET_FD_INTERNAL_JD(fd, hfn_ovd);\n \t}\n+#endif\n \tDPAA2_SET_FD_LEN(fd, ip_fle->length);\n \n \treturn 0;\n@@ -241,6 +243,7 @@ build_proto_compound_fd(dpaa2_sec_session *sess,\n \tDPAA2_SET_FD_LEN(fd, ip_fle->length);\n \tDPAA2_SET_FLE_FIN(ip_fle);\n \n+#ifdef RTE_LIBRTE_SECURITY\n \t/* In case of PDCP, per packet HFN is stored in\n \t * mbuf priv after sym_op.\n \t */\n@@ -251,7 +254,7 @@ build_proto_compound_fd(dpaa2_sec_session *sess,\n \t\tDPAA2_SET_FLE_INTERNAL_JD(op_fle, hfn_ovd);\n \t\tDPAA2_SET_FD_INTERNAL_JD(fd, hfn_ovd);\n \t}\n-\n+#endif\n \treturn 0;\n \n }\n@@ -1358,9 +1361,11 @@ build_sec_fd(struct rte_crypto_op *op,\n \tif (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)\n \t\tsess = (dpaa2_sec_session *)get_sym_session_private_data(\n \t\t\t\top->sym->session, cryptodev_driver_id);\n+#ifdef RTE_LIBRTE_SECURITY\n \telse if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION)\n \t\tsess = (dpaa2_sec_session *)get_sec_session_private_data(\n \t\t\t\top->sym->sec_session);\n+#endif\n \telse\n \t\treturn -1;\n \n@@ -1506,7 +1511,7 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd)\n \tstruct rte_crypto_op *op;\n \tuint16_t len = DPAA2_GET_FD_LEN(fd);\n \tuint16_t diff = 0;\n-\tdpaa2_sec_session *sess_priv;\n+\tdpaa2_sec_session *sess_priv __rte_unused;\n \n \tstruct rte_mbuf *mbuf = DPAA2_INLINE_MBUF_FROM_BUF(\n \t\tDPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)),\n@@ -1519,13 +1524,14 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd)\n \tmbuf->buf_iova = op->sym->aead.digest.phys_addr;\n \top->sym->aead.digest.phys_addr = 0L;\n \n+#ifdef RTE_LIBRTE_SECURITY\n \tsess_priv = (dpaa2_sec_session *)get_sec_session_private_data(\n \t\t\t\top->sym->sec_session);\n \tif (sess_priv->dir == DIR_ENC)\n \t\tmbuf->data_off += SEC_FLC_DHR_OUTBOUND;\n \telse\n \t\tmbuf->data_off += SEC_FLC_DHR_INBOUND;\n-\n+#endif\n \treturn op;\n }\n \n@@ -1569,6 +1575,7 @@ sec_fd_to_mbuf(const struct qbman_fd *fd)\n \t} else\n \t\tdst = src;\n \n+#ifdef RTE_LIBRTE_SECURITY\n \tif (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) {\n \t\tdpaa2_sec_session *sess = (dpaa2_sec_session *)\n \t\t\tget_sec_session_private_data(op->sym->sec_session);\n@@ -1583,7 +1590,7 @@ sec_fd_to_mbuf(const struct qbman_fd *fd)\n \t\t\tdst->data_len = len;\n \t\t}\n \t}\n-\n+#endif\n \tDPAA2_SEC_DP_DEBUG(\"mbuf %p BMAN buf addr %p,\"\n \t\t\" fdaddr =%\" PRIx64 \" bpid =%d meta =%d off =%d, len =%d\\n\",\n \t\t(void *)dst,\n@@ -2500,6 +2507,7 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev,\n \treturn ret;\n }\n \n+#ifdef RTE_LIBRTE_SECURITY\n static int\n dpaa2_sec_ipsec_aead_init(struct rte_crypto_aead_xform *aead_xform,\n \t\t\tdpaa2_sec_session *session,\n@@ -3172,7 +3180,7 @@ dpaa2_sec_security_session_destroy(void *dev __rte_unused,\n \t}\n \treturn 0;\n }\n-\n+#endif\n static int\n dpaa2_sec_sym_session_configure(struct rte_cryptodev *dev,\n \t\tstruct rte_crypto_sym_xform *xform,\n@@ -3561,6 +3569,7 @@ static struct rte_cryptodev_ops crypto_ops = {\n \t.sym_session_clear        = dpaa2_sec_sym_session_clear,\n };\n \n+#ifdef RTE_LIBRTE_SECURITY\n static const struct rte_security_capability *\n dpaa2_sec_capabilities_get(void *device __rte_unused)\n {\n@@ -3575,6 +3584,7 @@ static const struct rte_security_ops dpaa2_sec_security_ops = {\n \t.set_pkt_metadata = NULL,\n \t.capabilities_get = dpaa2_sec_capabilities_get\n };\n+#endif\n \n static int\n dpaa2_sec_uninit(const struct rte_cryptodev *dev)\n@@ -3597,7 +3607,9 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)\n \tstruct dpaa2_sec_dev_private *internals;\n \tstruct rte_device *dev = cryptodev->device;\n \tstruct rte_dpaa2_device *dpaa2_dev;\n+#ifdef RTE_LIBRTE_SECURITY\n \tstruct rte_security_ctx *security_instance;\n+#endif\n \tstruct fsl_mc_io *dpseci;\n \tuint16_t token;\n \tstruct dpseci_attr attr;\n@@ -3638,7 +3650,7 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)\n \t\tDPAA2_SEC_DEBUG(\"Device already init by primary process\");\n \t\treturn 0;\n \t}\n-\n+#ifdef RTE_LIBRTE_SECURITY\n \t/* Initialize security_ctx only for primary process*/\n \tsecurity_instance = rte_malloc(\"rte_security_instances_ops\",\n \t\t\t\tsizeof(struct rte_security_ctx), 0);\n@@ -3648,7 +3660,7 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)\n \tsecurity_instance->ops = &dpaa2_sec_security_ops;\n \tsecurity_instance->sess_cnt = 0;\n \tcryptodev->security_ctx = security_instance;\n-\n+#endif\n \t/*Open the rte device via MC and save the handle for further use*/\n \tdpseci = (struct fsl_mc_io *)rte_calloc(NULL, 1,\n \t\t\t\tsizeof(struct fsl_mc_io), 0);\ndiff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h\nindex ca4fcfe9b..648bf8045 100644\n--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h\n+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h\n@@ -8,7 +8,9 @@\n #ifndef _RTE_DPAA2_SEC_PMD_PRIVATE_H_\n #define _RTE_DPAA2_SEC_PMD_PRIVATE_H_\n \n+#ifdef RTE_LIBRTE_SECURITY\n #include <rte_security_driver.h>\n+#endif\n \n #define CRYPTODEV_NAME_DPAA2_SEC_PMD\tcrypto_dpaa2_sec\n /**< NXP DPAA2 - SEC PMD device name */\n@@ -139,6 +141,7 @@ struct dpaa2_sec_aead_ctxt {\n \tuint8_t auth_cipher_text;       /**< Authenticate/cipher ordering */\n };\n \n+#ifdef RTE_LIBRTE_SECURITY\n /*\n  * The structure is to be filled by user for PDCP Protocol\n  */\n@@ -154,7 +157,7 @@ struct dpaa2_pdcp_ctxt {\n \tuint32_t hfn;\t/*!< Hyper Frame Number */\n \tuint32_t hfn_threshold;\t/*!< HFN Threashold for key renegotiation */\n };\n-\n+#endif\n typedef struct dpaa2_sec_session_entry {\n \tvoid *ctxt;\n \tuint8_t ctxt_type;\n@@ -190,7 +193,9 @@ typedef struct dpaa2_sec_session_entry {\n \t\t\t\tstruct dpaa2_sec_aead_ctxt aead_ctxt;\n \t\t\t} ext_params;\n \t\t};\n+#ifdef RTE_LIBRTE_SECURITY\n \t\tstruct dpaa2_pdcp_ctxt pdcp;\n+#endif\n \t};\n } dpaa2_sec_session;\n \n@@ -504,6 +509,8 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {\n \tRTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()\n };\n \n+#ifdef RTE_LIBRTE_SECURITY\n+\n static const struct rte_cryptodev_capabilities dpaa2_pdcp_capabilities[] = {\n \t{\t/* SNOW 3G (UIA2) */\n \t\t.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,\n@@ -705,7 +712,7 @@ static const struct rte_security_capability dpaa2_sec_security_cap[] = {\n \t\t.action = RTE_SECURITY_ACTION_TYPE_NONE\n \t}\n };\n-\n+#endif\n /**\n  * Checksum\n  *\ndiff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c\nindex 7c37136fa..4adaadf5f 100644\n--- a/drivers/crypto/dpaa_sec/dpaa_sec.c\n+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c\n@@ -15,7 +15,9 @@\n #include <rte_cryptodev_pmd.h>\n #include <rte_crypto.h>\n #include <rte_cryptodev.h>\n+#ifdef RTE_LIBRTE_SECURITY\n #include <rte_security_driver.h>\n+#endif\n #include <rte_cycles.h>\n #include <rte_dev.h>\n #include <rte_kvargs.h>\n@@ -252,6 +254,7 @@ static inline int is_decode(dpaa_sec_session *ses)\n \treturn ses->dir == DIR_DEC;\n }\n \n+#ifdef RTE_LIBRTE_SECURITY\n static int\n dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses)\n {\n@@ -355,7 +358,6 @@ dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses)\n \t\t\t\t\tses->pdcp.hfn_threshold,\n \t\t\t\t\t&cipherdata, p_authdata, 0);\n \t}\n-\n \treturn shared_desc_len;\n }\n \n@@ -432,7 +434,7 @@ dpaa_sec_prep_ipsec_cdb(dpaa_sec_session *ses)\n \t}\n \treturn shared_desc_len;\n }\n-\n+#endif\n /* prepare command block of the session */\n static int\n dpaa_sec_prep_cdb(dpaa_sec_session *ses)\n@@ -450,12 +452,14 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses)\n \tmemset(cdb, 0, sizeof(struct sec_cdb));\n \n \tswitch (ses->ctxt) {\n+#ifdef RTE_LIBRTE_SECURITY\n \tcase DPAA_SEC_IPSEC:\n \t\tshared_desc_len = dpaa_sec_prep_ipsec_cdb(ses);\n \t\tbreak;\n \tcase DPAA_SEC_PDCP:\n \t\tshared_desc_len = dpaa_sec_prep_pdcp_cdb(ses);\n \t\tbreak;\n+#endif\n \tcase DPAA_SEC_CIPHER:\n \t\talginfo_c.key = (size_t)ses->cipher_key.data;\n \t\talginfo_c.keylen = ses->cipher_key.length;\n@@ -1753,11 +1757,13 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,\n \t\t\t\t\t\t\top->sym->session,\n \t\t\t\t\t\t\tcryptodev_driver_id);\n \t\t\t\tbreak;\n+#ifdef RTE_LIBRTE_SECURITY\n \t\t\tcase RTE_CRYPTO_OP_SECURITY_SESSION:\n \t\t\t\tses = (dpaa_sec_session *)\n \t\t\t\t\tget_sec_session_private_data(\n \t\t\t\t\t\t\top->sym->sec_session);\n \t\t\t\tbreak;\n+#endif\n \t\t\tdefault:\n \t\t\t\tDPAA_SEC_DP_ERR(\n \t\t\t\t\t\"sessionless crypto op not supported\");\n@@ -1877,6 +1883,7 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,\n \t\t\t\t\t((auth_tail_len << 16) | auth_hdr_len);\n \t\t\t}\n \n+#ifdef RTE_LIBRTE_SECURITY\n \t\t\t/* In case of PDCP, per packet HFN is stored in\n \t\t\t * mbuf priv after sym_op.\n \t\t\t */\n@@ -1889,7 +1896,7 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,\n \t\t\t\t\tses->pdcp.hfn_ovd_offset)),\n \t\t\t\t\tses->pdcp.hfn_ovd);\n \t\t\t}\n-\n+#endif\n \t\t}\n send_pkts:\n \t\tloop = 0;\n@@ -2483,6 +2490,7 @@ dpaa_sec_sym_session_clear(struct rte_cryptodev *dev,\n \t}\n }\n \n+#ifdef RTE_LIBRTE_SECURITY\n static int\n dpaa_sec_set_ipsec_session(__rte_unused struct rte_cryptodev *dev,\n \t\t\t   struct rte_security_session_conf *conf,\n@@ -2906,7 +2914,7 @@ dpaa_sec_security_session_destroy(void *dev __rte_unused,\n \t}\n \treturn 0;\n }\n-\n+#endif\n static int\n dpaa_sec_dev_configure(struct rte_cryptodev *dev __rte_unused,\n \t\t       struct rte_cryptodev_config *config __rte_unused)\n@@ -3152,6 +3160,7 @@ static struct rte_cryptodev_ops crypto_ops = {\n \t.sym_session_clear        = dpaa_sec_sym_session_clear\n };\n \n+#ifdef RTE_LIBRTE_SECURITY\n static const struct rte_security_capability *\n dpaa_sec_capabilities_get(void *device __rte_unused)\n {\n@@ -3166,7 +3175,7 @@ static const struct rte_security_ops dpaa_sec_security_ops = {\n \t.set_pkt_metadata = NULL,\n \t.capabilities_get = dpaa_sec_capabilities_get\n };\n-\n+#endif\n static int\n dpaa_sec_uninit(struct rte_cryptodev *dev)\n {\n@@ -3190,7 +3199,9 @@ static int\n dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)\n {\n \tstruct dpaa_sec_dev_private *internals;\n+#ifdef RTE_LIBRTE_SECURITY\n \tstruct rte_security_ctx *security_instance;\n+#endif\n \tstruct dpaa_sec_qp *qp;\n \tuint32_t i, flags;\n \tint ret;\n@@ -3225,7 +3236,7 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)\n \t\tDPAA_SEC_WARN(\"Device already init by primary process\");\n \t\treturn 0;\n \t}\n-\n+#ifdef RTE_LIBRTE_SECURITY\n \t/* Initialize security_ctx only for primary process*/\n \tsecurity_instance = rte_malloc(\"rte_security_instances_ops\",\n \t\t\t\tsizeof(struct rte_security_ctx), 0);\n@@ -3235,7 +3246,7 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)\n \tsecurity_instance->ops = &dpaa_sec_security_ops;\n \tsecurity_instance->sess_cnt = 0;\n \tcryptodev->security_ctx = security_instance;\n-\n+#endif\n \trte_spinlock_init(&internals->lock);\n \tfor (i = 0; i < internals->max_nb_queue_pairs; i++) {\n \t\t/* init qman fq for queue pair */\ndiff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h\nindex a661d5a56..85aa6f6a0 100644\n--- a/drivers/crypto/dpaa_sec/dpaa_sec.h\n+++ b/drivers/crypto/dpaa_sec/dpaa_sec.h\n@@ -98,7 +98,7 @@ struct sec_cdb {\n \n \tuint32_t sh_desc[DPAA_SEC_MAX_DESC_SIZE];\n };\n-\n+#ifdef RTE_LIBRTE_SECURITY\n /*!\n  * The structure is to be filled by user as a part of\n  * dpaa_sec_proto_ctxt for PDCP Protocol\n@@ -115,14 +115,16 @@ struct sec_pdcp_ctxt {\n \tuint32_t hfn;\t/*!< Hyper Frame Number */\n \tuint32_t hfn_threshold;\t/*!< HFN Threashold for key renegotiation */\n };\n-\n+#endif\n typedef struct dpaa_sec_session_entry {\n \tuint8_t dir;         /*!< Operation Direction */\n \tuint8_t ctxt;\t/*!< Session Context Type */\n \tenum rte_crypto_cipher_algorithm cipher_alg; /*!< Cipher Algorithm*/\n \tenum rte_crypto_auth_algorithm auth_alg; /*!< Authentication Algorithm*/\n \tenum rte_crypto_aead_algorithm aead_alg; /*!< AEAD Algorithm*/\n+#ifdef RTE_LIBRTE_SECURITY\n \tenum rte_security_session_protocol proto_alg; /*!< Security Algorithm*/\n+#endif\n \tunion {\n \t\tstruct {\n \t\t\tuint8_t *data;\t/**< pointer to key data */\n@@ -163,7 +165,9 @@ typedef struct dpaa_sec_session_entry {\n \t\t\tuint8_t auth_cipher_text;\n \t\t\t\t/**< Authenticate/cipher ordering */\n \t\t};\n+#ifdef RTE_LIBRTE_SECURITY\n \t\tstruct sec_pdcp_ctxt pdcp;\n+#endif\n \t};\n \tstruct dpaa_sec_qp *qp[MAX_DPAA_CORES];\n \tstruct qman_fq *inq[MAX_DPAA_CORES];\n@@ -679,6 +683,7 @@ static const struct rte_cryptodev_capabilities dpaa_pdcp_capabilities[] = {\n \tRTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()\n };\n \n+#ifdef RTE_LIBRTE_SECURITY\n static const struct rte_security_capability dpaa_sec_security_cap[] = {\n \t{ /* IPsec Lookaside Protocol offload ESP Transport Egress */\n \t\t.action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL,\n@@ -722,6 +727,7 @@ static const struct rte_security_capability dpaa_sec_security_cap[] = {\n \t\t.action = RTE_SECURITY_ACTION_TYPE_NONE\n \t}\n };\n+#endif\n \n /**\n  * Checksum\ndiff --git a/mk/rte.app.mk b/mk/rte.app.mk\nindex e79f16e28..063c4605b 100644\n--- a/mk/rte.app.mk\n+++ b/mk/rte.app.mk\n@@ -275,14 +275,14 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NITROX)      += -lrte_pmd_nitrox\n _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_CRYPTO) += -lrte_pmd_octeontx_crypto\n _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_CRYPTO) += -lrte_pmd_octeontx2_crypto\n _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER) += -lrte_pmd_crypto_scheduler\n-ifeq ($(CONFIG_RTE_LIBRTE_SECURITY),y)\n ifeq ($(CONFIG_RTE_EAL_VFIO)$(CONFIG_RTE_LIBRTE_FSLMC_BUS),yy)\n _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC)   += -lrte_pmd_dpaa2_sec\n endif # CONFIG_RTE_LIBRTE_FSLMC_BUS\n ifeq ($(CONFIG_RTE_LIBRTE_DPAA_BUS),y)\n _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_DPAA_SEC)   += -lrte_pmd_dpaa_sec\n-_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_CAAM_JR)   += -lrte_pmd_caam_jr\n endif # CONFIG_RTE_LIBRTE_DPAA_BUS\n+ifeq ($(CONFIG_RTE_LIBRTE_SECURITY),y)\n+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_CAAM_JR)   += -lrte_pmd_caam_jr\n endif # CONFIG_RTE_LIBRTE_SECURITY\n _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_VIRTIO_CRYPTO) += -lrte_pmd_virtio_crypto\n endif # CONFIG_RTE_LIBRTE_CRYPTODEV\n",
    "prefixes": []
}