Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/105494/?format=api
http://patches.dpdk.org/api/patches/105494/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/9c8c88bbf4518007e1e4a00a0f09b8e7b76b1c8f.1640783513.git.songyl@ramaxel.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": "<9c8c88bbf4518007e1e4a00a0f09b8e7b76b1c8f.1640783513.git.songyl@ramaxel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/9c8c88bbf4518007e1e4a00a0f09b8e7b76b1c8f.1640783513.git.songyl@ramaxel.com", "date": "2021-12-29T13:37:51", "name": "[v5,23/26] net/spnic: support VFIO interrupt", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "3ef54331429b281e1424094d538a944951d94c96", "submitter": { "id": 2455, "url": "http://patches.dpdk.org/api/people/2455/?format=api", "name": "Yanling Song", "email": "songyl@ramaxel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/9c8c88bbf4518007e1e4a00a0f09b8e7b76b1c8f.1640783513.git.songyl@ramaxel.com/mbox/", "series": [ { "id": 21038, "url": "http://patches.dpdk.org/api/series/21038/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=21038", "date": "2021-12-29T13:37:28", "name": "Net/SPNIC: support SPNIC into DPDK 22.03", "version": 5, "mbox": "http://patches.dpdk.org/series/21038/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/105494/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/105494/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 4F0C3A034D;\n\tWed, 29 Dec 2021 14:41:11 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A40A141154;\n\tWed, 29 Dec 2021 14:39:31 +0100 (CET)", "from VLXDG1SPAM1.ramaxel.com (email.unionmem.com [221.4.138.186])\n by mails.dpdk.org (Postfix) with ESMTP id AB1FB41158\n for <dev@dpdk.org>; Wed, 29 Dec 2021 14:39:29 +0100 (CET)", "from V12DG1MBS01.ramaxel.local (v12dg1mbs01.ramaxel.local\n [172.26.18.31])\n by VLXDG1SPAM1.ramaxel.com with ESMTPS id 1BTDc5ex070426\n (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL);\n Wed, 29 Dec 2021 21:38:05 +0800 (GMT-8)\n (envelope-from songyl@ramaxel.com)", "from localhost.localdomain (10.64.9.47) by V12DG1MBS01.ramaxel.local\n (172.26.18.31) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Wed, 29\n Dec 2021 21:38:04 +0800" ], "From": "Yanling Song <songyl@ramaxel.com>", "To": "<dev@dpdk.org>", "CC": "<songyl@ramaxel.com>, <yanling.song@linux.dev>, <yanggan@ramaxel.com>,\n <xuyun@ramaxel.com>, <ferruh.yigit@intel.com>,\n <stephen@networkplumber.org>, <lihuisong@huawei.com>", "Subject": "[PATCH v5 23/26] net/spnic: support VFIO interrupt", "Date": "Wed, 29 Dec 2021 21:37:51 +0800", "Message-ID": "\n <9c8c88bbf4518007e1e4a00a0f09b8e7b76b1c8f.1640783513.git.songyl@ramaxel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<cover.1640783513.git.songyl@ramaxel.com>", "References": "<cover.1640783513.git.songyl@ramaxel.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Originating-IP": "[10.64.9.47]", "X-ClientProxiedBy": "V12DG1MBS03.ramaxel.local (172.26.18.33) To\n V12DG1MBS01.ramaxel.local (172.26.18.31)", "X-DNSRBL": "", "X-MAIL": "VLXDG1SPAM1.ramaxel.com 1BTDc5ex070426", "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" }, "content": "This commit supports VFIO interrupt for Rx queue and\nasynchronous event, and implements rx_queue_intr_disable()\nand rx_queue_intr_enable() to disable/enable the interrupt\nof specified Rx queue.\n\nSigned-off-by: Yanling Song <songyl@ramaxel.com>\n---\n drivers/net/spnic/base/spnic_eqs.c | 11 ++\n drivers/net/spnic/spnic_ethdev.c | 218 ++++++++++++++++++++++++++++-\n drivers/net/spnic/spnic_ethdev.h | 3 +\n drivers/net/spnic/spnic_rx.c | 2 +\n 4 files changed, 233 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/spnic/base/spnic_eqs.c b/drivers/net/spnic/base/spnic_eqs.c\nindex ee52252ecc..513d0329ed 100644\n--- a/drivers/net/spnic/base/spnic_eqs.c\n+++ b/drivers/net/spnic/base/spnic_eqs.c\n@@ -12,6 +12,7 @@\n #include \"spnic_eqs.h\"\n #include \"spnic_mgmt.h\"\n #include \"spnic_mbox.h\"\n+#include \"spnic_hw_comm.h\"\n #include \"spnic_nic_event.h\"\n \n #define AEQ_CTRL_0_INTR_IDX_SHIFT\t\t0\n@@ -648,3 +649,13 @@ int spnic_aeq_poll_msg(struct spnic_eq *eq, u32 timeout, void *param)\n \n \treturn err;\n }\n+\n+void spnic_dev_handle_aeq_event(struct spnic_hwdev *hwdev, void *param)\n+{\n+\tstruct spnic_eq *aeq = &hwdev->aeqs->aeq[0];\n+\n+\t/* Clear resend timer cnt register */\n+\tspnic_misx_intr_clear_resend_bit(hwdev, aeq->eq_irq.msix_entry_idx,\n+\t\t\t\t\t EQ_MSIX_RESEND_TIMER_CLEAR);\n+\t(void)spnic_aeq_poll_msg(aeq, 0, param);\n+}\ndiff --git a/drivers/net/spnic/spnic_ethdev.c b/drivers/net/spnic/spnic_ethdev.c\nindex be1c9c5894..c959e48727 100644\n--- a/drivers/net/spnic/spnic_ethdev.c\n+++ b/drivers/net/spnic/spnic_ethdev.c\n@@ -248,6 +248,28 @@ static const struct rte_eth_desc_lim spnic_tx_desc_lim = {\n \t.nb_align = SPNIC_TXD_ALIGN,\n };\n \n+/**\n+ * Interrupt handler triggered by NIC for handling specific event\n+ *\n+ * @param[in] param\n+ * The address of parameter (struct rte_eth_dev *) registered before\n+ */\n+static void spnic_dev_interrupt_handler(void *param)\n+{\n+\tstruct rte_eth_dev *dev = param;\n+\tstruct spnic_nic_dev *nic_dev = SPNIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);\n+\n+\tif (!rte_bit_relaxed_get32(SPNIC_DEV_INTR_EN, &nic_dev->dev_status)) {\n+\t\tPMD_DRV_LOG(WARNING,\n+\t\t\t \"Intr is disabled, ignore intr event, dev_name: %s, port_id: %d\",\n+\t\t\t nic_dev->dev_name, dev->data->port_id);\n+\t\treturn;\n+\t}\n+\n+\t/* Aeq0 msg handler */\n+\tspnic_dev_handle_aeq_event(nic_dev->hwdev, param);\n+}\n+\n /**\n * Ethernet device configuration.\n *\n@@ -952,6 +974,46 @@ static void spnic_deinit_mac_addr(struct rte_eth_dev *eth_dev)\n \tspnic_delete_mc_addr_list(nic_dev);\n }\n \n+int spnic_dev_rx_queue_intr_enable(struct rte_eth_dev *dev,\n+\t\t\t\t uint16_t queue_id)\n+{\n+\tstruct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);\n+\tstruct rte_intr_handle *intr_handle = pci_dev->intr_handle;\n+\tstruct spnic_nic_dev *nic_dev = SPNIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);\n+\tu16 msix_intr;\n+\n+\tif (!rte_intr_dp_is_en(intr_handle))\n+\t\treturn 0;\n+\n+\tif (queue_id >= dev->data->nb_rx_queues)\n+\t\treturn -EINVAL;\n+\n+\tmsix_intr = (u16)(queue_id + RTE_INTR_VEC_RXTX_OFFSET);\n+\tspnic_set_msix_state(nic_dev->hwdev, msix_intr, SPNIC_MSIX_ENABLE);\n+\n+\treturn 0;\n+}\n+\n+int spnic_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)\n+{\n+\tstruct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);\n+\tstruct rte_intr_handle *intr_handle = pci_dev->intr_handle;\n+\tstruct spnic_nic_dev *nic_dev = SPNIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);\n+\tu16 msix_intr;\n+\n+\tif (!rte_intr_dp_is_en(intr_handle))\n+\t\treturn 0;\n+\n+\tif (queue_id >= dev->data->nb_rx_queues)\n+\t\treturn -EINVAL;\n+\n+\tmsix_intr = (u16)(queue_id + RTE_INTR_VEC_RXTX_OFFSET);\n+\tspnic_set_msix_state(nic_dev->hwdev, msix_intr, SPNIC_MSIX_DISABLE);\n+\tspnic_misx_intr_clear_resend_bit(nic_dev->hwdev, msix_intr, 1);\n+\n+\treturn 0;\n+}\n+\n static int spnic_set_rxtx_configure(struct rte_eth_dev *dev)\n {\n \tstruct spnic_nic_dev *nic_dev = SPNIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);\n@@ -1085,6 +1147,108 @@ static void spnic_remove_all_vlanid(struct rte_eth_dev *dev)\n \t}\n }\n \n+static void spnic_disable_interrupt(struct rte_eth_dev *dev)\n+{\n+\tstruct spnic_nic_dev *nic_dev = SPNIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);\n+\tstruct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);\n+\n+\tif (!rte_bit_relaxed_get32(SPNIC_DEV_INIT, &nic_dev->dev_status))\n+\t\treturn;\n+\n+\t/* disable rte interrupt */\n+\trte_intr_disable(pci_dev->intr_handle);\n+\trte_intr_callback_unregister(pci_dev->intr_handle,\n+\t\t\t\t spnic_dev_interrupt_handler, (void *)dev);\n+}\n+\n+static void spnic_enable_interrupt(struct rte_eth_dev *dev)\n+{\n+\tstruct spnic_nic_dev *nic_dev = SPNIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);\n+\tstruct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);\n+\n+\tif (!rte_bit_relaxed_get32(SPNIC_DEV_INIT, &nic_dev->dev_status))\n+\t\treturn;\n+\n+\t/* enable rte interrupt */\n+\trte_intr_enable(pci_dev->intr_handle);\n+\trte_intr_callback_register(pci_dev->intr_handle,\n+\t\t\t\t spnic_dev_interrupt_handler, (void *)dev);\n+}\n+#define SPNIC_TXRX_MSIX_PENDING_LIMIT 2\n+#define SPNIC_TXRX_MSIX_COALESC_TIMER 2\n+#define SPNIC_TXRX_MSIX_RESEND_TIMER_CFG 7\n+\n+static int spnic_init_rxq_msix_attr(void *hwdev, u16 msix_index)\n+{\n+\tstruct interrupt_info info = { 0 };\n+\tint err;\n+\n+\tinfo.lli_set = 0;\n+\tinfo.interrupt_coalesc_set = 1;\n+\tinfo.pending_limt = SPNIC_TXRX_MSIX_PENDING_LIMIT;\n+\tinfo.coalesc_timer_cfg = SPNIC_TXRX_MSIX_COALESC_TIMER;\n+\tinfo.resend_timer_cfg = SPNIC_TXRX_MSIX_RESEND_TIMER_CFG;\n+\n+\tinfo.msix_index = msix_index;\n+\terr = spnic_set_interrupt_cfg(hwdev, info);\n+\tif (err) {\n+\t\tPMD_DRV_LOG(ERR, \"Set msix attr failed, msix_index %d\\n\",\n+\t\t\t msix_index);\n+\t\treturn -EFAULT;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static void spnic_deinit_rxq_intr(struct rte_eth_dev *dev)\n+{\n+\tstruct rte_intr_handle *intr_handle = dev->intr_handle;\n+\n+\trte_intr_efd_disable(intr_handle);\n+}\n+\n+static int spnic_init_rxq_intr(struct rte_eth_dev *dev)\n+{\n+\tstruct rte_intr_handle *intr_handle = NULL;\n+\tstruct spnic_nic_dev *nic_dev = NULL;\n+\tstruct spnic_rxq *rxq = NULL;\n+\tu32 nb_rx_queues, i;\n+\tint err;\n+\n+\tintr_handle = dev->intr_handle;\n+\tnic_dev = SPNIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);\n+\tif (!dev->data->dev_conf.intr_conf.rxq)\n+\t\treturn 0;\n+\n+\tif (!rte_intr_cap_multiple(intr_handle)) {\n+\t\tPMD_DRV_LOG(ERR, \"Rx queue interrupts require MSI-X interrupts\"\n+\t\t\t\" (vfio-pci driver)\\n\");\n+\t\treturn -ENOTSUP;\n+\t}\n+\n+\tnb_rx_queues = dev->data->nb_rx_queues;\n+\terr = rte_intr_efd_enable(intr_handle, nb_rx_queues);\n+\tif (err) {\n+\t\tPMD_DRV_LOG(ERR, \"Failed to enable event fds for Rx queue interrupts\\n\");\n+\t\treturn err;\n+\t}\n+\n+\tfor (i = 0; i < nb_rx_queues; i++) {\n+\t\trxq = dev->data->rx_queues[i];\n+\t\trxq->dp_intr_en = 1;\n+\t\trxq->msix_entry_idx = (u16)(i + RTE_INTR_VEC_RXTX_OFFSET);\n+\n+\t\terr = spnic_init_rxq_msix_attr(nic_dev->hwdev,\n+\t\t\t\t\t\trxq->msix_entry_idx);\n+\t\tif (err) {\n+\t\t\tspnic_deinit_rxq_intr(dev);\n+\t\t\treturn err;\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+}\n+\n static int spnic_init_sw_rxtxqs(struct spnic_nic_dev *nic_dev)\n {\n \tu32 txq_size;\n@@ -1146,6 +1310,14 @@ static int spnic_dev_start(struct rte_eth_dev *eth_dev)\n \n \tnic_dev = SPNIC_ETH_DEV_TO_PRIVATE_NIC_DEV(eth_dev);\n \n+\tspnic_disable_interrupt(eth_dev);\n+\terr = spnic_init_rxq_intr(eth_dev);\n+\tif (err) {\n+\t\tPMD_DRV_LOG(ERR, \"Init rxq intr fail, eth_dev:%s\",\n+\t\t\t eth_dev->data->name);\n+\t\tgoto init_rxq_intr_fail;\n+\t}\n+\n \tspnic_get_func_rx_buf_size(nic_dev);\n \terr = spnic_init_function_table(nic_dev->hwdev, nic_dev->rx_buff_len);\n \tif (err) {\n@@ -1193,6 +1365,9 @@ static int spnic_dev_start(struct rte_eth_dev *eth_dev)\n \t\tgoto set_rxtx_config_fail;\n \t}\n \n+\t/* enable dev interrupt */\n+\tspnic_enable_interrupt(eth_dev);\n+\n \terr = spnic_start_all_rqs(eth_dev);\n \tif (err) {\n \t\tPMD_DRV_LOG(ERR, \"Set rx config failed, dev_name: %s\",\n@@ -1237,6 +1412,7 @@ static int spnic_dev_start(struct rte_eth_dev *eth_dev)\n \t\trxq = nic_dev->rxqs[i];\n \t\tspnic_remove_rq_from_rx_queue_list(nic_dev, rxq->q_id);\n \t\tspnic_free_rxq_mbufs(rxq);\n+\t\tspnic_dev_rx_queue_intr_disable(eth_dev, rxq->q_id);\n \t\teth_dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;\n \t\teth_dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;\n \t}\n@@ -1250,6 +1426,7 @@ static int spnic_dev_start(struct rte_eth_dev *eth_dev)\n init_qp_fail:\n get_feature_err:\n init_func_tbl_fail:\n+init_rxq_intr_fail:\n \n \treturn err;\n }\n@@ -1355,7 +1532,8 @@ static int spnic_dev_close(struct rte_eth_dev *eth_dev)\n {\n \tstruct spnic_nic_dev *nic_dev =\n \tSPNIC_ETH_DEV_TO_PRIVATE_NIC_DEV(eth_dev);\n-\tint qid;\n+\tstruct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);\n+\tint qid, ret;\n \n \tif (rte_bit_relaxed_test_and_set32(SPNIC_DEV_CLOSE, &nic_dev->dev_status)) {\n \t\tPMD_DRV_LOG(WARNING, \"Device %s already closed\",\n@@ -1379,6 +1557,15 @@ static int spnic_dev_close(struct rte_eth_dev *eth_dev)\n \tspnic_remove_all_vlanid(eth_dev);\n \n \trte_bit_relaxed_clear32(SPNIC_DEV_INTR_EN, &nic_dev->dev_status);\n+\tspnic_set_msix_state(nic_dev->hwdev, 0, SPNIC_MSIX_DISABLE);\n+\tret = rte_intr_disable(pci_dev->intr_handle);\n+\tif (ret)\n+\t\tPMD_DRV_LOG(ERR, \"Device %s disable intr failed: %d\",\n+\t\t\t nic_dev->dev_name, ret);\n+\n+\t(void)rte_intr_callback_unregister(pci_dev->intr_handle,\n+\t\t\t\t\t spnic_dev_interrupt_handler,\n+\t\t\t\t\t (void *)eth_dev);\n \n \t/* Destroy rx mode mutex */\n \tspnic_mutex_destroy(&nic_dev->rx_mode_mutex);\n@@ -2511,6 +2698,8 @@ static const struct eth_dev_ops spnic_pmd_ops = {\n \t.tx_queue_setup = spnic_tx_queue_setup,\n \t.rx_queue_release = spnic_rx_queue_release,\n \t.tx_queue_release = spnic_tx_queue_release,\n+\t.rx_queue_intr_enable = spnic_dev_rx_queue_intr_enable,\n+\t.rx_queue_intr_disable = spnic_dev_rx_queue_intr_disable,\n \t.dev_start = spnic_dev_start,\n \t.dev_stop = spnic_dev_stop,\n \t.dev_close = spnic_dev_close,\n@@ -2546,6 +2735,8 @@ static const struct eth_dev_ops spnic_pmd_vf_ops = {\n \t.fw_version_get = spnic_fw_version_get,\n \t.rx_queue_setup = spnic_rx_queue_setup,\n \t.tx_queue_setup = spnic_tx_queue_setup,\n+\t.rx_queue_intr_enable = spnic_dev_rx_queue_intr_enable,\n+\t.rx_queue_intr_disable = spnic_dev_rx_queue_intr_disable,\n \t.dev_start = spnic_dev_start,\n \t.link_update = spnic_link_update,\n \t.rx_queue_release = spnic_rx_queue_release,\n@@ -2801,6 +2992,24 @@ static int spnic_func_init(struct rte_eth_dev *eth_dev)\n \t\tgoto init_mpool_fail;\n \t}\n \n+\t/* Register callback func to eal lib */\n+\terr = rte_intr_callback_register(pci_dev->intr_handle,\n+\t\t\t\t\t spnic_dev_interrupt_handler,\n+\t\t\t\t\t (void *)eth_dev);\n+\tif (err) {\n+\t\tPMD_DRV_LOG(ERR, \"Register intr callback failed, dev_name: %s\",\n+\t\t\t eth_dev->data->name);\n+\t\tgoto reg_intr_cb_fail;\n+\t}\n+\n+\t/* Enable uio/vfio intr/eventfd mapping */\n+\terr = rte_intr_enable(pci_dev->intr_handle);\n+\tif (err) {\n+\t\tPMD_DRV_LOG(ERR, \"Enable rte interrupt failed, dev_name: %s\",\n+\t\t\t eth_dev->data->name);\n+\t\tgoto enable_intr_fail;\n+\t}\n+\n \tspnic_mutex_init(&nic_dev->rx_mode_mutex, NULL);\n \n \trte_bit_relaxed_set32(SPNIC_DEV_INTR_EN, &nic_dev->dev_status);\n@@ -2811,6 +3020,13 @@ static int spnic_func_init(struct rte_eth_dev *eth_dev)\n \n \treturn 0;\n \n+enable_intr_fail:\n+\t(void)rte_intr_callback_unregister(pci_dev->intr_handle,\n+\t\t\t\t\t spnic_dev_interrupt_handler,\n+\t\t\t\t\t (void *)eth_dev);\n+\n+reg_intr_cb_fail:\n+\tspnic_copy_mempool_uninit(nic_dev);\n init_mpool_fail:\n set_default_feature_fail:\n \tspnic_deinit_mac_addr(eth_dev);\ndiff --git a/drivers/net/spnic/spnic_ethdev.h b/drivers/net/spnic/spnic_ethdev.h\nindex be429945ac..fdd0e87e62 100644\n--- a/drivers/net/spnic/spnic_ethdev.h\n+++ b/drivers/net/spnic/spnic_ethdev.h\n@@ -89,4 +89,7 @@ struct spnic_nic_dev {\n #define SPNIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev) \\\n \t((struct spnic_nic_dev *)(dev)->data->dev_private)\n \n+int spnic_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id);\n+int spnic_dev_rx_queue_intr_disable(struct rte_eth_dev *dev,\n+\t\t\t\t uint16_t queue_id);\n #endif /* _SPNIC_ETHDEV_H_ */\ndiff --git a/drivers/net/spnic/spnic_rx.c b/drivers/net/spnic/spnic_rx.c\nindex 819cbb2e0a..a835f8066a 100644\n--- a/drivers/net/spnic/spnic_rx.c\n+++ b/drivers/net/spnic/spnic_rx.c\n@@ -591,6 +591,7 @@ int spnic_start_all_rqs(struct rte_eth_dev *eth_dev)\n \t\trxq = eth_dev->data->rx_queues[i];\n \t\tspnic_add_rq_to_rx_queue_list(nic_dev, rxq->q_id);\n \t\tspnic_rearm_rxq_mbuf(rxq);\n+\t\tspnic_dev_rx_queue_intr_enable(eth_dev, rxq->q_id);\n \t\teth_dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;\n \t}\n \n@@ -609,6 +610,7 @@ int spnic_start_all_rqs(struct rte_eth_dev *eth_dev)\n \t\trxq = eth_dev->data->rx_queues[i];\n \t\tspnic_remove_rq_from_rx_queue_list(nic_dev, rxq->q_id);\n \t\tspnic_free_rxq_mbufs(rxq);\n+\t\tspnic_dev_rx_queue_intr_disable(eth_dev, rxq->q_id);\n \t\teth_dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;\n \t}\n \treturn err;\n", "prefixes": [ "v5", "23/26" ] }{ "id": 105494, "url": "