get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 64924,
    "url": "http://patches.dpdk.org/api/patches/64924/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1579527918-360-6-git-send-email-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": "<1579527918-360-6-git-send-email-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1579527918-360-6-git-send-email-anoobj@marvell.com",
    "date": "2020-01-20T13:45:11",
    "name": "[v2,05/12] examples/ipsec-secgw: add Tx adapter support",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "120aaee5643aa533a5591bd5d9b0dfd08d916b69",
    "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/1579527918-360-6-git-send-email-anoobj@marvell.com/mbox/",
    "series": [
        {
            "id": 8219,
            "url": "http://patches.dpdk.org/api/series/8219/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8219",
            "date": "2020-01-20T13:45:06",
            "name": "add eventmode to ipsec-secgw",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/8219/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/64924/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/64924/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 C8BA4A0528;\n\tMon, 20 Jan 2020 14:46:38 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9FD054C7A;\n\tMon, 20 Jan 2020 14:46:13 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 12C882C6A\n for <dev@dpdk.org>; Mon, 20 Jan 2020 14:46:11 +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 00KDjrId023869; Mon, 20 Jan 2020 05:46:11 -0800",
            "from sc-exch01.marvell.com ([199.233.58.181])\n by mx0b-0016f401.pphosted.com with ESMTP id 2xm2dsx483-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Mon, 20 Jan 2020 05:46:11 -0800",
            "from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com\n (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 20 Jan\n 2020 05:46:09 -0800",
            "from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com\n (10.93.176.83) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Mon, 20 Jan 2020 05:46:08 -0800",
            "from ajoseph83.caveonetworks.com (unknown [10.29.45.60])\n by maili.marvell.com (Postfix) with ESMTP id 3A7953F703F;\n Mon, 20 Jan 2020 05:46:04 -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-transfer-encoding : content-type; s=pfpt0818;\n bh=3g//0rgN750GU4WS7GlCtvh+os6Es7BW1YonjJfDDwE=;\n b=lAvQcDe/uA0riW5WTy13nukjziFR+axNyaGnaFt/DZ0KO06+sfiUOuFgvp723f+Xl2AX\n PaLPXHI2XQvNGATR/lfBorL5q5ZfaqZbUurd/xUMSFFUfD8lLH5IamY464tgyJDG2cQ5\n obpc17clOty8/pmHM8vSACBb8YX7PSYAV4h+N4UEyDs4LyHvYbNcCX2g0R1mS1m99lyc\n dC8uvghRNs0FEMk0wHa+FhqlN6639SBui93lUAj+02H3jGqkvgF6+SFmlwkiQRyqJI71\n E2HfKsYSNovOb2bCY3B6hwMOSj1Q/qSAAgikRohcFxi2ctdqy0P7j/rg8+/KLSoYvZAT /w==",
        "From": "Anoob Joseph <anoobj@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>, \"Lukasz\n Bartosik\" <lbartosik@marvell.com>, Konstantin Ananyev\n <konstantin.ananyev@intel.com>, <dev@dpdk.org>",
        "Date": "Mon, 20 Jan 2020 19:15:11 +0530",
        "Message-ID": "<1579527918-360-6-git-send-email-anoobj@marvell.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1579527918-360-1-git-send-email-anoobj@marvell.com>",
        "References": "<1575808249-31135-1-git-send-email-anoobj@marvell.com>\n <1579527918-360-1-git-send-email-anoobj@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572\n definitions=2020-01-20_02:2020-01-20,\n 2020-01-20 signatures=0",
        "Subject": "[dpdk-dev] [PATCH v2 05/12] 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": "Add 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 1d06a45..e6569c1 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@@ -292,6 +309,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@@ -326,6 +432,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@@ -579,6 +695,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@@ -636,6 +879,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@@ -719,5 +969,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 baf93e1..e76d764 100644\n--- a/examples/ipsec-secgw/event_helper.h\n+++ b/examples/ipsec-secgw/event_helper.h\n@@ -23,9 +23,15 @@ extern \"C\" {\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@@ -33,6 +39,9 @@ extern \"C\" {\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@@ -80,6 +89,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@@ -90,6 +116,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@@ -170,6 +200,24 @@ 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 #ifdef __cplusplus\n }\n #endif\n",
    "prefixes": [
        "v2",
        "05/12"
    ]
}