Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/92672/?format=api
http://patches.dpdk.org/api/patches/92672/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210503152238.2437-35-pbhagavatula@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": "<20210503152238.2437-35-pbhagavatula@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210503152238.2437-35-pbhagavatula@marvell.com", "date": "2021-05-03T15:22:37", "name": "[v4,34/34] event/cnxk: add devargs to control timer adapters", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "ba678059565f6869bda79f996ba91ed996f810b0", "submitter": { "id": 1183, "url": "http://patches.dpdk.org/api/people/1183/?format=api", "name": "Pavan Nikhilesh Bhagavatula", "email": "pbhagavatula@marvell.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210503152238.2437-35-pbhagavatula@marvell.com/mbox/", "series": [ { "id": 16799, "url": "http://patches.dpdk.org/api/series/16799/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=16799", "date": "2021-05-03T15:22:03", "name": "Marvell CNXK Event device Driver", "version": 4, "mbox": "http://patches.dpdk.org/series/16799/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/92672/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/92672/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 7E1F1A0562;\n\tMon, 3 May 2021 17:27:03 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A70834113A;\n\tMon, 3 May 2021 17:24:48 +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 566C040691\n for <dev@dpdk.org>; Mon, 3 May 2021 17:24:47 +0200 (CEST)", "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id\n 143FAr6V032478 for <dev@dpdk.org>; Mon, 3 May 2021 08:24:46 -0700", "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com with ESMTP id 38agtfgv7h-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Mon, 03 May 2021 08:24:46 -0700", "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Mon, 3 May 2021 08:24:45 -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.2 via Frontend\n Transport; Mon, 3 May 2021 08:24:44 -0700", "from BG-LT7430.marvell.com (BG-LT7430.marvell.com [10.28.177.176])\n by maili.marvell.com (Postfix) with ESMTP id 334473F703F;\n Mon, 3 May 2021 08:24:42 -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=661q1jEiZ9bRBapYxo/qzhse9SfGNSn9QprRrofjJUM=;\n b=KPXPLCkvaiF5rmXXRRxoY+yBvS+4xauw/E0VkrDB0n1y7warTCfv1MvrzFIRg1PvyVu6\n QpaOoc3OImKrF2SvphbjOGlcJr4EEiriN/p2IlDqgwbCpm4gvxB/IfzG8B4967jzuRtO\n IZh7tt/7alBoOY5X1DIETJHapaKTiTqRAXPHdnUS53OyCAEcGTNU1EpNgETRcawDVOsd\n HHbuuwfeFO4TsoobSGp24cMWfFQNXFrOoutkrG2tyqKsRMgddO+C/pGfBkp76mMP6S2C\n DuIMUbGuf1TrnWuO6g4kKXOZn0PKlii7zyUD9sHbv67IVmv8ITKPMvebrBNZeVm7pZcX 3Q==", "From": "<pbhagavatula@marvell.com>", "To": "<jerinj@marvell.com>, Pavan Nikhilesh <pbhagavatula@marvell.com>, \"Shijith\n Thotton\" <sthotton@marvell.com>", "CC": "<dev@dpdk.org>", "Date": "Mon, 3 May 2021 20:52:37 +0530", "Message-ID": "<20210503152238.2437-35-pbhagavatula@marvell.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20210503152238.2437-1-pbhagavatula@marvell.com>", "References": "<20210430135336.2749-1-pbhagavatula@marvell.com>\n <20210503152238.2437-1-pbhagavatula@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-GUID": "yZjcyja3YI0rtHor2mKOMWCaaXvOYfr9", "X-Proofpoint-ORIG-GUID": "yZjcyja3YI0rtHor2mKOMWCaaXvOYfr9", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761\n definitions=2021-05-03_10:2021-05-03,\n 2021-05-03 signatures=0", "Subject": "[dpdk-dev] [PATCH v4 34/34] event/cnxk: add devargs to control\n timer adapters", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Shijith Thotton <sthotton@marvell.com>\n\nAdd devargs to control each event timer adapter i.e. TIM rings internal\nparameters uniquely. The following dict format is expected\n[ring-chnk_slots-disable_npa-stats_ena]. 0 represents default values.\n\nExample:\n\t--dev \"0002:1e:00.0,tim_ring_ctl=[2-1023-1-0]\"\n\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\nSigned-off-by: Shijith Thotton <sthotton@marvell.com>\n---\n doc/guides/eventdevs/cnxk.rst | 11 ++++\n drivers/event/cnxk/cnxk_tim_evdev.c | 96 ++++++++++++++++++++++++++++-\n drivers/event/cnxk/cnxk_tim_evdev.h | 10 +++\n 3 files changed, 116 insertions(+), 1 deletion(-)", "diff": "diff --git a/doc/guides/eventdevs/cnxk.rst b/doc/guides/eventdevs/cnxk.rst\nindex 11145dd7d..1bd935abc 100644\n--- a/doc/guides/eventdevs/cnxk.rst\n+++ b/doc/guides/eventdevs/cnxk.rst\n@@ -135,6 +135,17 @@ Runtime Config Options\n \n -a 0002:0e:00.0,tim_rings_lmt=5\n \n+- ``TIM ring control internal parameters``\n+\n+ When using multiple TIM rings the ``tim_ring_ctl`` devargs can be used to\n+ control each TIM rings internal parameters uniquely. The following dict\n+ format is expected [ring-chnk_slots-disable_npa-stats_ena]. 0 represents\n+ default values.\n+\n+ For Example::\n+\n+ -a 0002:0e:00.0,tim_ring_ctl=[2-1023-1-0]\n+\n Debugging Options\n -----------------\n \ndiff --git a/drivers/event/cnxk/cnxk_tim_evdev.c b/drivers/event/cnxk/cnxk_tim_evdev.c\nindex 19b71b4f5..9d40e336d 100644\n--- a/drivers/event/cnxk/cnxk_tim_evdev.c\n+++ b/drivers/event/cnxk/cnxk_tim_evdev.c\n@@ -121,7 +121,7 @@ cnxk_tim_ring_create(struct rte_event_timer_adapter *adptr)\n \tstruct rte_event_timer_adapter_conf *rcfg = &adptr->data->conf;\n \tstruct cnxk_tim_evdev *dev = cnxk_tim_priv_get();\n \tstruct cnxk_tim_ring *tim_ring;\n-\tint rc;\n+\tint i, rc;\n \n \tif (dev == NULL)\n \t\treturn -ENODEV;\n@@ -165,6 +165,20 @@ cnxk_tim_ring_create(struct rte_event_timer_adapter *adptr)\n \ttim_ring->disable_npa = dev->disable_npa;\n \ttim_ring->enable_stats = dev->enable_stats;\n \n+\tfor (i = 0; i < dev->ring_ctl_cnt; i++) {\n+\t\tstruct cnxk_tim_ctl *ring_ctl = &dev->ring_ctl_data[i];\n+\n+\t\tif (ring_ctl->ring == tim_ring->ring_id) {\n+\t\t\ttim_ring->chunk_sz =\n+\t\t\t\tring_ctl->chunk_slots ?\n+\t\t\t\t\t((uint32_t)(ring_ctl->chunk_slots + 1) *\n+\t\t\t\t\t CNXK_TIM_CHUNK_ALIGNMENT) :\n+\t\t\t\t\t tim_ring->chunk_sz;\n+\t\t\ttim_ring->enable_stats = ring_ctl->enable_stats;\n+\t\t\ttim_ring->disable_npa = ring_ctl->disable_npa;\n+\t\t}\n+\t}\n+\n \tif (tim_ring->disable_npa) {\n \t\ttim_ring->nb_chunks =\n \t\t\ttim_ring->nb_timers /\n@@ -368,6 +382,84 @@ cnxk_tim_caps_get(const struct rte_eventdev *evdev, uint64_t flags,\n \treturn 0;\n }\n \n+static void\n+cnxk_tim_parse_ring_param(char *value, void *opaque)\n+{\n+\tstruct cnxk_tim_evdev *dev = opaque;\n+\tstruct cnxk_tim_ctl ring_ctl = {0};\n+\tchar *tok = strtok(value, \"-\");\n+\tstruct cnxk_tim_ctl *old_ptr;\n+\tuint16_t *val;\n+\n+\tval = (uint16_t *)&ring_ctl;\n+\n+\tif (!strlen(value))\n+\t\treturn;\n+\n+\twhile (tok != NULL) {\n+\t\t*val = atoi(tok);\n+\t\ttok = strtok(NULL, \"-\");\n+\t\tval++;\n+\t}\n+\n+\tif (val != (&ring_ctl.enable_stats + 1)) {\n+\t\tplt_err(\"Invalid ring param expected [ring-chunk_sz-disable_npa-enable_stats]\");\n+\t\treturn;\n+\t}\n+\n+\tdev->ring_ctl_cnt++;\n+\told_ptr = dev->ring_ctl_data;\n+\tdev->ring_ctl_data =\n+\t\trte_realloc(dev->ring_ctl_data,\n+\t\t\t sizeof(struct cnxk_tim_ctl) * dev->ring_ctl_cnt, 0);\n+\tif (dev->ring_ctl_data == NULL) {\n+\t\tdev->ring_ctl_data = old_ptr;\n+\t\tdev->ring_ctl_cnt--;\n+\t\treturn;\n+\t}\n+\n+\tdev->ring_ctl_data[dev->ring_ctl_cnt - 1] = ring_ctl;\n+}\n+\n+static void\n+cnxk_tim_parse_ring_ctl_list(const char *value, void *opaque)\n+{\n+\tchar *s = strdup(value);\n+\tchar *start = NULL;\n+\tchar *end = NULL;\n+\tchar *f = s;\n+\n+\twhile (*s) {\n+\t\tif (*s == '[')\n+\t\t\tstart = s;\n+\t\telse if (*s == ']')\n+\t\t\tend = s;\n+\n+\t\tif (start && start < end) {\n+\t\t\t*end = 0;\n+\t\t\tcnxk_tim_parse_ring_param(start + 1, opaque);\n+\t\t\tstart = end;\n+\t\t\ts = end;\n+\t\t}\n+\t\ts++;\n+\t}\n+\n+\tfree(f);\n+}\n+\n+static int\n+cnxk_tim_parse_kvargs_dict(const char *key, const char *value, void *opaque)\n+{\n+\tRTE_SET_USED(key);\n+\n+\t/* Dict format [ring-chunk_sz-disable_npa-enable_stats] use '-' as ','\n+\t * isn't allowed. 0 represents default.\n+\t */\n+\tcnxk_tim_parse_ring_ctl_list(value, opaque);\n+\n+\treturn 0;\n+}\n+\n static void\n cnxk_tim_parse_devargs(struct rte_devargs *devargs, struct cnxk_tim_evdev *dev)\n {\n@@ -388,6 +480,8 @@ cnxk_tim_parse_devargs(struct rte_devargs *devargs, struct cnxk_tim_evdev *dev)\n \t\t\t &dev->enable_stats);\n \trte_kvargs_process(kvlist, CNXK_TIM_RINGS_LMT, &parse_kvargs_value,\n \t\t\t &dev->min_ring_cnt);\n+\trte_kvargs_process(kvlist, CNXK_TIM_RING_CTL,\n+\t\t\t &cnxk_tim_parse_kvargs_dict, &dev);\n \n \trte_kvargs_free(kvlist);\n }\ndiff --git a/drivers/event/cnxk/cnxk_tim_evdev.h b/drivers/event/cnxk/cnxk_tim_evdev.h\nindex b5e4cfc9e..c369f6f47 100644\n--- a/drivers/event/cnxk/cnxk_tim_evdev.h\n+++ b/drivers/event/cnxk/cnxk_tim_evdev.h\n@@ -38,6 +38,7 @@\n #define CNXK_TIM_CHNK_SLOTS \"tim_chnk_slots\"\n #define CNXK_TIM_STATS_ENA \"tim_stats_ena\"\n #define CNXK_TIM_RINGS_LMT \"tim_rings_lmt\"\n+#define CNXK_TIM_RING_CTL \"tim_ring_ctl\"\n \n #define CNXK_TIM_SP\t 0x1\n #define CNXK_TIM_MP\t 0x2\n@@ -75,6 +76,13 @@\n #define TIM_BUCKET_SEMA_WLOCK \\\n \t(TIM_BUCKET_CHUNK_REMAIN | (1ull << TIM_BUCKET_W1_S_LOCK))\n \n+struct cnxk_tim_ctl {\n+\tuint16_t ring;\n+\tuint16_t chunk_slots;\n+\tuint16_t disable_npa;\n+\tuint16_t enable_stats;\n+};\n+\n struct cnxk_tim_evdev {\n \tstruct roc_tim tim;\n \tstruct rte_eventdev *event_dev;\n@@ -85,6 +93,8 @@ struct cnxk_tim_evdev {\n \tuint16_t chunk_slots;\n \tuint16_t min_ring_cnt;\n \tuint8_t enable_stats;\n+\tuint16_t ring_ctl_cnt;\n+\tstruct cnxk_tim_ctl *ring_ctl_data;\n };\n \n enum cnxk_tim_clk_src {\n", "prefixes": [ "v4", "34/34" ] }{ "id": 92672, "url": "