get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 66102,
    "url": "http://patches.dpdk.org/api/patches/66102/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1582820317-7333-6-git-send-email-lbartosik@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": "<1582820317-7333-6-git-send-email-lbartosik@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1582820317-7333-6-git-send-email-lbartosik@marvell.com",
    "date": "2020-02-27T16:18:27",
    "name": "[v5,05/15] examples/ipsec-secgw: add Tx adapter support",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "7ed65ff1561f80a16078393df4b144c438b914dc",
    "submitter": {
        "id": 1305,
        "url": "http://patches.dpdk.org/api/people/1305/?format=api",
        "name": "Lukas Bartosik [C]",
        "email": "lbartosik@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/1582820317-7333-6-git-send-email-lbartosik@marvell.com/mbox/",
    "series": [
        {
            "id": 8713,
            "url": "http://patches.dpdk.org/api/series/8713/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8713",
            "date": "2020-02-27T16:18:22",
            "name": "add eventmode to ipsec-secgw",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/8713/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/66102/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/66102/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id AC63AA055F;\n\tThu, 27 Feb 2020 17:19:44 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 195A31BFE2;\n\tThu, 27 Feb 2020 17:19:05 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 212F81BFF0\n for <dev@dpdk.org>; Thu, 27 Feb 2020 17:19:00 +0100 (CET)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n 01RFsqaO002551; Thu, 27 Feb 2020 08:18:59 -0800",
            "from sc-exch01.marvell.com ([199.233.58.181])\n by mx0b-0016f401.pphosted.com with ESMTP id 2ydchth8f0-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 27 Feb 2020 08:18:59 -0800",
            "from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH01.marvell.com\n (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 27 Feb\n 2020 08:18:56 -0800",
            "from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com\n (10.93.176.81) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Thu, 27 Feb 2020 08:18:56 -0800",
            "from luke.marvell.com (unknown [10.95.130.81])\n by maili.marvell.com (Postfix) with ESMTP id 65A0A3F703F;\n Thu, 27 Feb 2020 08:18:54 -0800 (PST)"
        ],
        "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-type; s=pfpt0818; bh=1KbWFVd0d50d8jp5eOOJWZ1/PPE1c0hhTariP2mMG+o=;\n b=iPybwyRK6X4tIT74dCCgWh0Q6FohwUlrxUYKjFeVp5V6/VZ2utwwR4T04WqWxBAvUPrN\n LaG/yUgWEflQ+NHryfzLYyDa2XaULCe3YjhZUOBOsxEcSfUvC22cE680lDTcM5GVL1kk\n HweoUuGrGFzJSn221qLS5MjiRZceaSz8AuayO8VjKw4JTfHlfkGXZQAKBfmqFqosJUQ5\n fh8zpiKSAqLbzvUVrXArTepgLEeHTZVIdXa/b42am7PHXrehk5jO3PmYnz6qbdzSWfw+\n 5nP5HJBk5k4vpsj9jl1T0ouQz2N7aj9N715rdWKF3Na1UxWvAdTjEVwpZ1CDGcVXYzYD tw==",
        "From": "Lukasz Bartosik <lbartosik@marvell.com>",
        "To": "Akhil Goyal <akhil.goyal@nxp.com>, Radu Nicolau <radu.nicolau@intel.com>,\n Thomas Monjalon <thomas@monjalon.net>",
        "CC": "Anoob Joseph <anoobj@marvell.com>, Jerin Jacob <jerinj@marvell.com>,\n Narayana Prasad <pathreya@marvell.com>,\n Ankur Dwivedi <adwivedi@marvell.com>,\n Archana Muniganti <marchana@marvell.com>, Tejasree Kondoj\n <ktejasree@marvell.com>, Vamsi Attunuru <vattunuru@marvell.com>,\n \"Konstantin Ananyev\" <konstantin.ananyev@intel.com>, <dev@dpdk.org>",
        "Date": "Thu, 27 Feb 2020 17:18:27 +0100",
        "Message-ID": "<1582820317-7333-6-git-send-email-lbartosik@marvell.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1582820317-7333-1-git-send-email-lbartosik@marvell.com>",
        "References": "<1582185727-6749-1-git-send-email-lbartosik@marvell.com>\n <1582820317-7333-1-git-send-email-lbartosik@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572\n definitions=2020-02-27_05:2020-02-26,\n 2020-02-27 signatures=0",
        "Subject": "[dpdk-dev] [PATCH v5 05/15] examples/ipsec-secgw: add Tx adapter\n\tsupport",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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: Anoob Joseph <anoobj@marvell.com>\n\nAdd Tx adapter support. The event helper init routine will initialize\nthe Tx adapter according to the configuration. If Tx adapter config\nis not present it will generate a default config.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\nSigned-off-by: Lukasz Bartosik <lbartosik@marvell.com>\n---\n examples/ipsec-secgw/event_helper.c | 313 ++++++++++++++++++++++++++++++++++++\n examples/ipsec-secgw/event_helper.h |  48 ++++++\n 2 files changed, 361 insertions(+)",
    "diff": "diff --git a/examples/ipsec-secgw/event_helper.c b/examples/ipsec-secgw/event_helper.c\nindex 2653e86..fca1e08 100644\n--- a/examples/ipsec-secgw/event_helper.c\n+++ b/examples/ipsec-secgw/event_helper.c\n@@ -5,6 +5,7 @@\n #include <rte_ethdev.h>\n #include <rte_eventdev.h>\n #include <rte_event_eth_rx_adapter.h>\n+#include <rte_event_eth_tx_adapter.h>\n #include <rte_malloc.h>\n #include <stdbool.h>\n \n@@ -76,6 +77,22 @@ eh_get_next_active_core(struct eventmode_conf *em_conf, unsigned int prev_core)\n \treturn next_core;\n }\n \n+static struct eventdev_params *\n+eh_get_eventdev_params(struct eventmode_conf *em_conf, uint8_t eventdev_id)\n+{\n+\tint i;\n+\n+\tfor (i = 0; i < em_conf->nb_eventdev; i++) {\n+\t\tif (em_conf->eventdev_config[i].eventdev_id == eventdev_id)\n+\t\t\tbreak;\n+\t}\n+\n+\t/* No match */\n+\tif (i == em_conf->nb_eventdev)\n+\t\treturn NULL;\n+\n+\treturn &(em_conf->eventdev_config[i]);\n+}\n static int\n eh_set_default_conf_eventdev(struct eventmode_conf *em_conf)\n {\n@@ -288,6 +305,95 @@ eh_set_default_conf_rx_adapter(struct eventmode_conf *em_conf)\n }\n \n static int\n+eh_set_default_conf_tx_adapter(struct eventmode_conf *em_conf)\n+{\n+\tstruct tx_adapter_connection_info *conn;\n+\tstruct eventdev_params *eventdev_config;\n+\tstruct tx_adapter_conf *tx_adapter;\n+\tint eventdev_id;\n+\tint adapter_id;\n+\tint nb_eth_dev;\n+\tint conn_id;\n+\tint i;\n+\n+\t/*\n+\t * Create one Tx adapter with all eth queues mapped to event queues\n+\t * 1:1.\n+\t */\n+\n+\tif (em_conf->nb_eventdev == 0) {\n+\t\tEH_LOG_ERR(\"No event devs registered\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\t/* Get the number of eth devs */\n+\tnb_eth_dev = rte_eth_dev_count_avail();\n+\n+\t/* Use the first event dev */\n+\teventdev_config = &(em_conf->eventdev_config[0]);\n+\n+\t/* Get eventdev ID */\n+\teventdev_id = eventdev_config->eventdev_id;\n+\tadapter_id = 0;\n+\n+\t/* Get adapter conf */\n+\ttx_adapter = &(em_conf->tx_adapter[adapter_id]);\n+\n+\t/* Set adapter conf */\n+\ttx_adapter->eventdev_id = eventdev_id;\n+\ttx_adapter->adapter_id = adapter_id;\n+\n+\t/* TODO: Tx core is required only when internal port is not present */\n+\ttx_adapter->tx_core_id = eh_get_next_eth_core(em_conf);\n+\n+\t/*\n+\t * Application uses one event queue per adapter for submitting\n+\t * packets for Tx. Reserve the last queue available and decrement\n+\t * the total available event queues for this\n+\t */\n+\n+\t/* Queue numbers start at 0 */\n+\ttx_adapter->tx_ev_queue = eventdev_config->nb_eventqueue - 1;\n+\n+\t/*\n+\t * Map all Tx queues of the eth device (port) to the event device.\n+\t */\n+\n+\t/* Set defaults for connections */\n+\n+\t/*\n+\t * One eth device (port) is one connection. Map all Tx queues\n+\t * of the device to the Tx adapter.\n+\t */\n+\n+\tfor (i = 0; i < nb_eth_dev; i++) {\n+\n+\t\t/* Use only the ports enabled */\n+\t\tif ((em_conf->eth_portmask & (1 << i)) == 0)\n+\t\t\tcontinue;\n+\n+\t\t/* Get the connection id */\n+\t\tconn_id = tx_adapter->nb_connections;\n+\n+\t\t/* Get the connection */\n+\t\tconn = &(tx_adapter->conn[conn_id]);\n+\n+\t\t/* Add ethdev to connections */\n+\t\tconn->ethdev_id = i;\n+\n+\t\t/* Add all eth tx queues to adapter */\n+\t\tconn->ethdev_tx_qid = -1;\n+\n+\t\t/* Update no of connections */\n+\t\ttx_adapter->nb_connections++;\n+\t}\n+\n+\t/* We have setup one adapter */\n+\tem_conf->nb_tx_adapter = 1;\n+\treturn 0;\n+}\n+\n+static int\n eh_validate_conf(struct eventmode_conf *em_conf)\n {\n \tint ret;\n@@ -322,6 +428,16 @@ eh_validate_conf(struct eventmode_conf *em_conf)\n \t\t\treturn ret;\n \t}\n \n+\t/*\n+\t * Check if tx adapters are specified. Else generate a default config\n+\t * with one tx adapter.\n+\t */\n+\tif (em_conf->nb_tx_adapter == 0) {\n+\t\tret = eh_set_default_conf_tx_adapter(em_conf);\n+\t\tif (ret != 0)\n+\t\t\treturn ret;\n+\t}\n+\n \treturn 0;\n }\n \n@@ -573,6 +689,133 @@ eh_initialize_rx_adapter(struct eventmode_conf *em_conf)\n \treturn 0;\n }\n \n+static int\n+eh_tx_adapter_configure(struct eventmode_conf *em_conf,\n+\t\tstruct tx_adapter_conf *adapter)\n+{\n+\tstruct rte_event_dev_info evdev_default_conf = {0};\n+\tstruct rte_event_port_conf port_conf = {0};\n+\tstruct tx_adapter_connection_info *conn;\n+\tstruct eventdev_params *eventdev_config;\n+\tuint8_t tx_port_id = 0;\n+\tuint8_t eventdev_id;\n+\tuint32_t service_id;\n+\tint ret, j;\n+\n+\t/* Get event dev ID */\n+\teventdev_id = adapter->eventdev_id;\n+\n+\t/* Get event device conf */\n+\teventdev_config = eh_get_eventdev_params(em_conf, eventdev_id);\n+\n+\t/* Create Tx adapter */\n+\n+\t/* Get default configuration of event dev */\n+\tret = rte_event_dev_info_get(eventdev_id, &evdev_default_conf);\n+\tif (ret < 0) {\n+\t\tEH_LOG_ERR(\"Failed to get event dev info %d\", ret);\n+\t\treturn ret;\n+\t}\n+\n+\t/* Setup port conf */\n+\tport_conf.new_event_threshold =\n+\t\t\tevdev_default_conf.max_num_events;\n+\tport_conf.dequeue_depth =\n+\t\t\tevdev_default_conf.max_event_port_dequeue_depth;\n+\tport_conf.enqueue_depth =\n+\t\t\tevdev_default_conf.max_event_port_enqueue_depth;\n+\n+\t/* Create adapter */\n+\tret = rte_event_eth_tx_adapter_create(adapter->adapter_id,\n+\t\t\tadapter->eventdev_id, &port_conf);\n+\tif (ret < 0) {\n+\t\tEH_LOG_ERR(\"Failed to create tx adapter %d\", ret);\n+\t\treturn ret;\n+\t}\n+\n+\t/* Setup various connections in the adapter */\n+\tfor (j = 0; j < adapter->nb_connections; j++) {\n+\n+\t\t/* Get connection */\n+\t\tconn = &(adapter->conn[j]);\n+\n+\t\t/* Add queue to the adapter */\n+\t\tret = rte_event_eth_tx_adapter_queue_add(adapter->adapter_id,\n+\t\t\t\tconn->ethdev_id, conn->ethdev_tx_qid);\n+\t\tif (ret < 0) {\n+\t\t\tEH_LOG_ERR(\"Failed to add eth queue to tx adapter %d\",\n+\t\t\t\t   ret);\n+\t\t\treturn ret;\n+\t\t}\n+\t}\n+\n+\t/* Setup Tx queue & port */\n+\n+\t/* Get event port used by the adapter */\n+\tret = rte_event_eth_tx_adapter_event_port_get(\n+\t\t\tadapter->adapter_id, &tx_port_id);\n+\tif (ret) {\n+\t\tEH_LOG_ERR(\"Failed to get tx adapter port id %d\", ret);\n+\t\treturn ret;\n+\t}\n+\n+\t/*\n+\t * Tx event queue is reserved for Tx adapter. Unlink this queue\n+\t * from all other ports\n+\t *\n+\t */\n+\tfor (j = 0; j < eventdev_config->nb_eventport; j++) {\n+\t\trte_event_port_unlink(eventdev_id, j,\n+\t\t\t\t      &(adapter->tx_ev_queue), 1);\n+\t}\n+\n+\t/* Link Tx event queue to Tx port */\n+\tret = rte_event_port_link(eventdev_id, tx_port_id,\n+\t\t\t&(adapter->tx_ev_queue), NULL, 1);\n+\tif (ret != 1) {\n+\t\tEH_LOG_ERR(\"Failed to link event queue to port\");\n+\t\treturn ret;\n+\t}\n+\n+\t/* Get the service ID used by Tx adapter */\n+\tret = rte_event_eth_tx_adapter_service_id_get(adapter->adapter_id,\n+\t\t\t\t\t\t      &service_id);\n+\tif (ret != -ESRCH && ret < 0) {\n+\t\tEH_LOG_ERR(\"Failed to get service id used by tx adapter %d\",\n+\t\t\t   ret);\n+\t\treturn ret;\n+\t}\n+\n+\trte_service_set_runstate_mapped_check(service_id, 0);\n+\n+\t/* Start adapter */\n+\tret = rte_event_eth_tx_adapter_start(adapter->adapter_id);\n+\tif (ret < 0) {\n+\t\tEH_LOG_ERR(\"Failed to start tx adapter %d\", ret);\n+\t\treturn ret;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int\n+eh_initialize_tx_adapter(struct eventmode_conf *em_conf)\n+{\n+\tstruct tx_adapter_conf *adapter;\n+\tint i, ret;\n+\n+\t/* Configure Tx adapters */\n+\tfor (i = 0; i < em_conf->nb_tx_adapter; i++) {\n+\t\tadapter = &(em_conf->tx_adapter[i]);\n+\t\tret = eh_tx_adapter_configure(em_conf, adapter);\n+\t\tif (ret < 0) {\n+\t\t\tEH_LOG_ERR(\"Failed to configure tx adapter %d\", ret);\n+\t\t\treturn ret;\n+\t\t}\n+\t}\n+\treturn 0;\n+}\n+\n int32_t\n eh_devs_init(struct eh_conf *conf)\n {\n@@ -630,6 +873,13 @@ eh_devs_init(struct eh_conf *conf)\n \t\treturn ret;\n \t}\n \n+\t/* Setup Tx adapter */\n+\tret = eh_initialize_tx_adapter(em_conf);\n+\tif (ret < 0) {\n+\t\tEH_LOG_ERR(\"Failed to initialize tx adapter %d\", ret);\n+\t\treturn ret;\n+\t}\n+\n \t/* Start eth devices after setting up adapter */\n \tRTE_ETH_FOREACH_DEV(port_id) {\n \n@@ -713,5 +963,68 @@ eh_devs_uninit(struct eh_conf *conf)\n \t\t}\n \t}\n \n+\t/* Stop and release tx adapters */\n+\tfor (i = 0; i < em_conf->nb_tx_adapter; i++) {\n+\n+\t\tid = em_conf->tx_adapter[i].adapter_id;\n+\t\tret = rte_event_eth_tx_adapter_stop(id);\n+\t\tif (ret < 0) {\n+\t\t\tEH_LOG_ERR(\"Failed to stop tx adapter %d\", ret);\n+\t\t\treturn ret;\n+\t\t}\n+\n+\t\tfor (j = 0; j < em_conf->tx_adapter[i].nb_connections; j++) {\n+\n+\t\t\tret = rte_event_eth_tx_adapter_queue_del(id,\n+\t\t\t\tem_conf->tx_adapter[i].conn[j].ethdev_id, -1);\n+\t\t\tif (ret < 0) {\n+\t\t\t\tEH_LOG_ERR(\n+\t\t\t\t\t\"Failed to remove tx adapter queues %d\",\n+\t\t\t\t\tret);\n+\t\t\t\treturn ret;\n+\t\t\t}\n+\t\t}\n+\n+\t\tret = rte_event_eth_tx_adapter_free(id);\n+\t\tif (ret < 0) {\n+\t\t\tEH_LOG_ERR(\"Failed to free tx adapter %d\", ret);\n+\t\t\treturn ret;\n+\t\t}\n+\t}\n+\n \treturn 0;\n }\n+\n+uint8_t\n+eh_get_tx_queue(struct eh_conf *conf, uint8_t eventdev_id)\n+{\n+\tstruct eventdev_params *eventdev_config;\n+\tstruct eventmode_conf *em_conf;\n+\n+\tif (conf == NULL) {\n+\t\tEH_LOG_ERR(\"Invalid event helper configuration\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (conf->mode_params == NULL) {\n+\t\tEH_LOG_ERR(\"Invalid event mode parameters\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\t/* Get eventmode conf */\n+\tem_conf = conf->mode_params;\n+\n+\t/* Get event device conf */\n+\teventdev_config = eh_get_eventdev_params(em_conf, eventdev_id);\n+\n+\tif (eventdev_config == NULL) {\n+\t\tEH_LOG_ERR(\"Failed to read eventdev config\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\t/*\n+\t * The last queue is reserved to be used as atomic queue for the\n+\t * last stage (eth packet tx stage)\n+\t */\n+\treturn eventdev_config->nb_eventqueue - 1;\n+}\ndiff --git a/examples/ipsec-secgw/event_helper.h b/examples/ipsec-secgw/event_helper.h\nindex 00ce14e..913b172 100644\n--- a/examples/ipsec-secgw/event_helper.h\n+++ b/examples/ipsec-secgw/event_helper.h\n@@ -19,9 +19,15 @@\n /* Max Rx adapters supported */\n #define EVENT_MODE_MAX_RX_ADAPTERS RTE_EVENT_MAX_DEVS\n \n+/* Max Tx adapters supported */\n+#define EVENT_MODE_MAX_TX_ADAPTERS RTE_EVENT_MAX_DEVS\n+\n /* Max Rx adapter connections */\n #define EVENT_MODE_MAX_CONNECTIONS_PER_ADAPTER 16\n \n+/* Max Tx adapter connections */\n+#define EVENT_MODE_MAX_CONNECTIONS_PER_TX_ADAPTER 16\n+\n /* Max event queues supported per event device */\n #define EVENT_MODE_MAX_EVENT_QUEUES_PER_DEV RTE_EVENT_MAX_QUEUES_PER_DEV\n \n@@ -29,6 +35,9 @@\n #define EVENT_MODE_MAX_LCORE_LINKS \\\n \t(EVENT_MODE_MAX_EVENT_DEVS * EVENT_MODE_MAX_EVENT_QUEUES_PER_DEV)\n \n+/* Max adapters that one Tx core can handle */\n+#define EVENT_MODE_MAX_ADAPTERS_PER_TX_CORE EVENT_MODE_MAX_TX_ADAPTERS\n+\n /**\n  * Packet transfer mode of the application\n  */\n@@ -76,6 +85,23 @@ struct rx_adapter_conf {\n \t\t\tconn[EVENT_MODE_MAX_CONNECTIONS_PER_ADAPTER];\n };\n \n+/* Tx adapter connection info */\n+struct tx_adapter_connection_info {\n+\tuint8_t ethdev_id;\n+\tint32_t ethdev_tx_qid;\n+};\n+\n+/* Tx adapter conf */\n+struct tx_adapter_conf {\n+\tint32_t eventdev_id;\n+\tint32_t adapter_id;\n+\tuint32_t tx_core_id;\n+\tuint8_t nb_connections;\n+\tstruct tx_adapter_connection_info\n+\t\t\tconn[EVENT_MODE_MAX_CONNECTIONS_PER_TX_ADAPTER];\n+\tuint8_t tx_ev_queue;\n+};\n+\n /* Eventmode conf data */\n struct eventmode_conf {\n \tint nb_eventdev;\n@@ -86,6 +112,10 @@ struct eventmode_conf {\n \t\t/**< No of Rx adapters */\n \tstruct rx_adapter_conf rx_adapter[EVENT_MODE_MAX_RX_ADAPTERS];\n \t\t/**< Rx adapter conf */\n+\tuint8_t nb_tx_adapter;\n+\t\t/**< No of Tx adapters */\n+\tstruct tx_adapter_conf tx_adapter[EVENT_MODE_MAX_TX_ADAPTERS];\n+\t\t/** Tx adapter conf */\n \tuint8_t nb_link;\n \t\t/**< No of links */\n \tstruct eh_event_link_info\n@@ -166,4 +196,22 @@ eh_devs_init(struct eh_conf *conf);\n int32_t\n eh_devs_uninit(struct eh_conf *conf);\n \n+/**\n+ * Get eventdev tx queue\n+ *\n+ * If the application uses event device which does not support internal port\n+ * then it needs to submit the events to a Tx queue before final transmission.\n+ * This Tx queue will be created internally by the eventmode helper subsystem,\n+ * and application will need its queue ID when it runs the execution loop.\n+ *\n+ * @param mode_conf\n+ *   Event helper configuration\n+ * @param eventdev_id\n+ *   Event device ID\n+ * @return\n+ *   Tx queue ID\n+ */\n+uint8_t\n+eh_get_tx_queue(struct eh_conf *conf, uint8_t eventdev_id);\n+\n #endif /* _EVENT_HELPER_H_ */\n",
    "prefixes": [
        "v5",
        "05/15"
    ]
}