get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 128825,
    "url": "http://patchwork.dpdk.org/api/patches/128825/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230620075251.103491-4-maxime.coquelin@redhat.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20230620075251.103491-4-maxime.coquelin@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230620075251.103491-4-maxime.coquelin@redhat.com",
    "date": "2023-06-20T07:52:48",
    "name": "[v2,3/6] crypto/dpaa2_sec: remove security lib presence checks",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "6a7bb6175984562e5844f2a6729dc5f18d6b6b60",
    "submitter": {
        "id": 512,
        "url": "http://patchwork.dpdk.org/api/people/512/?format=api",
        "name": "Maxime Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patchwork.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230620075251.103491-4-maxime.coquelin@redhat.com/mbox/",
    "series": [
        {
            "id": 28572,
            "url": "http://patchwork.dpdk.org/api/series/28572/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28572",
            "date": "2023-06-20T07:52:45",
            "name": "Trivial crypto PMDs cleanup",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/28572/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/128825/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/128825/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 3285542D04;\n\tTue, 20 Jun 2023 09:53:14 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 7B10C42D0C;\n\tTue, 20 Jun 2023 09:53:07 +0200 (CEST)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by mails.dpdk.org (Postfix) with ESMTP id 0927442BD9\n for <dev@dpdk.org>; Tue, 20 Jun 2023 09:53:04 +0200 (CEST)",
            "from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n us-mta-609-DHYK5oEpMFOat1aJJak69Q-1; Tue, 20 Jun 2023 03:53:03 -0400",
            "from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com\n [10.11.54.4])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6EF22806000;\n Tue, 20 Jun 2023 07:53:02 +0000 (UTC)",
            "from max-t490s.redhat.com (unknown [10.39.208.22])\n by smtp.corp.redhat.com (Postfix) with ESMTP id C2F51200A398;\n Tue, 20 Jun 2023 07:53:00 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1687247584;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=xV8TmmP4XHKA7Jqawnz4MfCjTwm3mfM56LEv5Qk6ThY=;\n b=giJz/ui+335wMCCl+SMC2dUtNpO3NGqXJzj5nX6ffMriSiPx6yJ94Kc2rDZM1u2R7gtwqY\n iXzjNVPZITCglLTyDh7xqwUahKCeSmHHhsZ3y6O+CEJhkZmHHV5TxfHXDKIpte42rZIvj1\n y36YtHiL8F716xP7XypfQ9EeQEp6KLs=",
        "X-MC-Unique": "DHYK5oEpMFOat1aJJak69Q-1",
        "From": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "To": "dev@dpdk.org, kai.ji@intel.com, g.singh@nxp.com, hemant.agrawal@nxp.com,\n pablo.de.lara.guarch@intel.com, fanzhang.oss@gmail.com,\n roretzla@linux.microsoft.com",
        "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "Subject": "[PATCH v2 3/6] crypto/dpaa2_sec: remove security lib presence checks",
        "Date": "Tue, 20 Jun 2023 09:52:48 +0200",
        "Message-ID": "<20230620075251.103491-4-maxime.coquelin@redhat.com>",
        "In-Reply-To": "<20230620075251.103491-1-maxime.coquelin@redhat.com>",
        "References": "<20230620075251.103491-1-maxime.coquelin@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.1 on 10.11.54.4",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Since security library is a required dependency for\nbuilding DPAA2 crypto PMD, remove useless #ifdefs around\nrte_security APIs calls.\n\nAcked-by: Hemant Agrawal <hemant.agrawal@nxp.com>\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 36 ++++++---------------\n drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h   |  9 ------\n 2 files changed, 9 insertions(+), 36 deletions(-)",
    "diff": "diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c\nindex 392bf74856..5ccfcbd7a6 100644\n--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c\n+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c\n@@ -70,10 +70,9 @@ free_fle(const struct qbman_fd *fd, struct dpaa2_sec_qp *qp)\n \tstruct qbman_fle *fle;\n \tstruct rte_crypto_op *op;\n \n-#ifdef RTE_LIB_SECURITY\n \tif (DPAA2_FD_GET_FORMAT(fd) == qbman_fd_single)\n \t\treturn;\n-#endif\n+\n \tfle = (struct qbman_fle *)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd));\n \top = (struct rte_crypto_op *)DPAA2_GET_FLE_ADDR((fle - 1));\n \t/* free the fle memory */\n@@ -83,7 +82,6 @@ free_fle(const struct qbman_fd *fd, struct dpaa2_sec_qp *qp)\n \t\trte_free((void *)(fle-1));\n }\n \n-#ifdef RTE_LIB_SECURITY\n static inline int\n build_proto_compound_sg_fd(dpaa2_sec_session *sess,\n \t\t\t   struct rte_crypto_op *op,\n@@ -309,7 +307,6 @@ build_proto_fd(dpaa2_sec_session *sess,\n \n \treturn 0;\n }\n-#endif\n \n static inline int\n build_authenc_gcm_sg_fd(dpaa2_sec_session *sess,\n@@ -1378,13 +1375,11 @@ build_sec_fd(struct rte_crypto_op *op,\n \tint ret = -1;\n \tdpaa2_sec_session *sess;\n \n-\tif (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)\n+\tif (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {\n \t\tsess = CRYPTODEV_GET_SYM_SESS_PRIV(op->sym->session);\n-#ifdef RTE_LIB_SECURITY\n-\telse if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION)\n+\t} else if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) {\n \t\tsess = SECURITY_GET_SESS_PRIV(op->sym->session);\n-#endif\n-\telse {\n+\t} else {\n \t\tDPAA2_SEC_DP_ERR(\"Session type invalid\\n\");\n \t\treturn -ENOTSUP;\n \t}\n@@ -1411,12 +1406,10 @@ build_sec_fd(struct rte_crypto_op *op,\n \t\tcase DPAA2_SEC_CIPHER_HASH:\n \t\t\tret = build_authenc_sg_fd(sess, op, fd, bpid);\n \t\t\tbreak;\n-#ifdef RTE_LIB_SECURITY\n \t\tcase DPAA2_SEC_IPSEC:\n \t\tcase DPAA2_SEC_PDCP:\n \t\t\tret = build_proto_compound_sg_fd(sess, op, fd, bpid);\n \t\t\tbreak;\n-#endif\n \t\tcase DPAA2_SEC_HASH_CIPHER:\n \t\tdefault:\n \t\t\tDPAA2_SEC_ERR(\"error: Unsupported session\");\n@@ -1435,14 +1428,12 @@ build_sec_fd(struct rte_crypto_op *op,\n \t\tcase DPAA2_SEC_CIPHER_HASH:\n \t\t\tret = build_authenc_fd(sess, op, fd, bpid, qp);\n \t\t\tbreak;\n-#ifdef RTE_LIB_SECURITY\n \t\tcase DPAA2_SEC_IPSEC:\n \t\t\tret = build_proto_fd(sess, op, fd, bpid, qp);\n \t\t\tbreak;\n \t\tcase DPAA2_SEC_PDCP:\n \t\t\tret = build_proto_compound_fd(sess, op, fd, bpid, qp);\n \t\t\tbreak;\n-#endif\n \t\tcase DPAA2_SEC_HASH_CIPHER:\n \t\tdefault:\n \t\t\tDPAA2_SEC_ERR(\"error: Unsupported session\");\n@@ -1558,7 +1549,6 @@ dpaa2_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,\n \treturn num_tx;\n }\n \n-#ifdef RTE_LIB_SECURITY\n static inline struct rte_crypto_op *\n sec_simple_fd_to_mbuf(const struct qbman_fd *fd)\n {\n@@ -1598,7 +1588,6 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd)\n \n \treturn op;\n }\n-#endif\n \n static inline struct rte_crypto_op *\n sec_fd_to_mbuf(const struct qbman_fd *fd, struct dpaa2_sec_qp *qp)\n@@ -1607,10 +1596,9 @@ sec_fd_to_mbuf(const struct qbman_fd *fd, struct dpaa2_sec_qp *qp)\n \tstruct rte_crypto_op *op;\n \tstruct rte_mbuf *dst, *src;\n \n-#ifdef RTE_LIB_SECURITY\n \tif (DPAA2_FD_GET_FORMAT(fd) == qbman_fd_single)\n \t\treturn sec_simple_fd_to_mbuf(fd);\n-#endif\n+\n \tfle = (struct qbman_fle *)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd));\n \n \tDPAA2_SEC_DP_DEBUG(\"FLE addr = %x - %x, offset = %x\\n\",\n@@ -1635,7 +1623,6 @@ sec_fd_to_mbuf(const struct qbman_fd *fd, struct dpaa2_sec_qp *qp)\n \t} else\n \t\tdst = src;\n \n-#ifdef RTE_LIB_SECURITY\n \tif (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) {\n \t\tuint16_t len = DPAA2_GET_FD_LEN(fd);\n \t\tdst->pkt_len = len;\n@@ -1645,7 +1632,7 @@ sec_fd_to_mbuf(const struct qbman_fd *fd, struct dpaa2_sec_qp *qp)\n \t\t}\n \t\tdst->data_len = len;\n \t}\n-#endif\n+\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@@ -2916,7 +2903,6 @@ dpaa2_sec_set_session_parameters(struct rte_crypto_sym_xform *xform, void *sess)\n \treturn ret;\n }\n \n-#ifdef RTE_LIB_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@@ -3739,7 +3725,7 @@ dpaa2_sec_security_session_get_size(void *device __rte_unused)\n {\n \treturn sizeof(dpaa2_sec_session);\n }\n-#endif\n+\n static int\n dpaa2_sec_sym_session_configure(struct rte_cryptodev *dev __rte_unused,\n \t\tstruct rte_crypto_sym_xform *xform,\n@@ -4180,7 +4166,6 @@ static struct rte_cryptodev_ops crypto_ops = {\n \t.sym_configure_raw_dp_ctx = dpaa2_sec_configure_raw_dp_ctx,\n };\n \n-#ifdef RTE_LIB_SECURITY\n static const struct rte_security_capability *\n dpaa2_sec_capabilities_get(void *device __rte_unused)\n {\n@@ -4196,7 +4181,6 @@ 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@@ -4285,9 +4269,7 @@ 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_LIB_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@@ -4324,7 +4306,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-#ifdef RTE_LIB_SECURITY\n+\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@@ -4334,7 +4316,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-#endif\n+\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 63f4c64aab..f84d2caf43 100644\n--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h\n+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h\n@@ -8,9 +8,7 @@\n #ifndef _DPAA2_SEC_PMD_PRIVATE_H_\n #define _DPAA2_SEC_PMD_PRIVATE_H_\n \n-#ifdef RTE_LIB_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@@ -152,7 +150,6 @@ struct dpaa2_sec_aead_ctxt {\n \tuint8_t auth_cipher_text;       /**< Authenticate/cipher ordering */\n };\n \n-#ifdef RTE_LIB_SECURITY\n /*\n  * The structure is to be filled by user for PDCP Protocol\n  */\n@@ -168,7 +165,6 @@ 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-#endif\n \n typedef int (*dpaa2_sec_build_fd_t)(\n \tvoid *qp, uint8_t *drv_ctx, struct rte_crypto_vec *data_vec,\n@@ -225,9 +221,7 @@ 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_LIB_SECURITY\n \t\tstruct dpaa2_pdcp_ctxt pdcp;\n-#endif\n \t};\n } dpaa2_sec_session;\n \n@@ -732,8 +726,6 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {\n \tRTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()\n };\n \n-#ifdef RTE_LIB_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@@ -946,7 +938,6 @@ static const struct rte_security_capability dpaa2_sec_security_cap[] = {\n \t\t.action = RTE_SECURITY_ACTION_TYPE_NONE\n \t}\n };\n-#endif\n /**\n  * Checksum\n  *\n",
    "prefixes": [
        "v2",
        "3/6"
    ]
}