get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 88032,
    "url": "http://patches.dpdk.org/api/patches/88032/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210220220957.4583-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": "<20210220220957.4583-3-pbhagavatula@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210220220957.4583-3-pbhagavatula@marvell.com",
    "date": "2021-02-20T22:09:51",
    "name": "[2/7] eventdev: introduce event vector Rx capability",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "cf551b6f989dffb7157e8ef94078d093a603ac02",
    "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/20210220220957.4583-3-pbhagavatula@marvell.com/mbox/",
    "series": [
        {
            "id": 15316,
            "url": "http://patches.dpdk.org/api/series/15316/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=15316",
            "date": "2021-02-20T22:09:49",
            "name": "Introduce event vectorization",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/15316/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/88032/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/88032/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 C95DCA0524;\n\tSat, 20 Feb 2021 23:10:23 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AFFFE22A24D;\n\tSat, 20 Feb 2021 23:10:22 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 5ACEC22A24D\n for <dev@dpdk.org>; Sat, 20 Feb 2021 23:10:21 +0100 (CET)",
            "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 11KMAIp6008338; Sat, 20 Feb 2021 14:10:18 -0800",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com with ESMTP id 36u0nw8vuw-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Sat, 20 Feb 2021 14:10:18 -0800",
            "from SC-EXCH03.marvell.com (10.93.176.83) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Sat, 20 Feb 2021 14:10:16 -0800",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH03.marvell.com\n (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Sat, 20 Feb 2021 14:10:16 -0800",
            "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; Sat, 20 Feb 2021 14:10:16 -0800",
            "from BG-LT7430.marvell.com (BG-LT7430.marvell.com [10.28.177.176])\n by maili.marvell.com (Postfix) with ESMTP id 1C43B3F7041;\n Sat, 20 Feb 2021 14:10:11 -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=pfpt0220;\n bh=A2sUEIOaRc67fiuPeGpBpzZpnnTyabAQUO+b0Jz/IRw=;\n b=iCfAJAD5UrL5h8E4PlwcIgyEsGsBwnxDYoJkh1ZE5NUganlz3hunsiLfiTmjs1noOY4F\n Ks13MpT9jlnaZuQ5aKc4851ml3C/N3c+p/UK8Tlvd3fyostN0bJCu5H7oTEVyPTjN6HJ\n LCSQxfXakR0plpWUXtOpMD2z+FTokpXPIaJVGzmitLMPuonPD7IHkg0CaszP4ww6U00s\n cGiwdCL+wJ5IUQEfmGe+EIJcVU62zYV4ye3Cng4uQFbQC7jxEJeLMaj+mrazJmkCtnQf\n VrvihHoMy/KHcKhs+skF7hP/0LTY0Xrf/8H0/fR8WsnZqs1vTifHZoy5EkA+v6p8k1QK RA==",
        "From": "<pbhagavatula@marvell.com>",
        "To": "<jerinj@marvell.com>, <jay.jayatheerthan@intel.com>,\n <erik.g.carrillo@intel.com>, <abhinandan.gujjar@intel.com>,\n <timothy.mcdaniel@intel.com>, <hemant.agrawal@nxp.com>,\n <harry.van.haaren@intel.com>, <mattias.ronnblom@ericsson.com>,\n <liang.j.ma@intel.com>, Ray Kinsella <mdr@ashroe.eu>, Neil Horman\n <nhorman@tuxdriver.com>",
        "CC": "<dev@dpdk.org>, Pavan Nikhilesh <pbhagavatula@marvell.com>",
        "Date": "Sun, 21 Feb 2021 03:39:51 +0530",
        "Message-ID": "<20210220220957.4583-3-pbhagavatula@marvell.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20210220220957.4583-1-pbhagavatula@marvell.com>",
        "References": "<20210220220957.4583-1-pbhagavatula@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.369, 18.0.761\n definitions=2021-02-20_03:2021-02-18,\n 2021-02-20 signatures=0",
        "Subject": "[dpdk-dev] [PATCH 2/7] eventdev: introduce event vector Rx\n capability",
        "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\nIntroduce event ethernet Rx adapter event vector capability.\n\nIf an event eth Rx adapter has the capability of\nRTE_EVENT_ETH_RX_ADAPTER_CAP_EVENT_VECTOR then a given Rx queue\ncan be configured to enable event vectorization by passing the\nflag RTE_EVENT_ETH_RX_ADAPTER_QUEUE_EVENT_VECTOR to\nrte_event_eth_rx_adapter_queue_conf::rx_queue_flags while configuring\nRx adapter through rte_event_eth_rx_adapter_queue_add.\n\nThe max vector size, vector timeout define the vector size and\nmempool used for allocating vector event are configured through\nrte_event_eth_rx_adapter_queue_add. The element size of the element\nin the vector pool should be equal to\n    sizeof(struct rte_event_vector) + (vector_sz * sizeof(uintptr_t))\n\nApplication can use `rte_event_get_event_vector_memory_footprint`\nto get the element size before creating the vector mempool\nrte_event_eth_rx_adapter_queue_conf::vector_mp.\n\nThe Rx adapter would be responsible for vectorizing the mbufs\nbased on the flow, the vector limits configured by the application\nand add the vector event of mbufs to the event queue set via\nrte_event_eth_rx_adapter_queue_conf::ev::queue_id.\nIt should also mark rte_event_vector::union_valid and fill\nrte_event_vector::port, rte_event_vector::queue.\n\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\n---\n .../prog_guide/event_ethernet_rx_adapter.rst  | 38 +++++++++++\n .../rte_event_eth_rx_adapter.h                | 66 +++++++++++++++++++\n lib/librte_eventdev/rte_eventdev.h            | 30 ++++++++-\n lib/librte_eventdev/version.map               |  1 +\n 4 files changed, 133 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst\nindex cb44ce0e4..735ea2439 100644\n--- a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst\n+++ b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst\n@@ -186,3 +186,41 @@ the event buffer fill level is low. The\n ``rte_event_eth_rx_adapter_cb_register()`` function allow the application\n to register a callback that selects which packets to enqueue to the event\n device.\n+\n+Rx event vectorization\n+~~~~~~~~~~~~~~~~~~~~~~\n+\n+The event devices, ethernet device pairs which support the capability\n+``RTE_EVENT_ETH_RX_ADAPTER_CAP_EVENT_VECTOR`` can aggregate packets based on\n+flow characteristics and generate a ``rte_event`` containing ``rte_event_vector``\n+whose event type is either ``RTE_EVENT_TYPE_ETHDEV_VECTOR`` or\n+``RTE_EVENT_TYPE_ETH_RX_ADAPTER_VECTOR``.\n+The aggregation size and timeout are configurable at a queue level and the\n+maximum, minimum vector sizes and timeouts vary based on the device capability\n+and can be queried using ``rte_event_eth_rx_adapter_vector_limits_get``.\n+The Rx adapter additionally might include useful data such as ethernet device\n+port and queue identifier in the ``rte_event_vector::port`` and\n+``rte_event_vector::queue`` and mark ``rte_event_vector::attr_valid`` as true.\n+\n+A loop processing ``rte_event_vector`` containing mbufs is shown below.\n+\n+.. code-block:: c\n+\n+        event = rte_event_dequeue_burst(event_dev, event_port, &event,\n+                                        1, 0);\n+        if (!event)\n+                continue;\n+\n+        switch (ev.event_type) {\n+        case RTE_EVENT_TYPE_ETH_RX_ADAPTER_VECTOR:\n+        case RTE_EVENT_TYPE_ETHDEV_VECTOR:\n+                struct rte_mbufs **mbufs;\n+\n+                mbufs = (struct rte_mbufs **)ev[i].vec->mbufs;\n+                for (i = 0; i < ev.vec->nb_elem; i++) {\n+                        // Process each mbuf.\n+                }\n+        break;\n+        case ...\n+        ...\n+        }\ndiff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.h b/lib/librte_eventdev/rte_event_eth_rx_adapter.h\nindex 21bb1e54c..4bdb38f08 100644\n--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.h\n+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.h\n@@ -92,6 +92,10 @@ extern \"C\" {\n /**< This flag indicates the flow identifier is valid\n  * @see rte_event_eth_rx_adapter_queue_conf::rx_queue_flags\n  */\n+#define RTE_EVENT_ETH_RX_ADAPTER_QUEUE_EVENT_VECTOR\t0x2\n+/**< This flag indicates that mbufs arriving on the queue need to be vectorized\n+ * @see rte_event_eth_rx_adapter_queue_conf::rx_queue_flags\n+ */\n \n /**\n  * Adapter configuration structure that the adapter configuration callback\n@@ -167,6 +171,33 @@ struct rte_event_eth_rx_adapter_queue_conf {\n \t * The event adapter sets ev.event_type to RTE_EVENT_TYPE_ETHDEV in the\n \t * enqueued event.\n \t */\n+\tuint16_t vector_sz;\n+\t/**<\n+\t * Indicates the maximum number for mbufs to combine and form a vector.\n+\t * Should be within\n+\t * @see rte_event_eth_rx_adapter_vector_limits::min_vector_sz\n+\t * @see rte_event_eth_rx_adapter_vector_limits::max_vector_sz\n+\t * Valid when RTE_EVENT_ETH_RX_ADAPTER_QUEUE_EVENT_VECTOR flag is set in\n+\t * @see rte_event_eth_rx_adapter_queue_conf::rx_queue_flags\n+\t */\n+\tuint64_t vector_timeout_ns;\n+\t/**<\n+\t * Indicates the maximum number of nanoseconds to wait for receiving\n+\t * mbufs. Should be within vectorization limits of the\n+\t * adapter\n+\t * @see rte_event_eth_rx_adapter_vector_limits::min_vector_ns\n+\t * @see rte_event_eth_rx_adapter_vector_limits::max_vector_ns\n+\t * Valid when RTE_EVENT_ETH_RX_ADAPTER_QUEUE_EVENT_VECTOR flag is set in\n+\t * @see rte_event_eth_rx_adapter_queue_conf::rx_queue_flags\n+\t */\n+\tstruct rte_mempool *vector_mp;\n+\t/**<\n+\t * Indicates the mempool that should be used for allocating\n+\t * rte_event_vector container.\n+\t * Should be created by using `rte_event_vector_pool_create`.\n+\t * Valid when RTE_EVENT_ETH_RX_ADAPTER_QUEUE_EVENT_VECTOR flag is set in\n+\t * @see rte_event_eth_rx_adapter_queue_conf::rx_queue_flags.\n+\t */\n };\n \n /**\n@@ -199,6 +230,20 @@ struct rte_event_eth_rx_adapter_stats {\n \t/**< Received packet count for interrupt mode Rx queues */\n };\n \n+/**\n+ * A structure used to retrieve eth rx adapter vector limits.\n+ */\n+struct rte_event_eth_rx_adapter_vector_limits {\n+\tuint16_t min_sz;\n+\t/**< Minimum vector limit configurable. */\n+\tuint16_t max_sz;\n+\t/**< Maximum vector limit configurable. */\n+\tuint64_t min_timeout_ns;\n+\t/**< Minimum vector timeout configurable. */\n+\tuint64_t max_timeout_ns;\n+\t/**< Maximum vector timeout configurable. */\n+};\n+\n /**\n  *\n  * Callback function invoked by the SW adapter before it continues\n@@ -467,6 +512,27 @@ int rte_event_eth_rx_adapter_cb_register(uint8_t id, uint16_t eth_dev_id,\n \t\t\t\t\t rte_event_eth_rx_adapter_cb_fn cb_fn,\n \t\t\t\t\t void *cb_arg);\n \n+/**\n+ * Retrieve vector limits for a given event dev and eth dev pair.\n+ * @see rte_event_eth_rx_adapter_vector_limits\n+ *\n+ * @param dev_id\n+ *  Event device identifier.\n+ * @param eth_port_id\n+ *  Port identifier of the ethernet device.\n+ * @param [out] limits\n+ *  A pointer to rte_event_eth_rx_adapter_vector_limits structure that has to\n+ * be filled.\n+ *\n+ * @return\n+ *  - 0: Success.\n+ *  - <0: Error code on failure.\n+ */\n+__rte_experimental\n+int rte_event_eth_rx_adapter_vector_limits_get(\n+\tuint8_t dev_id, uint16_t eth_port_id,\n+\tstruct rte_event_eth_rx_adapter_vector_limits *limits);\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h\nindex ff6cb3e6a..1cf3efa2d 100644\n--- a/lib/librte_eventdev/rte_eventdev.h\n+++ b/lib/librte_eventdev/rte_eventdev.h\n@@ -919,9 +919,27 @@ rte_event_dev_close(uint8_t dev_id);\n  * Event vector structure.\n  */\n struct rte_event_vector {\n-\tuint64_t nb_elem : 16;\n+\tuint16_t nb_elem;\n \t/**< Number of elements in this event vector. */\n-\tuint64_t rsvd : 48;\n+\tuint16_t rsvd : 15;\n+\tuint16_t attr_valid : 1;\n+\t/**< Indicates that the below union attributes have valid information.\n+\t */\n+\tunion {\n+\t\t/* Used by Rx adapter.\n+\t\t * Indicats that all the elements in this vector belong to same\n+\t\t * port and queue pair when originating from Rx adapter, valid\n+\t\t * only when event type is ETHDEV_VECTOR or\n+\t\t * ETH_RX_ADAPTER_VECTOR.\n+\t\t */\n+\t\tstruct {\n+\t\t\tuint16_t port;\n+\t\t\t/* Ethernet device port id. */\n+\t\t\tuint16_t queue;\n+\t\t\t/* Ethernet device queue id. */\n+\t\t};\n+\t};\n+\t/**< Union to hold common attributes of the vector array. */\n \tuint64_t impl_opaque;\n \tunion {\n \t\tstruct rte_mbuf *mbufs[0];\n@@ -1019,8 +1037,14 @@ struct rte_event_vector {\n  *\t\t// Classify and handle event.\n  *\t}\n  */\n+#define RTE_EVENT_TYPE_ETHDEV_VECTOR                                           \\\n+\t(RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_ETHDEV)\n+/**< The event vector generated from ethdev subsystem */\n #define RTE_EVENT_TYPE_CPU_VECTOR (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_CPU)\n /**< The event vector generated from cpu for pipelining. */\n+#define RTE_EVENT_TYPE_ETH_RX_ADAPTER_VECTOR                                   \\\n+\t(RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_ETH_RX_ADAPTER)\n+/**< The event vector generated from eth Rx adapter. */\n \n #define RTE_EVENT_TYPE_MAX              0x10\n /**< Maximum number of event types */\n@@ -1165,6 +1189,8 @@ struct rte_event {\n  * @see struct rte_event_eth_rx_adapter_queue_conf::ev\n  * @see struct rte_event_eth_rx_adapter_queue_conf::rx_queue_flags\n  */\n+#define RTE_EVENT_ETH_RX_ADAPTER_CAP_EVENT_VECTOR\t0x8\n+/**< Adapter supports event vectorization per ethdev. */\n \n /**\n  * Retrieve the event device's ethdev Rx adapter capabilities for the\ndiff --git a/lib/librte_eventdev/version.map b/lib/librte_eventdev/version.map\nindex a070ef56e..34c1c830e 100644\n--- a/lib/librte_eventdev/version.map\n+++ b/lib/librte_eventdev/version.map\n@@ -141,6 +141,7 @@ EXPERIMENTAL {\n \n \t#added in 21.05\n \trte_event_vector_pool_create;\n+\trte_event_eth_rx_adapter_vector_limits_get;\n };\n \n INTERNAL {\n",
    "prefixes": [
        "2/7"
    ]
}