Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/98295/?format=api
http://patches.dpdk.org/api/patches/98295/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210908083758.312055-15-jiawenwu@trustnetic.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": "<20210908083758.312055-15-jiawenwu@trustnetic.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210908083758.312055-15-jiawenwu@trustnetic.com", "date": "2021-09-08T08:37:40", "name": "[14/32] net/ngbe: support Rx interrupt", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "c3e7f05fe4c046b4c751b1fc56f0dc35aead199f", "submitter": { "id": 1932, "url": "http://patches.dpdk.org/api/people/1932/?format=api", "name": "Jiawen Wu", "email": "jiawenwu@trustnetic.com" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210908083758.312055-15-jiawenwu@trustnetic.com/mbox/", "series": [ { "id": 18760, "url": "http://patches.dpdk.org/api/series/18760/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=18760", "date": "2021-09-08T08:37:26", "name": "net/ngbe: add many features", "version": 1, "mbox": "http://patches.dpdk.org/series/18760/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/98295/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/98295/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 09F4CA0C56;\n\tWed, 8 Sep 2021 10:38:00 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CB156411CC;\n\tWed, 8 Sep 2021 10:36:53 +0200 (CEST)", "from smtpbgbr2.qq.com (smtpbgbr2.qq.com [54.207.22.56])\n by mails.dpdk.org (Postfix) with ESMTP id B4D17411C9\n for <dev@dpdk.org>; Wed, 8 Sep 2021 10:36:51 +0200 (CEST)", "from wxdbg.localdomain.com (unknown [183.129.236.74])\n by esmtp6.qq.com (ESMTP) with\n id ; Wed, 08 Sep 2021 16:36:45 +0800 (CST)" ], "X-QQ-mid": "bizesmtp47t1631090206tgp7hz83", "X-QQ-SSF": "01400000002000E0G000B00A0000000", "X-QQ-FEAT": "ddv/5a5hb5IVYO4sHELXr13Z7EXHOzE+cMTiGVBGJqvQ8dc5178+Joh4QFP8J\n r6stredcfv5UV1xCamtq+UXAM29IZAhvwwVSXlRNzmH1ZqW928BeqSUbPvJQ8XEw7gN2Afl\n pgb8CpMeFkXNCeyJ/Zf2+VQ2F4PQp12SQFOuYGiQfH0dPOrJ7q6rTuoQ0gOkWXgSdcWHz3y\n Ye/BbgDs15b56A2F12JGdy/uiv4TtYlFdPQ2pqNPUqv+DcJDcTjwrJ6Wtf8EmZj3KULpPem\n DuNQwDW+cwQeOiXhYrSK1anmJ5Cz6wIOCpEWN62M2rZ8n43sE6Fe1CXz0OfqOPJQtoaVx0l\n 9U3vwftiTFPZSdaOoyDrmaMn7qBLHDCyX8p0wEQ", "X-QQ-GoodBg": "2", "From": "Jiawen Wu <jiawenwu@trustnetic.com>", "To": "dev@dpdk.org", "Cc": "Jiawen Wu <jiawenwu@trustnetic.com>", "Date": "Wed, 8 Sep 2021 16:37:40 +0800", "Message-Id": "<20210908083758.312055-15-jiawenwu@trustnetic.com>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20210908083758.312055-1-jiawenwu@trustnetic.com>", "References": "<20210908083758.312055-1-jiawenwu@trustnetic.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-QQ-SENDSIZE": "520", "Feedback-ID": "bizesmtp:trustnetic.com:qybgforeign:qybgforeign6", "X-QQ-Bgrelay": "1", "Subject": "[dpdk-dev] [PATCH 14/32] net/ngbe: support Rx interrupt", "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": "Support Rx queue interrupt.\n\nSigned-off-by: Jiawen Wu <jiawenwu@trustnetic.com>\n---\n doc/guides/nics/features/ngbe.ini | 1 +\n doc/guides/nics/ngbe.rst | 1 +\n drivers/net/ngbe/ngbe_ethdev.c | 35 +++++++++++++++++++++++++++++++\n 3 files changed, 37 insertions(+)", "diff": "diff --git a/doc/guides/nics/features/ngbe.ini b/doc/guides/nics/features/ngbe.ini\nindex 1006c3935b..d14469eb43 100644\n--- a/doc/guides/nics/features/ngbe.ini\n+++ b/doc/guides/nics/features/ngbe.ini\n@@ -7,6 +7,7 @@\n Speed capabilities = Y\n Link status = Y\n Link status event = Y\n+Rx interrupt = Y\n Queue start/stop = Y\n MTU update = Y\n Jumbo frame = Y\ndiff --git a/doc/guides/nics/ngbe.rst b/doc/guides/nics/ngbe.rst\nindex 50a6e85c49..2783c4a3c4 100644\n--- a/doc/guides/nics/ngbe.rst\n+++ b/doc/guides/nics/ngbe.rst\n@@ -20,6 +20,7 @@ Features\n - Port hardware statistics\n - Jumbo frames\n - Link state information\n+- Interrupt mode for RX\n - Scattered and gather for TX and RX\n - FW version\n \ndiff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c\nindex 9caca55df3..52642161b7 100644\n--- a/drivers/net/ngbe/ngbe_ethdev.c\n+++ b/drivers/net/ngbe/ngbe_ethdev.c\n@@ -2095,6 +2095,39 @@ ngbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)\n \treturn 0;\n }\n \n+static int\n+ngbe_dev_rx_queue_intr_enable(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+\tuint32_t mask;\n+\tstruct ngbe_hw *hw = ngbe_dev_hw(dev);\n+\n+\tif (queue_id < 32) {\n+\t\tmask = rd32(hw, NGBE_IMS(0));\n+\t\tmask &= (1 << queue_id);\n+\t\twr32(hw, NGBE_IMS(0), mask);\n+\t}\n+\trte_intr_enable(intr_handle);\n+\n+\treturn 0;\n+}\n+\n+static int\n+ngbe_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)\n+{\n+\tuint32_t mask;\n+\tstruct ngbe_hw *hw = ngbe_dev_hw(dev);\n+\n+\tif (queue_id < 32) {\n+\t\tmask = rd32(hw, NGBE_IMS(0));\n+\t\tmask &= ~(1 << queue_id);\n+\t\twr32(hw, NGBE_IMS(0), mask);\n+\t}\n+\n+\treturn 0;\n+}\n+\n /**\n * Set the IVAR registers, mapping interrupt causes to vectors\n * @param hw\n@@ -2215,6 +2248,8 @@ static const struct eth_dev_ops ngbe_eth_dev_ops = {\n \t.tx_queue_start\t = ngbe_dev_tx_queue_start,\n \t.tx_queue_stop = ngbe_dev_tx_queue_stop,\n \t.rx_queue_setup = ngbe_dev_rx_queue_setup,\n+\t.rx_queue_intr_enable = ngbe_dev_rx_queue_intr_enable,\n+\t.rx_queue_intr_disable = ngbe_dev_rx_queue_intr_disable,\n \t.rx_queue_release = ngbe_dev_rx_queue_release,\n \t.tx_queue_setup = ngbe_dev_tx_queue_setup,\n \t.tx_queue_release = ngbe_dev_tx_queue_release,\n", "prefixes": [ "14/32" ] }{ "id": 98295, "url": "