get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 127343,
    "url": "http://patches.dpdk.org/api/patches/127343/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230524160116.304-13-anoobj@marvell.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": "<20230524160116.304-13-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230524160116.304-13-anoobj@marvell.com",
    "date": "2023-05-24T16:01:06",
    "name": "[v3,12/22] pdcp: add control PDU handling for status report",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "60ed11b61c65a0a314369a7b8ea3f155a1d4df3b",
    "submitter": {
        "id": 1205,
        "url": "http://patches.dpdk.org/api/people/1205/?format=api",
        "name": "Anoob Joseph",
        "email": "anoobj@marvell.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/20230524160116.304-13-anoobj@marvell.com/mbox/",
    "series": [
        {
            "id": 28158,
            "url": "http://patches.dpdk.org/api/series/28158/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=28158",
            "date": "2023-05-24T16:00:54",
            "name": "lib: add pdcp protocol",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/28158/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/127343/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/127343/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 4E48D42B8F;\n\tWed, 24 May 2023 18:03:41 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E729E42D3F;\n\tWed, 24 May 2023 18:02:25 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id DD303406BC\n for <dev@dpdk.org>; Wed, 24 May 2023 18:02:23 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 34OEgC6s025096; Wed, 24 May 2023 09:02:22 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3qsbxetjwp-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Wed, 24 May 2023 09:02:22 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) 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:02:20 -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; Wed, 24 May 2023 09:02:20 -0700",
            "from BG-LT92004.corp.innovium.com (unknown [10.28.161.183])\n by maili.marvell.com (Postfix) with ESMTP id 54B5B3F7043;\n Wed, 24 May 2023 09:02:14 -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=JjOcWMMvt+zpDRDiR04vB6sGClCQ36Tk9+86xIWLiwE=;\n b=IaDu8utI2JIwphGzUw6J9CJCftsBMirjkxeKnz2tlPIcw/vRKwfa0nF6ldEsFlausCXy\n QrMOrWhR0hBA3LY8UohzetkTZWokFgJ/9p4lmUc7gSPIL4ubPgUWN5NgTG3h5D86OQAl\n nM9Kdzg0Xgwn2Ai5w1uC2EaePsEEmiJYow29I/nilZDg1+ADXUCj7VbVqhqR7bhKSfId\n lUzLzGQL/E6CPFx2xvzehq70oS0CGmIqH5H9HNE/zJ4QtlxFVhR8yFxdu1zJqB2+L9o6\n vrGMKUmWfYIdy0HgvQLMbR3EPO8bAm6mwfxvHhGsJdQgEtQbdcKwN5XH1/7UnixMvhmi +g==",
        "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 12/22] pdcp: add control PDU handling for status report",
        "Date": "Wed, 24 May 2023 21:31:06 +0530",
        "Message-ID": "<20230524160116.304-13-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-ORIG-GUID": "ii-0S1MsA8tY-SAed1rqxpFB9EDxBa9C",
        "X-Proofpoint-GUID": "ii-0S1MsA8tY-SAed1rqxpFB9EDxBa9C",
        "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": "Add control PDU handling and implement status report generation. Status\nreport generation works only when RX_DELIV = RX_NEXT.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\nSigned-off-by: Volodymyr Fialko <vfialko@marvell.com>\n---\n doc/guides/prog_guide/pdcp_lib.rst |  9 ++++++\n lib/pdcp/meson.build               |  2 ++\n lib/pdcp/pdcp_cnt.c                | 29 ++++++++++++++++++\n lib/pdcp/pdcp_cnt.h                | 14 +++++++++\n lib/pdcp/pdcp_ctrl_pdu.c           | 46 +++++++++++++++++++++++++++++\n lib/pdcp/pdcp_ctrl_pdu.h           | 15 ++++++++++\n lib/pdcp/pdcp_entity.h             | 15 ++++++++--\n lib/pdcp/pdcp_process.c            | 13 +++++++++\n lib/pdcp/rte_pdcp.c                | 47 +++++++++++++++++++++++++++++-\n lib/pdcp/rte_pdcp.h                | 33 +++++++++++++++++++++\n lib/pdcp/version.map               |  2 ++\n 11 files changed, 222 insertions(+), 3 deletions(-)\n create mode 100644 lib/pdcp/pdcp_cnt.c\n create mode 100644 lib/pdcp/pdcp_cnt.h\n create mode 100644 lib/pdcp/pdcp_ctrl_pdu.c\n create mode 100644 lib/pdcp/pdcp_ctrl_pdu.h",
    "diff": "diff --git a/doc/guides/prog_guide/pdcp_lib.rst b/doc/guides/prog_guide/pdcp_lib.rst\nindex 8369c71600..dcb424bb1d 100644\n--- a/doc/guides/prog_guide/pdcp_lib.rst\n+++ b/doc/guides/prog_guide/pdcp_lib.rst\n@@ -76,6 +76,15 @@ Data PDUs are regular packets submitted by upper layers for transmission to\n other end. Such packets would need to be ciphered and authenticated based on\n the entity configuration.\n \n+PDCP packet processing API for control PDU\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+Control PDUs are used in PDCP as a communication channel between transmitting\n+and receiving entities. When upper layer request for operations such\n+re-establishment, receiving PDCP entity need to prepare a status report and\n+send it to the other end. The API ``rte_pdcp_control_pdu_create`` allows\n+application to request the same.\n+\n PDCP packet processing API for data PDU\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n \ndiff --git a/lib/pdcp/meson.build b/lib/pdcp/meson.build\nindex 08679b743a..75d476bf6d 100644\n--- a/lib/pdcp/meson.build\n+++ b/lib/pdcp/meson.build\n@@ -8,7 +8,9 @@ if is_windows\n endif\n \n sources = files(\n+        'pdcp_cnt.c',\n         'pdcp_crypto.c',\n+        'pdcp_ctrl_pdu.c',\n         'pdcp_process.c',\n         'rte_pdcp.c',\n         )\ndiff --git a/lib/pdcp/pdcp_cnt.c b/lib/pdcp/pdcp_cnt.c\nnew file mode 100644\nindex 0000000000..c9b952184b\n--- /dev/null\n+++ b/lib/pdcp/pdcp_cnt.c\n@@ -0,0 +1,29 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2023 Marvell.\n+ */\n+\n+#include <rte_pdcp.h>\n+\n+#include \"pdcp_cnt.h\"\n+#include \"pdcp_entity.h\"\n+\n+int\n+pdcp_cnt_ring_create(struct rte_pdcp_entity *en, const struct rte_pdcp_entity_conf *conf)\n+{\n+\tstruct entity_priv_dl_part *en_priv_dl;\n+\tuint32_t window_sz;\n+\n+\tif (en == NULL || conf == NULL)\n+\t\treturn -EINVAL;\n+\n+\tif (conf->pdcp_xfrm.pkt_dir == RTE_SECURITY_PDCP_UPLINK)\n+\t\treturn 0;\n+\n+\ten_priv_dl = entity_dl_part_get(en);\n+\twindow_sz = pdcp_window_size_get(conf->pdcp_xfrm.sn_size);\n+\n+\tRTE_SET_USED(window_sz);\n+\tRTE_SET_USED(en_priv_dl);\n+\n+\treturn 0;\n+}\ndiff --git a/lib/pdcp/pdcp_cnt.h b/lib/pdcp/pdcp_cnt.h\nnew file mode 100644\nindex 0000000000..bbda478b55\n--- /dev/null\n+++ b/lib/pdcp/pdcp_cnt.h\n@@ -0,0 +1,14 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2023 Marvell.\n+ */\n+\n+#ifndef PDCP_CNT_H\n+#define PDCP_CNT_H\n+\n+#include <rte_common.h>\n+\n+#include \"pdcp_entity.h\"\n+\n+int pdcp_cnt_ring_create(struct rte_pdcp_entity *en, const struct rte_pdcp_entity_conf *conf);\n+\n+#endif /* PDCP_CNT_H */\ndiff --git a/lib/pdcp/pdcp_ctrl_pdu.c b/lib/pdcp/pdcp_ctrl_pdu.c\nnew file mode 100644\nindex 0000000000..feb05fd863\n--- /dev/null\n+++ b/lib/pdcp/pdcp_ctrl_pdu.c\n@@ -0,0 +1,46 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2023 Marvell.\n+ */\n+\n+#include <rte_byteorder.h>\n+#include <rte_mbuf.h>\n+#include <rte_pdcp_hdr.h>\n+\n+#include \"pdcp_ctrl_pdu.h\"\n+#include \"pdcp_entity.h\"\n+\n+static __rte_always_inline void\n+pdcp_hdr_fill(struct rte_pdcp_up_ctrl_pdu_hdr *pdu_hdr, uint32_t rx_deliv)\n+{\n+\tpdu_hdr->d_c = RTE_PDCP_PDU_TYPE_CTRL;\n+\tpdu_hdr->pdu_type = RTE_PDCP_CTRL_PDU_TYPE_STATUS_REPORT;\n+\tpdu_hdr->r = 0;\n+\tpdu_hdr->fmc = rte_cpu_to_be_32(rx_deliv);\n+}\n+\n+int\n+pdcp_ctrl_pdu_status_gen(struct entity_priv *en_priv, struct rte_mbuf *m)\n+{\n+\tstruct rte_pdcp_up_ctrl_pdu_hdr *pdu_hdr;\n+\tuint32_t rx_deliv;\n+\tint pdu_sz;\n+\n+\tif (!en_priv->flags.is_status_report_required)\n+\t\treturn -EINVAL;\n+\n+\tpdu_sz = sizeof(struct rte_pdcp_up_ctrl_pdu_hdr);\n+\n+\trx_deliv = en_priv->state.rx_deliv;\n+\n+\t/* Zero missing PDUs - status report contains only FMC */\n+\tif (rx_deliv >= en_priv->state.rx_next) {\n+\t\tpdu_hdr = (struct rte_pdcp_up_ctrl_pdu_hdr *)rte_pktmbuf_append(m, pdu_sz);\n+\t\tif (pdu_hdr == NULL)\n+\t\t\treturn -ENOMEM;\n+\t\tpdcp_hdr_fill(pdu_hdr, rx_deliv);\n+\n+\t\treturn 0;\n+\t}\n+\n+\treturn -ENOTSUP;\n+}\ndiff --git a/lib/pdcp/pdcp_ctrl_pdu.h b/lib/pdcp/pdcp_ctrl_pdu.h\nnew file mode 100644\nindex 0000000000..a2424fbd10\n--- /dev/null\n+++ b/lib/pdcp/pdcp_ctrl_pdu.h\n@@ -0,0 +1,15 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2023 Marvell.\n+ */\n+\n+#ifndef PDCP_CTRL_PDU_H\n+#define PDCP_CTRL_PDU_H\n+\n+#include <rte_mbuf.h>\n+\n+#include \"pdcp_entity.h\"\n+\n+int\n+pdcp_ctrl_pdu_status_gen(struct entity_priv *en_priv, struct rte_mbuf *m);\n+\n+#endif /* PDCP_CTRL_PDU_H */\ndiff --git a/lib/pdcp/pdcp_entity.h b/lib/pdcp/pdcp_entity.h\nindex 10a72faae1..28691a504b 100644\n--- a/lib/pdcp/pdcp_entity.h\n+++ b/lib/pdcp/pdcp_entity.h\n@@ -109,6 +109,13 @@ union cipher_iv_partial {\n \tuint64_t u64[2];\n };\n \n+struct pdcp_cnt_bitmap {\n+\t/** Number of entries that can be stored. */\n+\tuint32_t size;\n+\t/** Bitmap of the count values already received.*/\n+\tstruct rte_bitmap *bmp;\n+};\n+\n /*\n  * Layout of PDCP entity: [rte_pdcp_entity] [entity_priv] [entity_dl/ul]\n  */\n@@ -136,9 +143,13 @@ struct entity_priv {\n \t\tuint64_t is_ul_entity : 1;\n \t\t/** Is NULL auth. */\n \t\tuint64_t is_null_auth : 1;\n+\t\t/** Is status report required.*/\n+\t\tuint64_t is_status_report_required : 1;\n \t} flags;\n \t/** Crypto op pool. */\n \tstruct rte_mempool *cop_pool;\n+\t/** Control PDU pool. */\n+\tstruct rte_mempool *ctrl_pdu_pool;\n \t/** PDCP header size. */\n \tuint8_t hdr_sz;\n \t/** PDCP AAD size. For AES-CMAC, additional message is prepended for the operation. */\n@@ -148,8 +159,8 @@ struct entity_priv {\n };\n \n struct entity_priv_dl_part {\n-\t/* NOTE: when in-order-delivery is supported, post PDCP packets would need to cached. */\n-\tuint8_t dummy;\n+\t/** PDCP would need to track the count values that are already received.*/\n+\tstruct pdcp_cnt_bitmap bitmap;\n };\n \n struct entity_priv_ul_part {\ndiff --git a/lib/pdcp/pdcp_process.c b/lib/pdcp/pdcp_process.c\nindex e8112adfb8..2e4fc7c664 100644\n--- a/lib/pdcp/pdcp_process.c\n+++ b/lib/pdcp/pdcp_process.c\n@@ -1158,6 +1158,19 @@ pdcp_entity_priv_populate(struct entity_priv *en_priv, const struct rte_pdcp_ent\n \tif (a_xfrm != NULL && a_xfrm->auth.algo == RTE_CRYPTO_AUTH_NULL)\n \t\ten_priv->flags.is_null_auth = 1;\n \n+\t/**\n+\t * flags.is_status_report_required\n+\t *\n+\t * Indicate whether status report is required.\n+\t */\n+\tif (conf->status_report_required) {\n+\t\t/** Status report is required only for DL entities. */\n+\t\tif (conf->pdcp_xfrm.pkt_dir != RTE_SECURITY_PDCP_DOWNLINK)\n+\t\t\treturn -EINVAL;\n+\n+\t\ten_priv->flags.is_status_report_required = 1;\n+\t}\n+\n \t/**\n \t * hdr_sz\n \t *\ndiff --git a/lib/pdcp/rte_pdcp.c b/lib/pdcp/rte_pdcp.c\nindex adcad5dd25..cf1a5f8eeb 100644\n--- a/lib/pdcp/rte_pdcp.c\n+++ b/lib/pdcp/rte_pdcp.c\n@@ -6,7 +6,9 @@\n #include <rte_pdcp.h>\n #include <rte_malloc.h>\n \n+#include \"pdcp_cnt.h\"\n #include \"pdcp_crypto.h\"\n+#include \"pdcp_ctrl_pdu.h\"\n #include \"pdcp_entity.h\"\n #include \"pdcp_process.h\"\n \n@@ -35,7 +37,7 @@ rte_pdcp_entity_establish(const struct rte_pdcp_entity_conf *conf)\n \tint ret, entity_size;\n \tuint32_t count;\n \n-\tif (conf == NULL || conf->cop_pool == NULL) {\n+\tif (conf == NULL || conf->cop_pool == NULL || conf->ctrl_pdu_pool == NULL) {\n \t\trte_errno = EINVAL;\n \t\treturn NULL;\n \t}\n@@ -82,6 +84,7 @@ rte_pdcp_entity_establish(const struct rte_pdcp_entity_conf *conf)\n \ten_priv->state.rx_deliv = count;\n \ten_priv->state.tx_next = count;\n \ten_priv->cop_pool = conf->cop_pool;\n+\ten_priv->ctrl_pdu_pool = conf->ctrl_pdu_pool;\n \n \t/* Setup crypto session */\n \tret = pdcp_crypto_sess_create(entity, conf);\n@@ -92,6 +95,10 @@ rte_pdcp_entity_establish(const struct rte_pdcp_entity_conf *conf)\n \tif (ret)\n \t\tgoto crypto_sess_destroy;\n \n+\tret = pdcp_cnt_ring_create(entity, conf);\n+\tif (ret)\n+\t\tgoto crypto_sess_destroy;\n+\n \treturn entity;\n \n crypto_sess_destroy:\n@@ -139,3 +146,41 @@ rte_pdcp_entity_suspend(struct rte_pdcp_entity *pdcp_entity,\n \n \treturn 0;\n }\n+\n+struct rte_mbuf *\n+rte_pdcp_control_pdu_create(struct rte_pdcp_entity *pdcp_entity,\n+\t\t\t    enum rte_pdcp_ctrl_pdu_type type)\n+{\n+\tstruct entity_priv *en_priv;\n+\tstruct rte_mbuf *m;\n+\tint ret;\n+\n+\tif (pdcp_entity == NULL) {\n+\t\trte_errno = EINVAL;\n+\t\treturn NULL;\n+\t}\n+\n+\ten_priv = entity_priv_get(pdcp_entity);\n+\n+\tm = rte_pktmbuf_alloc(en_priv->ctrl_pdu_pool);\n+\tif (m == NULL) {\n+\t\trte_errno = ENOMEM;\n+\t\treturn NULL;\n+\t}\n+\n+\tswitch (type) {\n+\tcase RTE_PDCP_CTRL_PDU_TYPE_STATUS_REPORT:\n+\t\tret = pdcp_ctrl_pdu_status_gen(en_priv, m);\n+\t\tbreak;\n+\tdefault:\n+\t\tret = -ENOTSUP;\n+\t}\n+\n+\tif (ret) {\n+\t\trte_pktmbuf_free(m);\n+\t\trte_errno = -ret;\n+\t\treturn NULL;\n+\t}\n+\n+\treturn m;\n+}\ndiff --git a/lib/pdcp/rte_pdcp.h b/lib/pdcp/rte_pdcp.h\nindex 4143fae0b2..553518328e 100644\n--- a/lib/pdcp/rte_pdcp.h\n+++ b/lib/pdcp/rte_pdcp.h\n@@ -16,6 +16,7 @@\n #include <rte_compat.h>\n #include <rte_common.h>\n #include <rte_mempool.h>\n+#include <rte_pdcp_hdr.h>\n #include <rte_security.h>\n \n #ifdef __cplusplus\n@@ -79,6 +80,8 @@ struct rte_pdcp_entity_conf {\n \tstruct rte_mempool *sess_mpool;\n \t/** Crypto op pool.*/\n \tstruct rte_mempool *cop_pool;\n+\t/** Mbuf pool to be used for allocating control PDUs.*/\n+\tstruct rte_mempool *ctrl_pdu_pool;\n \t/**\n \t * SN value to be used. 32 bit count value to be used for the first\n \t * packet would be derived based on HFN (`rte_security_pdcp_xform.hfn`)\n@@ -98,6 +101,16 @@ struct rte_pdcp_entity_conf {\n \t * crypto processing.\n \t */\n \tbool reverse_iv_direction;\n+\t/**\n+\t * Status report required (specified in TS 38.331).\n+\t *\n+\t * If PDCP entity is configured to send a PDCP status report, the upper\n+\t * layer application may request a receiving PDCP entity to generate a\n+\t * PDCP status report using ``rte_pdcp_control_pdu_create``. In\n+\t * addition, PDCP status reports may be generated during operations such\n+\t * as entity re-establishment.\n+\t */\n+\tbool status_report_required;\n };\n /* >8 End of structure rte_pdcp_entity_conf. */\n \n@@ -179,6 +192,26 @@ 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+ * Create control PDU packet of the `type` specified. The control PDU packet\n+ * would be allocated from *rte_pdcp_entity_conf.ctrl_pdu_pool* by lib PDCP.\n+ *\n+ * @param pdcp_entity\n+ *   Pointer to the PDCP entity for which the control PDU need to be generated.\n+ * @param type\n+ *   Type of control PDU to be generated.\n+ * @return\n+ *   - Control PDU generated, in case of success.\n+ *   - NULL in case of failure. rte_errno will be set to error code.\n+ */\n+__rte_experimental\n+struct rte_mbuf *\n+rte_pdcp_control_pdu_create(struct rte_pdcp_entity *pdcp_entity,\n+\t\t\t    enum rte_pdcp_ctrl_pdu_type type);\n+\n /**\n  * @warning\n  * @b EXPERIMENTAL: this API may change without prior notice\ndiff --git a/lib/pdcp/version.map b/lib/pdcp/version.map\nindex d564f155e0..97171f902e 100644\n--- a/lib/pdcp/version.map\n+++ b/lib/pdcp/version.map\n@@ -2,6 +2,8 @@ EXPERIMENTAL {\n \tglobal:\n \n \t# added in 23.07\n+\trte_pdcp_control_pdu_create;\n+\n \trte_pdcp_en_from_cop;\n \n \trte_pdcp_entity_establish;\n",
    "prefixes": [
        "v3",
        "12/22"
    ]
}