Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/113803/?format=api
http://patches.dpdk.org/api/patches/113803/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1657225822-3512-10-git-send-email-longli@linuxonhyperv.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": "<1657225822-3512-10-git-send-email-longli@linuxonhyperv.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1657225822-3512-10-git-send-email-longli@linuxonhyperv.com", "date": "2022-07-07T20:30:14", "name": "[v3,09/17] net/mana: add function to configure TX queues", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "81cf6b94f5e9187989d34b1b67c487929aa898c5", "submitter": { "id": 1784, "url": "http://patches.dpdk.org/api/people/1784/?format=api", "name": "Long Li", "email": "longli@linuxonhyperv.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1657225822-3512-10-git-send-email-longli@linuxonhyperv.com/mbox/", "series": [ { "id": 23933, "url": "http://patches.dpdk.org/api/series/23933/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=23933", "date": "2022-07-07T20:30:05", "name": "Introduce Microsoft Azure Network Adatper (MANA) PMD", "version": 3, "mbox": "http://patches.dpdk.org/series/23933/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/113803/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/113803/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 73FF8A0543;\n\tThu, 7 Jul 2022 22:31:46 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 7024F42B85;\n\tThu, 7 Jul 2022 22:30:47 +0200 (CEST)", "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id 9A27F42B70\n for <dev@dpdk.org>; Thu, 7 Jul 2022 22:30:39 +0200 (CEST)", "by linux.microsoft.com (Postfix, from userid 1004)\n id 4F0D720A8989; Thu, 7 Jul 2022 13:30:39 -0700 (PDT)" ], "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com 4F0D720A8989", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com;\n s=default; t=1657225839;\n bh=nIsYULCChpg9MT6+txq1q5rR5RysZ9HidzccaM0XgWo=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:From;\n b=KjkNwGF+OoqGH1puHFTk1YyDe4WpMFp4WDWKxEcCFqtVrb7rTE02VukJgoo3ewsKE\n UbVCzllSOlF0GK3zOohj/5cPzoDKJmC1/kE30E6dWaFXk8utJpCVG0hl+J/tdfEuoG\n oOXmtAHoIvFfLDTV3KWaW3gsEmhXM1n2eTqIgt6w=", "From": "longli@linuxonhyperv.com", "To": "Ferruh Yigit <ferruh.yigit@xilinx.com>", "Cc": "dev@dpdk.org, Ajay Sharma <sharmaajay@microsoft.com>,\n Stephen Hemminger <sthemmin@microsoft.com>, Long Li <longli@microsoft.com>", "Subject": "[Patch v3 09/17] net/mana: add function to configure TX queues", "Date": "Thu, 7 Jul 2022 13:30:14 -0700", "Message-Id": "<1657225822-3512-10-git-send-email-longli@linuxonhyperv.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1657225822-3512-1-git-send-email-longli@linuxonhyperv.com>", "References": "<1657225822-3512-1-git-send-email-longli@linuxonhyperv.com>", "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>", "Reply-To": "longli@microsoft.com", "Errors-To": "dev-bounces@dpdk.org" }, "content": "From: Long Li <longli@microsoft.com>\n\nTX hardware queue is allocated when starting the queue, this is for\npre configuration.\n\nSigned-off-by: Long Li <longli@microsoft.com>\n---\n drivers/net/mana/mana.c | 65 +++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 65 insertions(+)", "diff": "diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c\nindex eb468789d2..95ef322c95 100644\n--- a/drivers/net/mana/mana.c\n+++ b/drivers/net/mana/mana.c\n@@ -196,6 +196,15 @@ static int mana_dev_info_get(struct rte_eth_dev *dev,\n \treturn 0;\n }\n \n+static void mana_dev_tx_queue_info(struct rte_eth_dev *dev, uint16_t queue_id,\n+\t\t\t struct rte_eth_txq_info *qinfo)\n+{\n+\tstruct mana_txq *txq = dev->data->tx_queues[queue_id];\n+\n+\tqinfo->conf.offloads = dev->data->dev_conf.txmode.offloads;\n+\tqinfo->nb_desc = txq->num_desc;\n+}\n+\n static void mana_dev_rx_queue_info(struct rte_eth_dev *dev, uint16_t queue_id,\n \t\t\t\t struct rte_eth_rxq_info *qinfo)\n {\n@@ -280,6 +289,59 @@ static int mana_rss_hash_conf_get(struct rte_eth_dev *dev,\n \treturn 0;\n }\n \n+static int mana_dev_tx_queue_setup(struct rte_eth_dev *dev,\n+\t\t\t\t uint16_t queue_idx, uint16_t nb_desc,\n+\t\t\t\t unsigned int socket_id,\n+\t\t\t\t const struct rte_eth_txconf *tx_conf __rte_unused)\n+\n+{\n+\tstruct mana_priv *priv = dev->data->dev_private;\n+\tstruct mana_txq *txq;\n+\tint ret;\n+\n+\ttxq = rte_zmalloc_socket(\"mana_txq\", sizeof(*txq), 0, socket_id);\n+\tif (!txq) {\n+\t\tDRV_LOG(ERR, \"failed to allocate txq\");\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\ttxq->socket = socket_id;\n+\n+\ttxq->desc_ring = rte_malloc_socket(\"mana_tx_desc_ring\",\n+\t\t\t\t\t sizeof(struct mana_txq_desc) *\n+\t\t\t\t\t\tnb_desc,\n+\t\t\t\t\t RTE_CACHE_LINE_SIZE, socket_id);\n+\tif (!txq->desc_ring) {\n+\t\tDRV_LOG(ERR, \"failed to allocate txq desc_ring\");\n+\t\tret = -ENOMEM;\n+\t\tgoto fail;\n+\t}\n+\n+\tDRV_LOG(DEBUG, \"idx %u nb_desc %u socket %u txq->desc_ring %p\",\n+\t\tqueue_idx, nb_desc, socket_id, txq->desc_ring);\n+\n+\ttxq->desc_ring_head = 0;\n+\ttxq->desc_ring_tail = 0;\n+\ttxq->priv = priv;\n+\ttxq->num_desc = nb_desc;\n+\tdev->data->tx_queues[queue_idx] = txq;\n+\n+\treturn 0;\n+\n+fail:\n+\trte_free(txq->desc_ring);\n+\trte_free(txq);\n+\treturn ret;\n+}\n+\n+static void mana_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid)\n+{\n+\tstruct mana_txq *txq = dev->data->tx_queues[qid];\n+\n+\trte_free(txq->desc_ring);\n+\trte_free(txq);\n+}\n+\n static int mana_dev_rx_queue_setup(struct rte_eth_dev *dev,\n \t\t\t\t uint16_t queue_idx, uint16_t nb_desc,\n \t\t\t\t unsigned int socket_id,\n@@ -355,10 +417,13 @@ const struct eth_dev_ops mana_dev_ops = {\n \t.dev_configure\t\t= mana_dev_configure,\n \t.dev_close\t\t= mana_dev_close,\n \t.dev_infos_get\t\t= mana_dev_info_get,\n+\t.txq_info_get\t\t= mana_dev_tx_queue_info,\n \t.rxq_info_get\t\t= mana_dev_rx_queue_info,\n \t.dev_supported_ptypes_get = mana_supported_ptypes,\n \t.rss_hash_update\t= mana_rss_hash_update,\n \t.rss_hash_conf_get\t= mana_rss_hash_conf_get,\n+\t.tx_queue_setup\t\t= mana_dev_tx_queue_setup,\n+\t.tx_queue_release\t= mana_dev_tx_queue_release,\n \t.rx_queue_setup\t\t= mana_dev_rx_queue_setup,\n \t.rx_queue_release\t= mana_dev_rx_queue_release,\n \t.link_update\t\t= mana_dev_link_update,\n", "prefixes": [ "v3", "09/17" ] }{ "id": 113803, "url": "