get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 116789,
    "url": "http://patches.dpdk.org/api/patches/116789/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1663987546-15982-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": "<1663987546-15982-10-git-send-email-longli@linuxonhyperv.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1663987546-15982-10-git-send-email-longli@linuxonhyperv.com",
    "date": "2022-09-24T02:45:37",
    "name": "[v9,09/18] net/mana: configure Tx queues",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "266fa07dd3c1025939704d4cb3522d16bb0473d1",
    "submitter": {
        "id": 1784,
        "url": "http://patches.dpdk.org/api/people/1784/?format=api",
        "name": "Long Li",
        "email": "longli@linuxonhyperv.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/1663987546-15982-10-git-send-email-longli@linuxonhyperv.com/mbox/",
    "series": [
        {
            "id": 24807,
            "url": "http://patches.dpdk.org/api/series/24807/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=24807",
            "date": "2022-09-24T02:45:28",
            "name": "Introduce Microsoft Azure Network Adatper (MANA) PMD",
            "version": 9,
            "mbox": "http://patches.dpdk.org/series/24807/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/116789/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/116789/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 34D7DA054F;\n\tSat, 24 Sep 2022 04:46:43 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 7067442C08;\n\tSat, 24 Sep 2022 04:46:09 +0200 (CEST)",
            "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id 343D942BD0\n for <dev@dpdk.org>; Sat, 24 Sep 2022 04:45:57 +0200 (CEST)",
            "by linux.microsoft.com (Postfix, from userid 1004)\n id DD1E520C32C1; Fri, 23 Sep 2022 19:45:56 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com DD1E520C32C1",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com;\n s=default; t=1663987556;\n bh=x85t4FpEGC0pPmqlKYsInCy6y214kUJxKGAA8pKgo/E=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:From;\n b=mev3wF5WRU3hwYVNChl5eeF1cAnOBIUGITWwzd/e1j3e5+fzVcx5YwhamZvplCPeF\n lcUcuJdYEOod2CB5mojwHbWnwzO3uo+Bh7ddDpNVT3+dqt7TZI/7pPKNR0UBZd9J5n\n GrKrRBOago6IlHj8waFAwTtv/T1csVZiHLPWyZws=",
        "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 v9 09/18] net/mana: configure Tx queues",
        "Date": "Fri, 23 Sep 2022 19:45:37 -0700",
        "Message-Id": "<1663987546-15982-10-git-send-email-longli@linuxonhyperv.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1663987546-15982-1-git-send-email-longli@linuxonhyperv.com>",
        "References": "<1662674189-29524-1-git-send-email-longli@linuxonhyperv.com>\n <1663987546-15982-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---\nchange log:\nv8:\nfix coding style to function definitions\nv9:\nmove data definitions from earlier patch.\n\n drivers/net/mana/mana.c | 67 +++++++++++++++++++++++++++++++++++++++++\n drivers/net/mana/mana.h | 20 ++++++++++++\n 2 files changed, 87 insertions(+)",
    "diff": "diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c\nindex 1c5416fac5..a8a792d5f8 100644\n--- a/drivers/net/mana/mana.c\n+++ b/drivers/net/mana/mana.c\n@@ -205,6 +205,16 @@ mana_dev_info_get(struct rte_eth_dev *dev,\n \treturn 0;\n }\n \n+static void\n+mana_dev_tx_queue_info(struct rte_eth_dev *dev, uint16_t queue_id,\n+\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\n mana_dev_rx_queue_info(struct rte_eth_dev *dev, uint16_t queue_id,\n \t\t       struct rte_eth_rxq_info *qinfo)\n@@ -293,6 +303,60 @@ mana_rss_hash_conf_get(struct rte_eth_dev *dev,\n \treturn 0;\n }\n \n+static int\n+mana_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,\n+\t\t\tuint16_t nb_desc, unsigned int socket_id,\n+\t\t\tconst 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\n+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\n mana_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,\n \t\t\tuint16_t nb_desc, unsigned int socket_id,\n@@ -371,10 +435,13 @@ static 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,\ndiff --git a/drivers/net/mana/mana.h b/drivers/net/mana/mana.h\nindex a436d6cfc9..817ac75f69 100644\n--- a/drivers/net/mana/mana.h\n+++ b/drivers/net/mana/mana.h\n@@ -80,11 +80,31 @@ struct mana_priv {\n \tuint64_t max_mr_size;\n };\n \n+struct mana_txq_desc {\n+\tstruct rte_mbuf *pkt;\n+\tuint32_t wqe_size_in_bu;\n+};\n+\n struct mana_rxq_desc {\n \tstruct rte_mbuf *pkt;\n \tuint32_t wqe_size_in_bu;\n };\n \n+struct mana_txq {\n+\tstruct mana_priv *priv;\n+\tuint32_t num_desc;\n+\n+\t/* For storing pending requests */\n+\tstruct mana_txq_desc *desc_ring;\n+\n+\t/* desc_ring_head is where we put pending requests to ring,\n+\t * completion pull off desc_ring_tail\n+\t */\n+\tuint32_t desc_ring_head, desc_ring_tail;\n+\n+\tunsigned int socket;\n+};\n+\n struct mana_rxq {\n \tstruct mana_priv *priv;\n \tuint32_t num_desc;\n",
    "prefixes": [
        "v9",
        "09/18"
    ]
}