get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 127603,
    "url": "http://patchwork.dpdk.org/api/patches/127603/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230527085910.972-4-anoobj@marvell.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": "<20230527085910.972-4-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230527085910.972-4-anoobj@marvell.com",
    "date": "2023-05-27T08:58:52",
    "name": "[v5,03/21] pdcp: add pre and post-process",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "839864568cc0a1756a816931626393c311b002d0",
    "submitter": {
        "id": 1205,
        "url": "http://patchwork.dpdk.org/api/people/1205/?format=api",
        "name": "Anoob Joseph",
        "email": "anoobj@marvell.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/20230527085910.972-4-anoobj@marvell.com/mbox/",
    "series": [
        {
            "id": 28216,
            "url": "http://patchwork.dpdk.org/api/series/28216/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28216",
            "date": "2023-05-27T08:58:50",
            "name": "lib: add pdcp protocol",
            "version": 5,
            "mbox": "http://patchwork.dpdk.org/series/28216/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/127603/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/127603/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 6325B42BB3;\n\tSat, 27 May 2023 11:52:34 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 0B34242D31;\n\tSat, 27 May 2023 11:52:32 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 724CC42D20\n for <dev@dpdk.org>; Sat, 27 May 2023 11:52:31 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 34R9Wx30028283; Sat, 27 May 2023 02:52:30 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3quaj6rkfp-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Sat, 27 May 2023 02:52:30 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Sat, 27 May 2023 02:52:28 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Sat, 27 May 2023 02:52:28 -0700",
            "from BG-LT92004.corp.innovium.com (unknown [10.193.65.175])\n by maili.marvell.com (Postfix) with ESMTP id D82345E72D2;\n Sat, 27 May 2023 01:59:28 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=MI38ArqG2voH1chMqPSYLa6ynPBOlIqBXzs98UEEYPo=;\n b=bDvVXRUjC63ddNPpv4jPuuqotBta7i6y51nIHcAx0ALE9Q016R4ST/2xBjwJYlJoY/Kk\n 5QCbbLh1MHTb8U9FYL3wt4C/6gzB3JldwXl9RPNb2TbGEdiY1m3uMpySSOrfp4xqomsZ\n cMrvJdlGnoljbAHtiVJJTX6Fz1a54tDR0Z6kJwDUGvMnAJseFfvXcfBtasXhnz2N7Mv4\n qbiRiFXNbT10C4yRMZqJ6nuimGLDSA2bnDrwYvJbLvolyljXaBA3IAHUHxnOzuG/hmO2\n WYskkQxhHOBecFrGtPIsQNrIL5V4tc2kqH1bgGKrKvhLlCY78DcQJmg2U1axdwpZLHBe YQ==",
        "From": "Anoob Joseph <anoobj@marvell.com>",
        "To": "Thomas Monjalon <thomas@monjalon.net>, Akhil Goyal <gakhil@marvell.com>,\n Jerin Jacob <jerinj@marvell.com>, Konstantin Ananyev\n <konstantin.v.ananyev@yandex.ru>",
        "CC": "Hemant Agrawal <hemant.agrawal@nxp.com>,\n =?utf-8?q?Mattias_R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>,\n \"Kiran Kumar K\" <kirankumark@marvell.com>,\n Volodymyr Fialko <vfialko@marvell.com>, <dev@dpdk.org>,\n Olivier Matz <olivier.matz@6wind.com>,\n Stephen Hemminger <stephen@networkplumber.org>",
        "Subject": "[PATCH v5 03/21] pdcp: add pre and post-process",
        "Date": "Sat, 27 May 2023 14:28:52 +0530",
        "Message-ID": "<20230527085910.972-4-anoobj@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230527085910.972-1-anoobj@marvell.com>",
        "References": "<20230526210214.617-1-anoobj@marvell.com>\n <20230527085910.972-1-anoobj@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "Zosm6r-9_mPJXdUeSwLbP_oDlDFb42sg",
        "X-Proofpoint-ORIG-GUID": "Zosm6r-9_mPJXdUeSwLbP_oDlDFb42sg",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26\n definitions=2023-05-27_06,2023-05-25_03,2023-05-22_02",
        "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": "PDCP process is split into 2 parts. One before crypto processing\n(rte_pdcp_pkt_pre_process()) and one after crypto processing\n(rte_pdcp_pkt_post_process()). Functionality of pre-process &\npost-process varies based on the type of entity. Registration of entity\nspecific function pointer allows skipping multiple checks that would\ncome in datapath otherwise.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\nSigned-off-by: Kiran Kumar K <kirankumark@marvell.com>\nSigned-off-by: Volodymyr Fialko <vfialko@marvell.com>\nAcked-by: Akhil Goyal <gakhil@marvell.com>\n---\n lib/pdcp/rte_pdcp.h  | 97 ++++++++++++++++++++++++++++++++++++++++++++\n lib/pdcp/version.map |  3 ++\n 2 files changed, 100 insertions(+)",
    "diff": "diff --git a/lib/pdcp/rte_pdcp.h b/lib/pdcp/rte_pdcp.h\nindex 1f96fdc9a1..46c3c2a416 100644\n--- a/lib/pdcp/rte_pdcp.h\n+++ b/lib/pdcp/rte_pdcp.h\n@@ -22,6 +22,21 @@\n extern \"C\" {\n #endif\n \n+/* Forward declarations */\n+struct rte_pdcp_entity;\n+\n+/* PDCP pre-process function based on entity configuration */\n+typedef uint16_t (*rte_pdcp_pre_p_t)(const struct rte_pdcp_entity *entity,\n+\t\t\t\t     struct rte_mbuf *mb[],\n+\t\t\t\t     struct rte_crypto_op *cop[],\n+\t\t\t\t     uint16_t num, uint16_t *nb_err);\n+\n+/* PDCP post-process function based on entity configuration */\n+typedef uint16_t (*rte_pdcp_post_p_t)(const struct rte_pdcp_entity *entity,\n+\t\t\t\t      struct rte_mbuf *in_mb[],\n+\t\t\t\t      struct rte_mbuf *out_mb[],\n+\t\t\t\t      uint16_t num, uint16_t *nb_err);\n+\n /**\n  * PDCP entity.\n  *\n@@ -33,6 +48,10 @@ extern \"C\" {\n  * plane depending on which radio bearer it is carrying data for.\n  */\n struct rte_pdcp_entity {\n+\t/** Entity specific pre-process handle. */\n+\trte_pdcp_pre_p_t pre_process;\n+\t/** Entity specific post-process handle. */\n+\trte_pdcp_post_p_t post_process;\n \t/**\n \t * PDCP entities may hold packets for purposes of in-order delivery (in\n \t * case of receiving PDCP entity) and re-transmission (in case of\n@@ -160,6 +179,84 @@ int\n rte_pdcp_entity_suspend(struct rte_pdcp_entity *pdcp_entity,\n \t\t\tstruct rte_mbuf *out_mb[]);\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice\n+ *\n+ * For input mbufs and given PDCP entity pre-process the mbufs and prepare\n+ * crypto ops that can be enqueued to the cryptodev associated with given\n+ * session. Only error packets would be moved returned in the input buffer,\n+ * *mb*, and it is the responsibility of the application to free the same.\n+ *\n+ * @param entity\n+ *   Pointer to the *rte_pdcp_entity* object the packets belong to.\n+ * @param[in, out] mb\n+ *   The address of an array of *num* pointers to *rte_mbuf* structures\n+ *   which contain the input packets. Any error packets would be returned in the\n+ *   same buffer.\n+ * @param[out] cop\n+ *   The address of an array that can hold up to *num* pointers to\n+ *   *rte_crypto_op* structures. Crypto ops would be allocated by\n+ *   ``rte_pdcp_pkt_pre_process`` API.\n+ * @param num\n+ *   The maximum number of packets to process.\n+ * @param[out] nb_err\n+ *   Pointer to return the number of error packets returned in *mb*\n+ * @return\n+ *   Count of crypto_ops prepared\n+ */\n+__rte_experimental\n+static inline uint16_t\n+rte_pdcp_pkt_pre_process(const struct rte_pdcp_entity *entity,\n+\t\t\t struct rte_mbuf *mb[], struct rte_crypto_op *cop[],\n+\t\t\t uint16_t num, uint16_t *nb_err)\n+{\n+\treturn entity->pre_process(entity, mb, cop, num, nb_err);\n+}\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice\n+ *\n+ * For input mbufs and given PDCP entity, perform PDCP post-processing of the\n+ * mbufs.\n+ *\n+ * Input mbufs are the ones retrieved from crypto_ops dequeued from cryptodev\n+ * and grouped by *rte_pdcp_pkt_crypto_group()*.\n+ *\n+ * The post-processed packets would be returned in the *out_mb* buffer.\n+ * The resultant mbufs would be grouped into success packets and error packets.\n+ * Error packets would be grouped in the end of the array and it is the\n+ * responsibility of the application to handle the same.\n+ *\n+ * When in-order delivery is enabled, PDCP entity may buffer packets and would\n+ * deliver packets only when all prior packets have been post-processed. That\n+ * would result in returning more/less packets than enqueued.\n+ *\n+ * @param entity\n+ *   Pointer to the *rte_pdcp_entity* object the packets belong to.\n+ * @param in_mb\n+ *   The address of an array of *num* pointers to *rte_mbuf* structures.\n+ * @param[out] out_mb\n+ *   The address of an array of *num* pointers to *rte_mbuf* structures\n+ *   to output packets after PDCP post-processing.\n+ * @param num\n+ *   The maximum number of packets to process.\n+ * @param[out] nb_err\n+ *   The number of error packets returned in *out_mb* buffer.\n+ * @return\n+ *   Count of packets returned in *out_mb* buffer.\n+ */\n+__rte_experimental\n+static inline uint16_t\n+rte_pdcp_pkt_post_process(const struct rte_pdcp_entity *entity,\n+\t\t\t  struct rte_mbuf *in_mb[],\n+\t\t\t  struct rte_mbuf *out_mb[],\n+\t\t\t  uint16_t num, uint16_t *nb_err)\n+{\n+\treturn entity->post_process(entity, in_mb, out_mb, num, nb_err);\n+}\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/pdcp/version.map b/lib/pdcp/version.map\nindex 923e165f3f..f9ff30600a 100644\n--- a/lib/pdcp/version.map\n+++ b/lib/pdcp/version.map\n@@ -6,5 +6,8 @@ EXPERIMENTAL {\n \trte_pdcp_entity_release;\n \trte_pdcp_entity_suspend;\n \n+\trte_pdcp_pkt_post_process;\n+\trte_pdcp_pkt_pre_process;\n+\n \tlocal: *;\n };\n",
    "prefixes": [
        "v5",
        "03/21"
    ]
}