Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/29361/?format=api
https://patches.dpdk.org/api/patches/29361/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20170928141329.73874-25-ajit.khaparde@broadcom.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": "<20170928141329.73874-25-ajit.khaparde@broadcom.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20170928141329.73874-25-ajit.khaparde@broadcom.com", "date": "2017-09-28T14:13:29", "name": "[dpdk-dev,v3,24/24] net/bnxt: add support for rx_queue_intr_enable/disable APIs", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "9ff477f2c4fd03324b79225f72e35b02273f8a2f", "submitter": { "id": 501, "url": "https://patches.dpdk.org/api/people/501/?format=api", "name": "Ajit Khaparde", "email": "ajit.khaparde@broadcom.com" }, "delegate": { "id": 319, "url": "https://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20170928141329.73874-25-ajit.khaparde@broadcom.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/29361/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/29361/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id D54C81B265;\n\tThu, 28 Sep 2017 16:14:24 +0200 (CEST)", "from rnd-relay.smtp.broadcom.com (lpdvrndsmtp01.broadcom.com\n\t[192.19.229.170]) by dpdk.org (Postfix) with ESMTP id A2E291B211\n\tfor <dev@dpdk.org>; Thu, 28 Sep 2017 16:13:56 +0200 (CEST)", "from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net\n\t[10.75.224.233])\n\tby rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id A362830C02B;\n\tThu, 28 Sep 2017 07:13:55 -0700 (PDT)", "from C02PT1RBG8WP.vpn.broadcom.net (unknown [10.10.116.190])\n\tby mail-irv-17.broadcom.com (Postfix) with ESMTP id CE92C81EB5;\n\tThu, 28 Sep 2017 07:13:54 -0700 (PDT)" ], "From": "Ajit Khaparde <ajit.khaparde@broadcom.com>", "To": "dev@dpdk.org", "Cc": "ferruh.yigit@intel.com,\n\tSomnath Kotur <somnath.kotur@broadcom.com>", "Date": "Thu, 28 Sep 2017 09:13:29 -0500", "Message-Id": "<20170928141329.73874-25-ajit.khaparde@broadcom.com>", "X-Mailer": "git-send-email 2.13.5 (Apple Git-94)", "In-Reply-To": "<20170928141329.73874-1-ajit.khaparde@broadcom.com>", "References": "<20170928141329.73874-1-ajit.khaparde@broadcom.com>", "Subject": "[dpdk-dev] [PATCH v3 24/24] net/bnxt: add support for\n\trx_queue_intr_enable/disable APIs", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Somnath Kotur <somnath.kotur@broadcom.com>\n\nImplement Rx Queue interrupt enable/disable functions\n\nSigned-off-by: Somnath Kotur <somnath.kotur@broadcom.com>\nSigned-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>\n---\n doc/guides/nics/features/bnxt.ini | 1 +\n drivers/net/bnxt/bnxt_ethdev.c | 54 +++++++++++++++++++++++++++++++++++++++\n drivers/net/bnxt/bnxt_irq.h | 3 +++\n drivers/net/bnxt/bnxt_rxq.c | 38 +++++++++++++++++++++++++++\n drivers/net/bnxt/bnxt_rxq.h | 4 +++\n 5 files changed, 100 insertions(+)", "diff": "diff --git a/doc/guides/nics/features/bnxt.ini b/doc/guides/nics/features/bnxt.ini\nindex 0dcf07cc3..ae98de466 100644\n--- a/doc/guides/nics/features/bnxt.ini\n+++ b/doc/guides/nics/features/bnxt.ini\n@@ -22,6 +22,7 @@ Extended stats = Y\n FW version = Y\n LED = Y\n EEPROM dump = Y\n+Rx interrupt = Y\n Linux UIO = Y\n Linux VFIO = Y\n x86-64 = Y\ndiff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c\nindex 81f66cadd..5490c2aaf 100644\n--- a/drivers/net/bnxt/bnxt_ethdev.c\n+++ b/drivers/net/bnxt/bnxt_ethdev.c\n@@ -202,8 +202,16 @@ static int bnxt_init_chip(struct bnxt *bp)\n {\n \tunsigned int i, rss_idx, fw_idx;\n \tstruct rte_eth_link new;\n+\tstruct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(bp->eth_dev);\n+\tstruct rte_intr_handle *intr_handle = &pci_dev->intr_handle;\n+\tuint32_t intr_vector = 0;\n+\tuint32_t queue_id, base = BNXT_MISC_VEC_ID;\n+\tuint32_t vec = BNXT_MISC_VEC_ID;\n \tint rc;\n \n+\t/* disable uio/vfio intr/eventfd mapping */\n+\trte_intr_disable(intr_handle);\n+\n \tif (bp->eth_dev->data->mtu > ETHER_MTU) {\n \t\tbp->eth_dev->data->dev_conf.rxmode.jumbo_frame = 1;\n \t\tbp->flags |= BNXT_FLAG_JUMBO;\n@@ -306,6 +314,48 @@ static int bnxt_init_chip(struct bnxt *bp)\n \t\tgoto err_out;\n \t}\n \n+\t/* check and configure queue intr-vector mapping */\n+\tif ((rte_intr_cap_multiple(intr_handle) ||\n+\t !RTE_ETH_DEV_SRIOV(bp->eth_dev).active) &&\n+\t bp->eth_dev->data->dev_conf.intr_conf.rxq != 0) {\n+\t\tintr_vector = bp->eth_dev->data->nb_rx_queues;\n+\t\tRTE_LOG(INFO, PMD, \"%s(): intr_vector = %d\\n\", __func__,\n+\t\t\tintr_vector);\n+\t\tif (intr_vector > bp->rx_cp_nr_rings) {\n+\t\t\tRTE_LOG(ERR, PMD, \"At most %d intr queues supported\",\n+\t\t\t\t\tbp->rx_cp_nr_rings);\n+\t\t\treturn -ENOTSUP;\n+\t\t}\n+\t\tif (rte_intr_efd_enable(intr_handle, intr_vector))\n+\t\t\treturn -1;\n+\t}\n+\n+\tif (rte_intr_dp_is_en(intr_handle) && !intr_handle->intr_vec) {\n+\t\tintr_handle->intr_vec =\n+\t\t\trte_zmalloc(\"intr_vec\",\n+\t\t\t\t bp->eth_dev->data->nb_rx_queues *\n+\t\t\t\t sizeof(int), 0);\n+\t\tif (intr_handle->intr_vec == NULL) {\n+\t\t\tRTE_LOG(ERR, PMD, \"Failed to allocate %d rx_queues\"\n+\t\t\t\t\" intr_vec\", bp->eth_dev->data->nb_rx_queues);\n+\t\t\treturn -ENOMEM;\n+\t\t}\n+\t\tRTE_LOG(DEBUG, PMD, \"%s(): intr_handle->intr_vec = %p \"\n+\t\t\t\"intr_handle->nb_efd = %d intr_handle->max_intr = %d\\n\",\n+\t\t\t __func__, intr_handle->intr_vec, intr_handle->nb_efd,\n+\t\t\tintr_handle->max_intr);\n+\t}\n+\n+\tfor (queue_id = 0; queue_id < bp->eth_dev->data->nb_rx_queues;\n+\t queue_id++) {\n+\t\tintr_handle->intr_vec[queue_id] = vec;\n+\t\tif (vec < base + intr_handle->nb_efd - 1)\n+\t\t\tvec++;\n+\t}\n+\n+\t/* enable uio/vfio intr/eventfd mapping */\n+\trte_intr_enable(intr_handle);\n+\n \trc = bnxt_get_hwrm_link_config(bp, &new);\n \tif (rc) {\n \t\tRTE_LOG(ERR, PMD, \"HWRM Get link config failure rc: %x\\n\", rc);\n@@ -421,6 +471,8 @@ static void bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,\n \t};\n \teth_dev->data->dev_conf.intr_conf.lsc = 1;\n \n+\teth_dev->data->dev_conf.intr_conf.rxq = 1;\n+\n \t/* *INDENT-ON* */\n \n \t/*\n@@ -2009,6 +2061,8 @@ static const struct eth_dev_ops bnxt_dev_ops = {\n \t.rx_queue_release = bnxt_rx_queue_release_op,\n \t.tx_queue_setup = bnxt_tx_queue_setup_op,\n \t.tx_queue_release = bnxt_tx_queue_release_op,\n+\t.rx_queue_intr_enable = bnxt_rx_queue_intr_enable_op,\n+\t.rx_queue_intr_disable = bnxt_rx_queue_intr_disable_op,\n \t.reta_update = bnxt_reta_update_op,\n \t.reta_query = bnxt_reta_query_op,\n \t.rss_hash_update = bnxt_rss_hash_update_op,\ndiff --git a/drivers/net/bnxt/bnxt_irq.h b/drivers/net/bnxt/bnxt_irq.h\nindex e21bec568..4d2f7af9f 100644\n--- a/drivers/net/bnxt/bnxt_irq.h\n+++ b/drivers/net/bnxt/bnxt_irq.h\n@@ -34,6 +34,9 @@\n #ifndef _BNXT_IRQ_H_\n #define _BNXT_IRQ_H_\n \n+#define BNXT_MISC_VEC_ID RTE_INTR_VEC_ZERO_OFFSET\n+#define BNXT_RX_VEC_START RTE_INTR_VEC_RXTX_OFFSET\n+\n struct bnxt_irq {\n \trte_intr_callback_fn\thandler;\n \tunsigned int\t\tvector;\ndiff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c\nindex 690a59987..0c4e0f6ec 100644\n--- a/drivers/net/bnxt/bnxt_rxq.c\n+++ b/drivers/net/bnxt/bnxt_rxq.c\n@@ -362,3 +362,41 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,\n out:\n \treturn rc;\n }\n+\n+int\n+bnxt_rx_queue_intr_enable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id)\n+{\n+\tstruct bnxt_rx_queue *rxq;\n+\tstruct bnxt_cp_ring_info *cpr;\n+\tint rc = 0;\n+\n+\tif (eth_dev->data->rx_queues) {\n+\t\trxq = eth_dev->data->rx_queues[queue_id];\n+\t\tif (!rxq) {\n+\t\t\trc = -EINVAL;\n+\t\t\treturn rc;\n+\t\t}\n+\t\tcpr = rxq->cp_ring;\n+\t\tB_CP_DB_ARM(cpr);\n+\t}\n+\treturn rc;\n+}\n+\n+int\n+bnxt_rx_queue_intr_disable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id)\n+{\n+\tstruct bnxt_rx_queue *rxq;\n+\tstruct bnxt_cp_ring_info *cpr;\n+\tint rc = 0;\n+\n+\tif (eth_dev->data->rx_queues) {\n+\t\trxq = eth_dev->data->rx_queues[queue_id];\n+\t\tif (!rxq) {\n+\t\t\trc = -EINVAL;\n+\t\t\treturn rc;\n+\t\t}\n+\t\tcpr = rxq->cp_ring;\n+\t\tB_CP_DB_DISARM(cpr);\n+\t}\n+\treturn rc;\n+}\ndiff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h\nindex 01aaa007f..a867a4b56 100644\n--- a/drivers/net/bnxt/bnxt_rxq.h\n+++ b/drivers/net/bnxt/bnxt_rxq.h\n@@ -73,5 +73,9 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,\n \t\t\t const struct rte_eth_rxconf *rx_conf,\n \t\t\t struct rte_mempool *mp);\n void bnxt_free_rx_mbufs(struct bnxt *bp);\n+int bnxt_rx_queue_intr_enable_op(struct rte_eth_dev *eth_dev,\n+\t\t\t\t uint16_t queue_id);\n+int bnxt_rx_queue_intr_disable_op(struct rte_eth_dev *eth_dev,\n+\t\t\t\t uint16_t queue_id);\n \n #endif\n", "prefixes": [ "dpdk-dev", "v3", "24/24" ] }{ "id": 29361, "url": "