Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/127334/?format=api
https://patches.dpdk.org/api/patches/127334/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230524160116.304-4-anoobj@marvell.com/", "project": { "id": 1, "url": "https://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": "<20230524160116.304-4-anoobj@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230524160116.304-4-anoobj@marvell.com", "date": "2023-05-24T16:00:57", "name": "[v3,03/22] pdcp: add pre and post-process", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "839864568cc0a1756a816931626393c311b002d0", "submitter": { "id": 1205, "url": "https://patches.dpdk.org/api/people/1205/?format=api", "name": "Anoob Joseph", "email": "anoobj@marvell.com" }, "delegate": { "id": 6690, "url": "https://patches.dpdk.org/api/users/6690/?format=api", "username": "akhil", "first_name": "akhil", "last_name": "goyal", "email": "gakhil@marvell.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230524160116.304-4-anoobj@marvell.com/mbox/", "series": [ { "id": 28158, "url": "https://patches.dpdk.org/api/series/28158/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=28158", "date": "2023-05-24T16:00:54", "name": "lib: add pdcp protocol", "version": 3, "mbox": "https://patches.dpdk.org/series/28158/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/127334/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/127334/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 5295F42B8F;\n\tWed, 24 May 2023 18:01:51 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8C77542D3A;\n\tWed, 24 May 2023 18:01:40 +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 B408D400EF\n for <dev@dpdk.org>; Wed, 24 May 2023 18:01:39 +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 34OEjnod026744; Wed, 24 May 2023 09:01:38 -0700", "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3qsh90h0yy-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Wed, 24 May 2023 09:01:37 -0700", "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Wed, 24 May 2023 09:01:35 -0700", "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Wed, 24 May 2023 09:01:35 -0700", "from BG-LT92004.corp.innovium.com (unknown [10.28.161.183])\n by maili.marvell.com (Postfix) with ESMTP id C71BF3F70B3;\n Wed, 24 May 2023 09:01:31 -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=GhqpMvo5Jpzb3ku/iz5jCi10C1mtq8JqNpb1bV+LgA7BaNRf92YBHWbC7i4z3X9/Pq7A\n 5Xd8VFsw7eZXTTDx/3HpixIOZYn9gXIxqeo8XuV+V/clLq48oVP8AomyKwW0S+8/TcYU\n ROx7HnrMzWSjstmSbogE0t/y1VH688q9J481bi/fDZ1bJCm+zR5KR7eab1mVPeXnOc8Z\n sfdoml14hyxkNFmqRIV25sp+Dcd9sfjIn/Gr9AyNGs8f2Z5OWK0CpClt4LzCFbYVypE9\n ZyfgUlScGzezpnp60eE7AnQUTSzFedJ4VCO0gPxF94BbtgkLlEYoWUpRMYmJfo6dcpso gw==", "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>, Bernard Iremonger\n <bernard.iremonger@intel.com>", "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>", "Subject": "[PATCH v3 03/22] pdcp: add pre and post-process", "Date": "Wed, 24 May 2023 21:30:57 +0530", "Message-ID": "<20230524160116.304-4-anoobj@marvell.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20230524160116.304-1-anoobj@marvell.com>", "References": "<20230414174512.642-1-anoobj@marvell.com>\n <20230524160116.304-1-anoobj@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-GUID": "7RPqWEuxTB_0kWVr0hRp-z7t2pq22Xo-", "X-Proofpoint-ORIG-GUID": "7RPqWEuxTB_0kWVr0hRp-z7t2pq22Xo-", "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-24_11,2023-05-24_01,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": [ "v3", "03/22" ] }{ "id": 127334, "url": "