get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 100564,
    "url": "http://patches.dpdk.org/api/patches/100564/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211006065012.16508-3-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": "<20211006065012.16508-3-pbhagavatula@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211006065012.16508-3-pbhagavatula@marvell.com",
    "date": "2021-10-06T06:50:00",
    "name": "[v3,03/14] eventdev: allocate max space for internal arrays",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "65b2588afb4ff11f4db9372a1d0ccf20c70ba199",
    "submitter": {
        "id": 1183,
        "url": "http://patches.dpdk.org/api/people/1183/?format=api",
        "name": "Pavan Nikhilesh Bhagavatula",
        "email": "pbhagavatula@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "http://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20211006065012.16508-3-pbhagavatula@marvell.com/mbox/",
    "series": [
        {
            "id": 19405,
            "url": "http://patches.dpdk.org/api/series/19405/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=19405",
            "date": "2021-10-06T06:49:58",
            "name": "[v3,01/14] eventdev: make driver interface as internal",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/19405/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/100564/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/100564/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 929E2A0C45;\n\tWed,  6 Oct 2021 08:51:14 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C5EE841406;\n\tWed,  6 Oct 2021 08:51:02 +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 D8AF5413ED\n for <dev@dpdk.org>; Wed,  6 Oct 2021 08:51:01 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id\n 19621vks028865;\n Tue, 5 Oct 2021 23:51:01 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com with ESMTP id 3bgr1qkfap-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Tue, 05 Oct 2021 23:51:01 -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.18;\n Tue, 5 Oct 2021 23:50:59 -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.18 via Frontend\n Transport; Tue, 5 Oct 2021 23:50:59 -0700",
            "from BG-LT7430.marvell.com (BG-LT7430.marvell.com [10.28.177.176])\n by maili.marvell.com (Postfix) with ESMTP id 4DC053F704F;\n Tue,  5 Oct 2021 23:50:57 -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=4ZM9xMqjJ1jWfIoDr3MdgQkSrh0Z2YK7vOX3SQ7NerU=;\n b=X6U3P1Rq7ZHslWe3gP/8dM6mQrpY04ucNRY875xcwB59418N5XSRpfLlFW1BzyyeLF9E\n Rkfkl0dASUlxLpth7iDYTNWMZrtw90+ukLDlLPpcgc3HZUJTbzcxGF6pjjGbmCUDooan\n gec7H8y9MyRVjcJbpzjfkk2PtaN9lmJC3CJqY86vkxs81u4PWit0M99oC9MrMTRgxQrA\n ry4OkuRirVNltraWSuDH4eRXSC6HLDdfZ/sdGhhidveTVWeFkHBZF40WbybwLkClviGc\n 4XFbAIqmrHTHaVa6Td4WR6vWotmXUlX3qmqSD0+DYHu8xDq1ces6SuI/TUExhvJRiYNv qA==",
        "From": "<pbhagavatula@marvell.com>",
        "To": "<jerinj@marvell.com>, Bruce Richardson <bruce.richardson@intel.com>,\n Anatoly Burakov <anatoly.burakov@intel.com>",
        "CC": "<dev@dpdk.org>, Pavan Nikhilesh <pbhagavatula@marvell.com>",
        "Date": "Wed, 6 Oct 2021 12:20:00 +0530",
        "Message-ID": "<20211006065012.16508-3-pbhagavatula@marvell.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20211006065012.16508-1-pbhagavatula@marvell.com>",
        "References": "<20211003082710.8398-1-pbhagavatula@marvell.com>\n <20211006065012.16508-1-pbhagavatula@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "pOd1BQLJ2mdtHUPVP3a_4650xFaXTBFE",
        "X-Proofpoint-GUID": "pOd1BQLJ2mdtHUPVP3a_4650xFaXTBFE",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475\n definitions=2021-10-05_06,2021-10-04_01,2020-04-07_01",
        "Subject": "[dpdk-dev] [PATCH v3 03/14] eventdev: allocate max space for\n internal arrays",
        "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: Pavan Nikhilesh <pbhagavatula@marvell.com>\n\nAllocate max space for internal port, port config, queue config and\nlink map arrays.\nIntroduce new macro RTE_EVENT_MAX_PORTS_PER_DEV and set it to max\npossible value.\nThis simplifies the port and queue reconfigure scenarios and will\nalso allow inline functions to refer pointer to internal port data\nwithout extra checking of current number of configured queues.\n\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\n---\n config/rte_config.h              |   1 +\n lib/eventdev/rte_eventdev.c      | 154 +++++++------------------------\n lib/eventdev/rte_eventdev_core.h |   9 +-\n 3 files changed, 38 insertions(+), 126 deletions(-)",
    "diff": "diff --git a/config/rte_config.h b/config/rte_config.h\nindex 590903c07d..e0ead8b251 100644\n--- a/config/rte_config.h\n+++ b/config/rte_config.h\n@@ -72,6 +72,7 @@\n \n /* eventdev defines */\n #define RTE_EVENT_MAX_DEVS 16\n+#define RTE_EVENT_MAX_PORTS_PER_DEV 255\n #define RTE_EVENT_MAX_QUEUES_PER_DEV 255\n #define RTE_EVENT_TIMER_ADAPTER_NUM_MAX 32\n #define RTE_EVENT_ETH_INTR_RING_SIZE 1024\ndiff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c\nindex e347d6dfd5..bfcfa31cd1 100644\n--- a/lib/eventdev/rte_eventdev.c\n+++ b/lib/eventdev/rte_eventdev.c\n@@ -209,7 +209,7 @@ rte_event_eth_tx_adapter_caps_get(uint8_t dev_id, uint16_t eth_port_id,\n }\n \n static inline int\n-rte_event_dev_queue_config(struct rte_eventdev *dev, uint8_t nb_queues)\n+event_dev_queue_config(struct rte_eventdev *dev, uint8_t nb_queues)\n {\n \tuint8_t old_nb_queues = dev->data->nb_queues;\n \tstruct rte_event_queue_conf *queues_cfg;\n@@ -218,37 +218,13 @@ rte_event_dev_queue_config(struct rte_eventdev *dev, uint8_t nb_queues)\n \tRTE_EDEV_LOG_DEBUG(\"Setup %d queues on device %u\", nb_queues,\n \t\t\t dev->data->dev_id);\n \n-\t/* First time configuration */\n-\tif (dev->data->queues_cfg == NULL && nb_queues != 0) {\n-\t\t/* Allocate memory to store queue configuration */\n-\t\tdev->data->queues_cfg = rte_zmalloc_socket(\n-\t\t\t\t\"eventdev->data->queues_cfg\",\n-\t\t\t\tsizeof(dev->data->queues_cfg[0]) * nb_queues,\n-\t\t\t\tRTE_CACHE_LINE_SIZE, dev->data->socket_id);\n-\t\tif (dev->data->queues_cfg == NULL) {\n-\t\t\tdev->data->nb_queues = 0;\n-\t\t\tRTE_EDEV_LOG_ERR(\"failed to get mem for queue cfg,\"\n-\t\t\t\t\t\"nb_queues %u\", nb_queues);\n-\t\t\treturn -(ENOMEM);\n-\t\t}\n-\t/* Re-configure */\n-\t} else if (dev->data->queues_cfg != NULL && nb_queues != 0) {\n+\tif (nb_queues != 0) {\n+\t\tqueues_cfg = dev->data->queues_cfg;\n \t\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_release, -ENOTSUP);\n \n \t\tfor (i = nb_queues; i < old_nb_queues; i++)\n \t\t\t(*dev->dev_ops->queue_release)(dev, i);\n \n-\t\t/* Re allocate memory to store queue configuration */\n-\t\tqueues_cfg = dev->data->queues_cfg;\n-\t\tqueues_cfg = rte_realloc(queues_cfg,\n-\t\t\t\tsizeof(queues_cfg[0]) * nb_queues,\n-\t\t\t\tRTE_CACHE_LINE_SIZE);\n-\t\tif (queues_cfg == NULL) {\n-\t\t\tRTE_EDEV_LOG_ERR(\"failed to realloc queue cfg memory,\"\n-\t\t\t\t\t\t\" nb_queues %u\", nb_queues);\n-\t\t\treturn -(ENOMEM);\n-\t\t}\n-\t\tdev->data->queues_cfg = queues_cfg;\n \n \t\tif (nb_queues > old_nb_queues) {\n \t\t\tuint8_t new_qs = nb_queues - old_nb_queues;\n@@ -256,7 +232,7 @@ rte_event_dev_queue_config(struct rte_eventdev *dev, uint8_t nb_queues)\n \t\t\tmemset(queues_cfg + old_nb_queues, 0,\n \t\t\t\tsizeof(queues_cfg[0]) * new_qs);\n \t\t}\n-\t} else if (dev->data->queues_cfg != NULL && nb_queues == 0) {\n+\t} else {\n \t\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_release, -ENOTSUP);\n \n \t\tfor (i = nb_queues; i < old_nb_queues; i++)\n@@ -270,7 +246,7 @@ rte_event_dev_queue_config(struct rte_eventdev *dev, uint8_t nb_queues)\n #define EVENT_QUEUE_SERVICE_PRIORITY_INVALID (0xdead)\n \n static inline int\n-rte_event_dev_port_config(struct rte_eventdev *dev, uint8_t nb_ports)\n+event_dev_port_config(struct rte_eventdev *dev, uint8_t nb_ports)\n {\n \tuint8_t old_nb_ports = dev->data->nb_ports;\n \tvoid **ports;\n@@ -281,46 +257,7 @@ rte_event_dev_port_config(struct rte_eventdev *dev, uint8_t nb_ports)\n \tRTE_EDEV_LOG_DEBUG(\"Setup %d ports on device %u\", nb_ports,\n \t\t\t dev->data->dev_id);\n \n-\t/* First time configuration */\n-\tif (dev->data->ports == NULL && nb_ports != 0) {\n-\t\tdev->data->ports = rte_zmalloc_socket(\"eventdev->data->ports\",\n-\t\t\t\tsizeof(dev->data->ports[0]) * nb_ports,\n-\t\t\t\tRTE_CACHE_LINE_SIZE, dev->data->socket_id);\n-\t\tif (dev->data->ports == NULL) {\n-\t\t\tdev->data->nb_ports = 0;\n-\t\t\tRTE_EDEV_LOG_ERR(\"failed to get mem for port meta data,\"\n-\t\t\t\t\t\"nb_ports %u\", nb_ports);\n-\t\t\treturn -(ENOMEM);\n-\t\t}\n-\n-\t\t/* Allocate memory to store port configurations */\n-\t\tdev->data->ports_cfg =\n-\t\t\trte_zmalloc_socket(\"eventdev->ports_cfg\",\n-\t\t\tsizeof(dev->data->ports_cfg[0]) * nb_ports,\n-\t\t\tRTE_CACHE_LINE_SIZE, dev->data->socket_id);\n-\t\tif (dev->data->ports_cfg == NULL) {\n-\t\t\tdev->data->nb_ports = 0;\n-\t\t\tRTE_EDEV_LOG_ERR(\"failed to get mem for port cfg,\"\n-\t\t\t\t\t\"nb_ports %u\", nb_ports);\n-\t\t\treturn -(ENOMEM);\n-\t\t}\n-\n-\t\t/* Allocate memory to store queue to port link connection */\n-\t\tdev->data->links_map =\n-\t\t\trte_zmalloc_socket(\"eventdev->links_map\",\n-\t\t\tsizeof(dev->data->links_map[0]) * nb_ports *\n-\t\t\tRTE_EVENT_MAX_QUEUES_PER_DEV,\n-\t\t\tRTE_CACHE_LINE_SIZE, dev->data->socket_id);\n-\t\tif (dev->data->links_map == NULL) {\n-\t\t\tdev->data->nb_ports = 0;\n-\t\t\tRTE_EDEV_LOG_ERR(\"failed to get mem for port_map area,\"\n-\t\t\t\t\t\"nb_ports %u\", nb_ports);\n-\t\t\treturn -(ENOMEM);\n-\t\t}\n-\t\tfor (i = 0; i < nb_ports * RTE_EVENT_MAX_QUEUES_PER_DEV; i++)\n-\t\t\tdev->data->links_map[i] =\n-\t\t\t\tEVENT_QUEUE_SERVICE_PRIORITY_INVALID;\n-\t} else if (dev->data->ports != NULL && nb_ports != 0) {/* re-config */\n+\tif (nb_ports != 0) { /* re-config */\n \t\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->port_release, -ENOTSUP);\n \n \t\tports = dev->data->ports;\n@@ -330,37 +267,6 @@ rte_event_dev_port_config(struct rte_eventdev *dev, uint8_t nb_ports)\n \t\tfor (i = nb_ports; i < old_nb_ports; i++)\n \t\t\t(*dev->dev_ops->port_release)(ports[i]);\n \n-\t\t/* Realloc memory for ports */\n-\t\tports = rte_realloc(ports, sizeof(ports[0]) * nb_ports,\n-\t\t\t\tRTE_CACHE_LINE_SIZE);\n-\t\tif (ports == NULL) {\n-\t\t\tRTE_EDEV_LOG_ERR(\"failed to realloc port meta data,\"\n-\t\t\t\t\t\t\" nb_ports %u\", nb_ports);\n-\t\t\treturn -(ENOMEM);\n-\t\t}\n-\n-\t\t/* Realloc memory for ports_cfg */\n-\t\tports_cfg = rte_realloc(ports_cfg,\n-\t\t\tsizeof(ports_cfg[0]) * nb_ports,\n-\t\t\tRTE_CACHE_LINE_SIZE);\n-\t\tif (ports_cfg == NULL) {\n-\t\t\tRTE_EDEV_LOG_ERR(\"failed to realloc port cfg mem,\"\n-\t\t\t\t\t\t\" nb_ports %u\", nb_ports);\n-\t\t\treturn -(ENOMEM);\n-\t\t}\n-\n-\t\t/* Realloc memory to store queue to port link connection */\n-\t\tlinks_map = rte_realloc(links_map,\n-\t\t\tsizeof(dev->data->links_map[0]) * nb_ports *\n-\t\t\tRTE_EVENT_MAX_QUEUES_PER_DEV,\n-\t\t\tRTE_CACHE_LINE_SIZE);\n-\t\tif (links_map == NULL) {\n-\t\t\tdev->data->nb_ports = 0;\n-\t\t\tRTE_EDEV_LOG_ERR(\"failed to realloc mem for port_map,\"\n-\t\t\t\t\t\"nb_ports %u\", nb_ports);\n-\t\t\treturn -(ENOMEM);\n-\t\t}\n-\n \t\tif (nb_ports > old_nb_ports) {\n \t\t\tuint8_t new_ps = nb_ports - old_nb_ports;\n \t\t\tunsigned int old_links_map_end =\n@@ -376,16 +282,14 @@ rte_event_dev_port_config(struct rte_eventdev *dev, uint8_t nb_ports)\n \t\t\t\tlinks_map[i] =\n \t\t\t\t\tEVENT_QUEUE_SERVICE_PRIORITY_INVALID;\n \t\t}\n-\n-\t\tdev->data->ports = ports;\n-\t\tdev->data->ports_cfg = ports_cfg;\n-\t\tdev->data->links_map = links_map;\n-\t} else if (dev->data->ports != NULL && nb_ports == 0) {\n+\t} else {\n \t\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->port_release, -ENOTSUP);\n \n \t\tports = dev->data->ports;\n-\t\tfor (i = nb_ports; i < old_nb_ports; i++)\n+\t\tfor (i = nb_ports; i < old_nb_ports; i++) {\n \t\t\t(*dev->dev_ops->port_release)(ports[i]);\n+\t\t\tports[i] = NULL;\n+\t\t}\n \t}\n \n \tdev->data->nb_ports = nb_ports;\n@@ -550,19 +454,19 @@ rte_event_dev_configure(uint8_t dev_id,\n \tmemcpy(&dev->data->dev_conf, dev_conf, sizeof(dev->data->dev_conf));\n \n \t/* Setup new number of queues and reconfigure device. */\n-\tdiag = rte_event_dev_queue_config(dev, dev_conf->nb_event_queues);\n+\tdiag = event_dev_queue_config(dev, dev_conf->nb_event_queues);\n \tif (diag != 0) {\n-\t\tRTE_EDEV_LOG_ERR(\"dev%d rte_event_dev_queue_config = %d\",\n-\t\t\t\tdev_id, diag);\n+\t\tRTE_EDEV_LOG_ERR(\"dev%d event_dev_queue_config = %d\", dev_id,\n+\t\t\t\t diag);\n \t\treturn diag;\n \t}\n \n \t/* Setup new number of ports and reconfigure device. */\n-\tdiag = rte_event_dev_port_config(dev, dev_conf->nb_event_ports);\n+\tdiag = event_dev_port_config(dev, dev_conf->nb_event_ports);\n \tif (diag != 0) {\n-\t\trte_event_dev_queue_config(dev, 0);\n-\t\tRTE_EDEV_LOG_ERR(\"dev%d rte_event_dev_port_config = %d\",\n-\t\t\t\tdev_id, diag);\n+\t\tevent_dev_queue_config(dev, 0);\n+\t\tRTE_EDEV_LOG_ERR(\"dev%d event_dev_port_config = %d\", dev_id,\n+\t\t\t\t diag);\n \t\treturn diag;\n \t}\n \n@@ -570,8 +474,8 @@ rte_event_dev_configure(uint8_t dev_id,\n \tdiag = (*dev->dev_ops->dev_configure)(dev);\n \tif (diag != 0) {\n \t\tRTE_EDEV_LOG_ERR(\"dev%d dev_configure = %d\", dev_id, diag);\n-\t\trte_event_dev_queue_config(dev, 0);\n-\t\trte_event_dev_port_config(dev, 0);\n+\t\tevent_dev_queue_config(dev, 0);\n+\t\tevent_dev_port_config(dev, 0);\n \t}\n \n \tdev->data->event_dev_cap = info.event_dev_cap;\n@@ -1403,8 +1307,8 @@ rte_event_dev_close(uint8_t dev_id)\n }\n \n static inline int\n-rte_eventdev_data_alloc(uint8_t dev_id, struct rte_eventdev_data **data,\n-\t\tint socket_id)\n+eventdev_data_alloc(uint8_t dev_id, struct rte_eventdev_data **data,\n+\t\t    int socket_id)\n {\n \tchar mz_name[RTE_EVENTDEV_NAME_MAX_LEN];\n \tconst struct rte_memzone *mz;\n@@ -1426,14 +1330,20 @@ rte_eventdev_data_alloc(uint8_t dev_id, struct rte_eventdev_data **data,\n \t\treturn -ENOMEM;\n \n \t*data = mz->addr;\n-\tif (rte_eal_process_type() == RTE_PROC_PRIMARY)\n+\tif (rte_eal_process_type() == RTE_PROC_PRIMARY) {\n \t\tmemset(*data, 0, sizeof(struct rte_eventdev_data));\n+\t\tfor (n = 0; n < RTE_EVENT_MAX_PORTS_PER_DEV *\n+\t\t\t\t\tRTE_EVENT_MAX_QUEUES_PER_DEV;\n+\t\t     n++)\n+\t\t\t(*data)->links_map[n] =\n+\t\t\t\tEVENT_QUEUE_SERVICE_PRIORITY_INVALID;\n+\t}\n \n \treturn 0;\n }\n \n static inline uint8_t\n-rte_eventdev_find_free_device_index(void)\n+eventdev_find_free_device_index(void)\n {\n \tuint8_t dev_id;\n \n@@ -1475,7 +1385,7 @@ rte_event_pmd_allocate(const char *name, int socket_id)\n \t\treturn NULL;\n \t}\n \n-\tdev_id = rte_eventdev_find_free_device_index();\n+\tdev_id = eventdev_find_free_device_index();\n \tif (dev_id == RTE_EVENT_MAX_DEVS) {\n \t\tRTE_EDEV_LOG_ERR(\"Reached maximum number of event devices\");\n \t\treturn NULL;\n@@ -1490,8 +1400,8 @@ rte_event_pmd_allocate(const char *name, int socket_id)\n \tif (eventdev->data == NULL) {\n \t\tstruct rte_eventdev_data *eventdev_data = NULL;\n \n-\t\tint retval = rte_eventdev_data_alloc(dev_id, &eventdev_data,\n-\t\t\t\tsocket_id);\n+\t\tint retval =\n+\t\t\teventdev_data_alloc(dev_id, &eventdev_data, socket_id);\n \n \t\tif (retval < 0 || eventdev_data == NULL)\n \t\t\treturn NULL;\ndiff --git a/lib/eventdev/rte_eventdev_core.h b/lib/eventdev/rte_eventdev_core.h\nindex b97cdf84fe..115b97e431 100644\n--- a/lib/eventdev/rte_eventdev_core.h\n+++ b/lib/eventdev/rte_eventdev_core.h\n@@ -58,13 +58,14 @@ struct rte_eventdev_data {\n \t/**< Number of event queues. */\n \tuint8_t nb_ports;\n \t/**< Number of event ports. */\n-\tvoid **ports;\n+\tvoid *ports[RTE_EVENT_MAX_PORTS_PER_DEV];\n \t/**< Array of pointers to ports. */\n-\tstruct rte_event_port_conf *ports_cfg;\n+\tstruct rte_event_port_conf ports_cfg[RTE_EVENT_MAX_PORTS_PER_DEV];\n \t/**< Array of port configuration structures. */\n-\tstruct rte_event_queue_conf *queues_cfg;\n+\tstruct rte_event_queue_conf queues_cfg[RTE_EVENT_MAX_QUEUES_PER_DEV];\n \t/**< Array of queue configuration structures. */\n-\tuint16_t *links_map;\n+\tuint16_t links_map[RTE_EVENT_MAX_PORTS_PER_DEV *\n+\t\t\t   RTE_EVENT_MAX_QUEUES_PER_DEV];\n \t/**< Memory to store queues to port connections. */\n \tvoid *dev_private;\n \t/**< PMD-specific private data */\n",
    "prefixes": [
        "v3",
        "03/14"
    ]
}