get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 98159,
    "url": "https://patches.dpdk.org/api/patches/98159/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210907085904.1034167-1-ganapati.kundapura@intel.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20210907085904.1034167-1-ganapati.kundapura@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210907085904.1034167-1-ganapati.kundapura@intel.com",
    "date": "2021-09-07T08:59:03",
    "name": "[v4,1/2] eventdev: add rx queue info get api",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2ecb893a4ef8b750f15663aba3ce2f874bb05cb4",
    "submitter": {
        "id": 2287,
        "url": "https://patches.dpdk.org/api/people/2287/?format=api",
        "name": "Ganapati Kundapura",
        "email": "ganapati.kundapura@intel.com"
    },
    "delegate": {
        "id": 310,
        "url": "https://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210907085904.1034167-1-ganapati.kundapura@intel.com/mbox/",
    "series": [
        {
            "id": 18731,
            "url": "https://patches.dpdk.org/api/series/18731/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=18731",
            "date": "2021-09-07T08:59:03",
            "name": "[v4,1/2] eventdev: add rx queue info get api",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/18731/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/98159/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/98159/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 2DFECA0C46;\n\tTue,  7 Sep 2021 10:59:11 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 12027410ED;\n\tTue,  7 Sep 2021 10:59:11 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id B4EED410EB\n for <dev@dpdk.org>; Tue,  7 Sep 2021 10:59:08 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 07 Sep 2021 01:59:07 -0700",
            "from txandevlnx322.an.intel.com ([10.123.117.44])\n by FMSMGA003.fm.intel.com with ESMTP; 07 Sep 2021 01:59:07 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10099\"; a=\"220166131\"",
            "E=Sophos;i=\"5.85,274,1624345200\"; d=\"scan'208\";a=\"220166131\"",
            "E=Sophos;i=\"5.85,274,1624345200\"; d=\"scan'208\";a=\"537875244\""
        ],
        "X-ExtLoop1": "1",
        "From": "Ganapati Kundapura <ganapati.kundapura@intel.com>",
        "To": "jay.jayatheerthan@intel.com,\n\tjerinjacobk@gmail.com",
        "Cc": "dev@dpdk.org",
        "Date": "Tue,  7 Sep 2021 03:59:03 -0500",
        "Message-Id": "<20210907085904.1034167-1-ganapati.kundapura@intel.com>",
        "X-Mailer": "git-send-email 2.23.0",
        "In-Reply-To": "<20210907084932.1033295-1-ganapati.kundapura@intel.com>",
        "References": "<20210907084932.1033295-1-ganapati.kundapura@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v4 1/2] eventdev: add rx queue info get api",
        "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": "Added rte_event_eth_rx_adapter_queue_info_get() API to get rx queue\ninformation - event queue identifier, flags for handling received packets,\nschedular type, event priority, polling frequency of the receive queue\nand flow identifier in rte_event_eth_rx_adapter_queue_info structure\n\nSigned-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>\n\n---\nv4:\n* squashed 1/3 and 3/3\n\nv3:\n* Split single patch into implementaion, test and document updation\n  patches separately\n\nv2:\n* Fixed build issue due to missing entry in version.map\n\nv1:\n* Initial patch with implementaion, test and doc together\n---\n .../prog_guide/event_ethernet_rx_adapter.rst       |  8 +++\n lib/eventdev/eventdev_pmd.h                        | 31 +++++++++\n lib/eventdev/rte_event_eth_rx_adapter.c            | 76 ++++++++++++++++++++++\n lib/eventdev/rte_event_eth_rx_adapter.h            | 71 ++++++++++++++++++++\n lib/eventdev/version.map                           |  1 +\n 5 files changed, 187 insertions(+)",
    "diff": "diff --git a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst\nindex c01e5a9..9897985 100644\n--- a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst\n+++ b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst\n@@ -146,6 +146,14 @@ if the callback is supported, and the counts maintained by the service function,\n if one exists. The service function also maintains a count of cycles for which\n it was not able to enqueue to the event device.\n \n+Getting Adapter queue info\n+~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+The  ``rte_event_eth_rx_adapter_queue_info_get()`` function reports\n+flags for handling received packets, event queue identifier, scheduar type,\n+event priority, polling frequency of the receive queue and flow identifier\n+in struct ``rte_event_eth_rx_adapter_queue_info``.\n+\n Interrupt Based Rx Queues\n ~~~~~~~~~~~~~~~~~~~~~~~~~~\n \ndiff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h\nindex 0f724ac..20cc0a7 100644\n--- a/lib/eventdev/eventdev_pmd.h\n+++ b/lib/eventdev/eventdev_pmd.h\n@@ -561,6 +561,35 @@ typedef int (*eventdev_eth_rx_adapter_queue_del_t)\n \t\t\t\t\tconst struct rte_eth_dev *eth_dev,\n \t\t\t\t\tint32_t rx_queue_id);\n \n+struct rte_event_eth_rx_adapter_queue_info;\n+\n+/**\n+ * Retrieve information about Rx queue. This callback is invoked if\n+ * the caps returned from the eventdev_eth_rx_adapter_caps_get(, eth_port_id)\n+ * has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set.\n+ *\n+ * @param dev\n+ *  Event device pointer\n+ *\n+ * @param eth_dev\n+ *  Ethernet device pointer\n+ *\n+ * @param rx_queue_id\n+ *  Ethernet device receive queue index.\n+ *\n+ * @param[out] info\n+ *  Pointer to rte_event_eth_rx_adapter_queue_info structure\n+ *\n+ * @return\n+ *  - 0: Success\n+ *  - <0: Error code on failure.\n+ */\n+typedef int (*eventdev_eth_rx_adapter_queue_info_get_t)\n+\t\t\t(const struct rte_eventdev *dev,\n+\t\t\tconst struct rte_eth_dev *eth_dev,\n+\t\t\tuint16_t rx_queue_id,\n+\t\t\tstruct rte_event_eth_rx_adapter_queue_info *info);\n+\n /**\n  * Start ethernet Rx adapter. This callback is invoked if\n  * the caps returned from eventdev_eth_rx_adapter_caps_get(.., eth_port_id)\n@@ -1107,6 +1136,8 @@ struct rte_eventdev_ops {\n \t/**< Add Rx queues to ethernet Rx adapter */\n \teventdev_eth_rx_adapter_queue_del_t eth_rx_adapter_queue_del;\n \t/**< Delete Rx queues from ethernet Rx adapter */\n+\teventdev_eth_rx_adapter_queue_info_get_t eth_rx_adapter_queue_info_get;\n+\t/**< Get Rx adapter queue info */\n \teventdev_eth_rx_adapter_start_t eth_rx_adapter_start;\n \t/**< Start ethernet Rx adapter */\n \teventdev_eth_rx_adapter_stop_t eth_rx_adapter_stop;\ndiff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c\nindex 7c94c73..98184fb 100644\n--- a/lib/eventdev/rte_event_eth_rx_adapter.c\n+++ b/lib/eventdev/rte_event_eth_rx_adapter.c\n@@ -2811,3 +2811,79 @@ rte_event_eth_rx_adapter_cb_register(uint8_t id,\n \n \treturn 0;\n }\n+\n+int\n+rte_event_eth_rx_adapter_queue_info_get(uint8_t id, uint16_t eth_dev_id,\n+\t\t\tuint16_t rx_queue_id,\n+\t\t\tstruct rte_event_eth_rx_adapter_queue_info *info)\n+{\n+\tstruct rte_eventdev *dev;\n+\tstruct eth_device_info *dev_info;\n+\tstruct rte_event_eth_rx_adapter *rx_adapter;\n+\tstruct eth_rx_queue_info *queue_info;\n+\tstruct rte_event *qi_ev;\n+\tint ret;\n+\tuint32_t cap;\n+\n+\tRTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(eth_dev_id, -EINVAL);\n+\n+\tif (rx_queue_id >= rte_eth_devices[eth_dev_id].data->nb_rx_queues) {\n+\t\tRTE_EDEV_LOG_ERR(\"Invalid rx queue_id %u\", rx_queue_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (info == NULL) {\n+\t\tRTE_EDEV_LOG_ERR(\"Rx queue info cannot be NULL\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\trx_adapter = rxa_id_to_adapter(id);\n+\tif (rx_adapter == NULL)\n+\t\treturn -EINVAL;\n+\n+\tdev = &rte_eventdevs[rx_adapter->eventdev_id];\n+\tret = rte_event_eth_rx_adapter_caps_get(rx_adapter->eventdev_id,\n+\t\t\t\t\t\teth_dev_id,\n+\t\t\t\t\t\t&cap);\n+\tif (ret) {\n+\t\tRTE_EDEV_LOG_ERR(\"Failed to get adapter caps edev %\" PRIu8\n+\t\t\t\t \"eth port %\" PRIu16, id, eth_dev_id);\n+\t\treturn ret;\n+\t}\n+\n+\tif (cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT) {\n+\t\tRTE_FUNC_PTR_OR_ERR_RET(\n+\t\t\t\t*dev->dev_ops->eth_rx_adapter_queue_info_get,\n+\t\t\t\t-ENOTSUP);\n+\t\tret = (*dev->dev_ops->eth_rx_adapter_queue_info_get)(dev,\n+\t\t\t\t\t\t&rte_eth_devices[eth_dev_id],\n+\t\t\t\t\t\trx_queue_id,\n+\t\t\t\t\t\tinfo);\n+\t\treturn ret;\n+\t}\n+\n+\tdev_info = &rx_adapter->eth_devices[eth_dev_id];\n+\n+\tqueue_info = &dev_info->rx_queue[rx_queue_id];\n+\tif (!queue_info->queue_enabled) {\n+\t\tRTE_EDEV_LOG_ERR(\"Rx queue %u not added\", rx_queue_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tqi_ev = (struct rte_event *)&queue_info->event;\n+\n+\tmemset(info, 0, sizeof(*info));\n+\tinfo->servicing_weight = queue_info->wt;\n+\tinfo->event_queue_id = qi_ev->queue_id;\n+\tinfo->sched_type = qi_ev->sched_type;\n+\tinfo->priority = qi_ev->priority;\n+\tinfo->rx_queue_flags = 0;\n+\tif (queue_info->flow_id_mask != 0) {\n+\t\tinfo->rx_queue_flags |=\n+\t\t\t\tRTE_EVENT_ETH_RX_ADAPTER_QUEUE_FLOW_ID_VALID;\n+\t\tinfo->flow_id = qi_ev->flow_id;\n+\t}\n+\n+\treturn 0;\n+}\ndiff --git a/lib/eventdev/rte_event_eth_rx_adapter.h b/lib/eventdev/rte_event_eth_rx_adapter.h\nindex 182dd2e..75c0010 100644\n--- a/lib/eventdev/rte_event_eth_rx_adapter.h\n+++ b/lib/eventdev/rte_event_eth_rx_adapter.h\n@@ -33,6 +33,7 @@\n  *  - rte_event_eth_rx_adapter_stop()\n  *  - rte_event_eth_rx_adapter_stats_get()\n  *  - rte_event_eth_rx_adapter_stats_reset()\n+ *  - rte_event_eth_rx_adapter_queue_info_get()\n  *\n  * The application creates an ethernet to event adapter using\n  * rte_event_eth_rx_adapter_create_ext() or rte_event_eth_rx_adapter_create()\n@@ -140,6 +141,56 @@ typedef int (*rte_event_eth_rx_adapter_conf_cb) (uint8_t id, uint8_t dev_id,\n \t\t\tvoid *arg);\n \n /**\n+ * Rx queue info\n+ */\n+struct rte_event_eth_rx_adapter_queue_info {\n+\tuint32_t rx_queue_flags;\n+\t/**< Flags for handling received packets\n+\t * @see RTE_EVENT_ETH_RX_ADAPTER_QUEUE_FLOW_ID_VALID\n+\t */\n+\tuint16_t servicing_weight;\n+\t/**< Relative polling frequency of ethernet receive queue when the\n+\t * adapter uses a service core function for ethernet to event device\n+\t * transfers. If it is set to zero, the Rx queue is interrupt driven\n+\t * (unless rx queue interrupts are not enabled for the ethernet\n+\t * device).\n+\t */\n+\n+\tuint8_t event_queue_id;\n+\t/**< Targeted event queue identifier for the enqueue or\n+\t * dequeue operation.\n+\t * The value must be in the range of\n+\t * [0, nb_event_queues - 1] which previously supplied to\n+\t * rte_event_dev_configure().\n+\t */\n+\n+\tuint8_t sched_type;\n+\t/**< Scheduler synchronization type (RTE_SCHED_TYPE_*)\n+\t * associated with flow id on a given event queue\n+\t * for the enqueue and dequeue operation.\n+\t */\n+\n+\tuint8_t priority;\n+\t/**< Event priority relative to other events in the\n+\t * event queue. The requested priority should in the\n+\t * range of  [RTE_EVENT_DEV_PRIORITY_HIGHEST,\n+\t * RTE_EVENT_DEV_PRIORITY_LOWEST].\n+\t * The implementation shall normalize the requested\n+\t * priority to supported priority value.\n+\t * Valid when the device has\n+\t * RTE_EVENT_DEV_CAP_EVENT_QOS capability.\n+\t */\n+\n+\tuint32_t flow_id;\n+\t/**< Targeted flow identifier for the enqueue and\n+\t * dequeue operation.\n+\t * The value must be in the range of\n+\t * [0, nb_event_queue_flows - 1] which\n+\t * previously supplied to rte_event_dev_configure().\n+\t */\n+};\n+\n+/**\n  * Rx queue configuration structure\n  */\n struct rte_event_eth_rx_adapter_queue_conf {\n@@ -575,6 +626,26 @@ int rte_event_eth_rx_adapter_queue_event_vector_config(\n \tuint8_t id, uint16_t eth_dev_id, int32_t rx_queue_id,\n \tstruct rte_event_eth_rx_adapter_event_vector_config *config);\n \n+/**\n+ * Retrieve information about Rx queue.\n+ *\n+ * @param id\n+ *  Adapter identifier.\n+ * @param eth_dev_id\n+ *  Port identifier of Ethernet device.\n+ * @param rx_queue_id\n+ *  Ethernet device receive queue index.\n+ * @param info\n+ *  Pointer to struct rte_event_eth_rx_adapter_queue_info\n+ * @return\n+ *  - 0: Success, Receive queue added correctly.\n+ *  - <0: Error code on failure.\n+ */\n+int rte_event_eth_rx_adapter_queue_info_get(uint8_t id,\n+\t\t     uint16_t eth_dev_id,\n+\t\t     uint16_t rx_queue_id,\n+\t\t     struct rte_event_eth_rx_adapter_queue_info *info);\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/eventdev/version.map b/lib/eventdev/version.map\nindex 8862562..258affd 100644\n--- a/lib/eventdev/version.map\n+++ b/lib/eventdev/version.map\n@@ -143,6 +143,7 @@ EXPERIMENTAL {\n \trte_event_vector_pool_create;\n \trte_event_eth_rx_adapter_vector_limits_get;\n \trte_event_eth_rx_adapter_queue_event_vector_config;\n+\trte_event_eth_rx_adapter_queue_info_get;\n \t__rte_eventdev_trace_crypto_adapter_enqueue;\n };\n \n",
    "prefixes": [
        "v4",
        "1/2"
    ]
}