Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/127622/?format=api
http://patchwork.dpdk.org/api/patches/127622/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230527085910.972-16-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-16-anoobj@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230527085910.972-16-anoobj@marvell.com", "date": "2023-05-27T08:59:04", "name": "[v5,15/21] pdcp: add timer callback handlers", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "d7ff1587da44804d1fbf4a7d1e0c0e39569cf31f", "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-16-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/127622/comments/", "check": "warning", "checks": "http://patchwork.dpdk.org/api/patches/127622/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 C7E4C42BB5;\n\tSat, 27 May 2023 14:06:56 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 39C6742D4B;\n\tSat, 27 May 2023 14:06:54 +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 4889F42D46\n for <dev@dpdk.org>; Sat, 27 May 2023 14:06:53 +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 34R9QTKj019442; Sat, 27 May 2023 05:06:51 -0700", "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3quf7p8aku-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Sat, 27 May 2023 05:06:51 -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 Sat, 27 May 2023 05:06:50 -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; Sat, 27 May 2023 05:06:49 -0700", "from BG-LT92004.corp.innovium.com (unknown [10.193.65.175])\n by maili.marvell.com (Postfix) with ESMTP id D8FDF5E69DE;\n Sat, 27 May 2023 02:00:21 -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=yipJMZaoBAT6LBJQiHs4vi3C0mzQrYQ5SrVH9PO440A=;\n b=TO/Dh0U1lEHOq654EqfFgi0WwDTjWPg2PFCZnpxWx1c0Qrv0030MeHGhLTD2V+KwXHsu\n xBdVppuESSX8xWmCX2vrS0zdTytWe0jqW5Q2T/idnEnhwQwGjRH4NHyXUBQ1FnvTMP7Z\n XjskBUaJLcDyENUyKbj7z+7VP2jvrWMG2Re2sneizlE5mT5yKHHq9O5Q+do664teEtLJ\n BD4TSxPUVMU86NwPFD7CXyb3iv9Cw48SI8WvCJ90V5NVOf49gEPiDeqUqChTBm8a9O73\n QeSaqHVZ7DpYWjm9Jv5ZoWKQf5ryvfkjTLqm94TNagknDOS+9i/0oBem5ZAZrzUFPuIq mg==", "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": "Volodymyr Fialko <vfialko@marvell.com>,\n 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>, <dev@dpdk.org>,\n Olivier Matz <olivier.matz@6wind.com>,\n Stephen Hemminger <stephen@networkplumber.org>", "Subject": "[PATCH v5 15/21] pdcp: add timer callback handlers", "Date": "Sat, 27 May 2023 14:29:04 +0530", "Message-ID": "<20230527085910.972-16-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": "RpnUSBGmMbq_BZiXSuiH2aHEmO0EUPaW", "X-Proofpoint-ORIG-GUID": "RpnUSBGmMbq_BZiXSuiH2aHEmO0EUPaW", "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_08,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": "From: Volodymyr Fialko <vfialko@marvell.com>\n\nPDCP has a windowing mechanism which allows only packets that fall in a\nreception window. The pivot point for this window is RX_REORD which\nhappens to be the first missing or next expected packet. If the missing\npacket is not received after a specified time, then the RX_REORD state\nvariable needs to be moved up to slide the reception window. PDCP relies\non timers for such operations.\n\nThe timer needs to be armed when PDCP library doesn't receive all\npackets in-order and starts buffering packets that arrived after a\nmissing packet. The timer needs to be cancelled when a missing packet\nis received.\n\nTo avoid dependency on particular timer implementation, PDCP library\nallows application to register two callbacks, timer_start() and\ntimer_stop() that will be called later by library.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\nSigned-off-by: Volodymyr Fialko <vfialko@marvell.com>\n---\n lib/pdcp/pdcp_entity.h | 2 ++\n lib/pdcp/pdcp_process.c | 2 ++\n lib/pdcp/rte_pdcp.c | 1 +\n lib/pdcp/rte_pdcp.h | 47 +++++++++++++++++++++++++++++++++++++++++\n 4 files changed, 52 insertions(+)", "diff": "diff --git a/lib/pdcp/pdcp_entity.h b/lib/pdcp/pdcp_entity.h\nindex 34341cdc11..efc74ba9b9 100644\n--- a/lib/pdcp/pdcp_entity.h\n+++ b/lib/pdcp/pdcp_entity.h\n@@ -120,6 +120,8 @@ enum timer_state {\n struct pdcp_t_reordering {\n \t/** Represent timer state */\n \tenum timer_state state;\n+\t/** User defined callback handles */\n+\tstruct rte_pdcp_t_reordering handle;\n };\n \n struct pdcp_cnt_bitmap {\ndiff --git a/lib/pdcp/pdcp_process.c b/lib/pdcp/pdcp_process.c\nindex 84a0f3a43f..daf2c27363 100644\n--- a/lib/pdcp/pdcp_process.c\n+++ b/lib/pdcp/pdcp_process.c\n@@ -902,6 +902,7 @@ pdcp_post_process_update_entity_state(const struct rte_pdcp_entity *entity,\n \tif (t_reorder->state == TIMER_RUNNING &&\n \t\t\ten_priv->state.rx_deliv >= en_priv->state.rx_reord) {\n \t\tt_reorder->state = TIMER_STOP;\n+\t\tt_reorder->handle.stop(t_reorder->handle.timer, t_reorder->handle.args);\n \t\t/* Stop reorder buffer, only if it's empty */\n \t\tif (en_priv->state.rx_deliv == en_priv->state.rx_next)\n \t\t\tpdcp_reorder_stop(reorder);\n@@ -916,6 +917,7 @@ pdcp_post_process_update_entity_state(const struct rte_pdcp_entity *entity,\n \t\ten_priv->state.rx_reord = en_priv->state.rx_next;\n \t\t/* Start t-Reordering */\n \t\tt_reorder->state = TIMER_RUNNING;\n+\t\tt_reorder->handle.start(t_reorder->handle.timer, t_reorder->handle.args);\n \t}\n \n \treturn processed;\ndiff --git a/lib/pdcp/rte_pdcp.c b/lib/pdcp/rte_pdcp.c\nindex be37ff392c..a0558b99ae 100644\n--- a/lib/pdcp/rte_pdcp.c\n+++ b/lib/pdcp/rte_pdcp.c\n@@ -56,6 +56,7 @@ pdcp_dl_establish(struct rte_pdcp_entity *entity, const struct rte_pdcp_entity_c\n \tstruct entity_priv_dl_part *dl = entity_dl_part_get(entity);\n \n \tentity->max_pkt_cache = RTE_MAX(entity->max_pkt_cache, window_size);\n+\tdl->t_reorder.handle = conf->t_reordering;\n \n \treturn pdcp_reorder_create(&dl->reorder, window_size);\n }\ndiff --git a/lib/pdcp/rte_pdcp.h b/lib/pdcp/rte_pdcp.h\nindex 980086a93a..05c922819e 100644\n--- a/lib/pdcp/rte_pdcp.h\n+++ b/lib/pdcp/rte_pdcp.h\n@@ -67,6 +67,51 @@ struct rte_pdcp_entity {\n \tuint32_t max_pkt_cache;\n } __rte_cache_aligned;\n \n+/**\n+ * Callback function type for t-Reordering timer start, set during PDCP entity establish.\n+ * This callback is invoked by PDCP library, during t-Reordering timer start event.\n+ * Only one t-Reordering per receiving PDCP entity would be running at a given time.\n+ *\n+ * @see struct rte_pdcp_timer\n+ * @see rte_pdcp_entity_establish()\n+ *\n+ * @param timer\n+ * Pointer to timer.\n+ * @param args\n+ * Pointer to timer arguments.\n+ */\n+typedef void (*rte_pdcp_t_reordering_start_cb_t)(void *timer, void *args);\n+\n+/**\n+ * Callback function type for t-Reordering timer stop, set during PDCP entity establish.\n+ * This callback will be invoked by PDCP library, during t-Reordering timer stop event.\n+ *\n+ * @see struct rte_pdcp_timer\n+ * @see rte_pdcp_entity_establish()\n+ *\n+ * @param timer\n+ * Pointer to timer.\n+ * @param args\n+ * Pointer to timer arguments.\n+ */\n+typedef void (*rte_pdcp_t_reordering_stop_cb_t)(void *timer, void *args);\n+\n+/**\n+ * PDCP t-Reordering timer interface\n+ *\n+ * Configuration provided by user, that PDCP library will invoke according to timer behaviour.\n+ */\n+struct rte_pdcp_t_reordering {\n+\t/** Timer pointer, stored for later use in callback functions */\n+\tvoid *timer;\n+\t/** Timer arguments, stored for later use in callback functions */\n+\tvoid *args;\n+\t/** Timer start callback handle */\n+\trte_pdcp_t_reordering_start_cb_t start;\n+\t/** Timer stop callback handle */\n+\trte_pdcp_t_reordering_stop_cb_t stop;\n+};\n+\n /**\n * PDCP entity configuration to be used for establishing an entity.\n */\n@@ -113,6 +158,8 @@ struct rte_pdcp_entity_conf {\n \tbool status_report_required;\n \t/** Enable out of order delivery. */\n \tbool out_of_order_delivery;\n+\t/** t-Reordering timer configuration */\n+\tstruct rte_pdcp_t_reordering t_reordering;\n };\n /* >8 End of structure rte_pdcp_entity_conf. */\n \n", "prefixes": [ "v5", "15/21" ] }{ "id": 127622, "url": "