get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 119798,
    "url": "http://patches.dpdk.org/api/patches/119798/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20221111095824.71778-1-junfeng.guo@intel.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": "<20221111095824.71778-1-junfeng.guo@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20221111095824.71778-1-junfeng.guo@intel.com",
    "date": "2022-11-11T09:58:24",
    "name": "net/gve: support queue release",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "759827a2d934fe6e20e1c80ab8b263ace82d0daa",
    "submitter": {
        "id": 1785,
        "url": "http://patches.dpdk.org/api/people/1785/?format=api",
        "name": "Junfeng Guo",
        "email": "junfeng.guo@intel.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/20221111095824.71778-1-junfeng.guo@intel.com/mbox/",
    "series": [
        {
            "id": 25734,
            "url": "http://patches.dpdk.org/api/series/25734/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=25734",
            "date": "2022-11-11T09:58:24",
            "name": "net/gve: support queue release",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/25734/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/119798/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/119798/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 8606CA0542;\n\tFri, 11 Nov 2022 11:00:45 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 385EE427F2;\n\tFri, 11 Nov 2022 11:00:45 +0100 (CET)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id 1D36E40697\n for <dev@dpdk.org>; Fri, 11 Nov 2022 11:00:43 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 Nov 2022 02:00:43 -0800",
            "from dpdk-jf-ntb-one.sh.intel.com ([10.67.111.104])\n by fmsmga001.fm.intel.com with ESMTP; 11 Nov 2022 02:00:40 -0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1668160844; x=1699696844;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=embh2HP7EYFUfPeRVVAfbE+CkzeyizCjYEvDC9MgPHQ=;\n b=XIopv4aNNlQip09G+ZePAfOxyd6NIHOeUMXC4Z0+atyz0Ok2S9J8NUTo\n 09BjUvABhniIY0f+yRtXW7geXXYXAHGGcEkYwZPKG1GNuCIqJAPnp0eHY\n 0o1mM++wlTY+c/WgBvOX159BCwVaA8774QC/8HH3+osJlRlExrtcHXIM+\n 36qWILIcYhJrKND/2duJmbkkc1Cx0gGLZ3/jJTDWQyKs1zJE/JnSWoA22\n v1aMeC4Qqna662MgPjQXIuJh2srSm3nLd/+6iiOydGvCSogzDptaaut2Y\n EQ6Do12z83KIttRisEQxGIao8KGfxNuMBOYBH6dcanMOXjhyhdMU7UviD A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10527\"; a=\"312715968\"",
            "E=Sophos;i=\"5.96,156,1665471600\"; d=\"scan'208\";a=\"312715968\"",
            "E=McAfee;i=\"6500,9779,10527\"; a=\"780129376\"",
            "E=Sophos;i=\"5.96,156,1665471600\"; d=\"scan'208\";a=\"780129376\""
        ],
        "X-ExtLoop1": "1",
        "From": "Junfeng Guo <junfeng.guo@intel.com>",
        "To": "qi.z.zhang@intel.com, jingjing.wu@intel.com, ferruh.yigit@amd.com,\n beilei.xing@intel.com",
        "Cc": "dev@dpdk.org, xiaoyun.li@intel.com, jeroendb@google.com,\n rushilg@google.com, jrkim@google.com, Junfeng Guo <junfeng.guo@intel.com>",
        "Subject": "[PATCH] net/gve: support queue release",
        "Date": "Fri, 11 Nov 2022 17:58:24 +0800",
        "Message-Id": "<20221111095824.71778-1-junfeng.guo@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "Add support for queue operations:\n - rx_queue_release\n - tx_queue_release\n\nPrevious gve_tx_queue_release and gve_rx_queue_release functions are\nonly used internally to release Rx/Tx queue related resources. But\nwhen the queues or ports are required to re-config, both of the dev\nops tx_queue_release and ops rx_queue_release will be checked and\nthen called. Without these two dev ops, the Rx/Tx queue struct will\nbe set as NULL directly.\n\nSigned-off-by: Junfeng Guo <junfeng.guo@intel.com>\n---\n drivers/net/gve/gve_ethdev.c | 16 ++++++----------\n drivers/net/gve/gve_ethdev.h |  4 ++--\n drivers/net/gve/gve_rx.c     |  6 +++---\n drivers/net/gve/gve_tx.c     |  6 +++---\n 4 files changed, 14 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c\nindex 0086162f63..274a183250 100644\n--- a/drivers/net/gve/gve_ethdev.c\n+++ b/drivers/net/gve/gve_ethdev.c\n@@ -244,8 +244,6 @@ static int\n gve_dev_close(struct rte_eth_dev *dev)\n {\n \tstruct gve_priv *priv = dev->data->dev_private;\n-\tstruct gve_tx_queue *txq;\n-\tstruct gve_rx_queue *rxq;\n \tint err = 0;\n \tuint16_t i;\n \n@@ -255,15 +253,11 @@ gve_dev_close(struct rte_eth_dev *dev)\n \t\t\tPMD_DRV_LOG(ERR, \"Failed to stop dev.\");\n \t}\n \n-\tfor (i = 0; i < dev->data->nb_tx_queues; i++) {\n-\t\ttxq = dev->data->tx_queues[i];\n-\t\tgve_tx_queue_release(txq);\n-\t}\n+\tfor (i = 0; i < dev->data->nb_tx_queues; i++)\n+\t\tgve_tx_queue_release(dev, i);\n \n-\tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n-\t\trxq = dev->data->rx_queues[i];\n-\t\tgve_rx_queue_release(rxq);\n-\t}\n+\tfor (i = 0; i < dev->data->nb_rx_queues; i++)\n+\t\tgve_rx_queue_release(dev, i);\n \n \tgve_free_qpls(priv);\n \trte_free(priv->adminq);\n@@ -362,6 +356,8 @@ static const struct eth_dev_ops gve_eth_dev_ops = {\n \t.dev_infos_get        = gve_dev_info_get,\n \t.rx_queue_setup       = gve_rx_queue_setup,\n \t.tx_queue_setup       = gve_tx_queue_setup,\n+\t.rx_queue_release     = gve_rx_queue_release,\n+\t.tx_queue_release     = gve_tx_queue_release,\n \t.link_update          = gve_link_update,\n \t.mtu_set              = gve_dev_mtu_set,\n };\ndiff --git a/drivers/net/gve/gve_ethdev.h b/drivers/net/gve/gve_ethdev.h\nindex f6cac3ff2b..235e55899e 100644\n--- a/drivers/net/gve/gve_ethdev.h\n+++ b/drivers/net/gve/gve_ethdev.h\n@@ -291,10 +291,10 @@ gve_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id, uint16_t nb_desc,\n \t\t   unsigned int socket_id, const struct rte_eth_txconf *conf);\n \n void\n-gve_tx_queue_release(void *txq);\n+gve_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid);\n \n void\n-gve_rx_queue_release(void *rxq);\n+gve_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid);\n \n void\n gve_stop_tx_queues(struct rte_eth_dev *dev);\ndiff --git a/drivers/net/gve/gve_rx.c b/drivers/net/gve/gve_rx.c\nindex 4c5b8c517d..518c9d109c 100644\n--- a/drivers/net/gve/gve_rx.c\n+++ b/drivers/net/gve/gve_rx.c\n@@ -192,9 +192,9 @@ gve_release_rxq_mbufs(struct gve_rx_queue *rxq)\n }\n \n void\n-gve_rx_queue_release(void *rxq)\n+gve_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid)\n {\n-\tstruct gve_rx_queue *q = rxq;\n+\tstruct gve_rx_queue *q = dev->data->rx_queues[qid];\n \n \tif (!q)\n \t\treturn;\n@@ -232,7 +232,7 @@ gve_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id,\n \n \t/* Free memory if needed. */\n \tif (dev->data->rx_queues[queue_id]) {\n-\t\tgve_rx_queue_release(dev->data->rx_queues[queue_id]);\n+\t\tgve_rx_queue_release(dev, queue_id);\n \t\tdev->data->rx_queues[queue_id] = NULL;\n \t}\n \ndiff --git a/drivers/net/gve/gve_tx.c b/drivers/net/gve/gve_tx.c\nindex 4420a17192..bf4e8fea2c 100644\n--- a/drivers/net/gve/gve_tx.c\n+++ b/drivers/net/gve/gve_tx.c\n@@ -514,9 +514,9 @@ gve_release_txq_mbufs(struct gve_tx_queue *txq)\n }\n \n void\n-gve_tx_queue_release(void *txq)\n+gve_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid)\n {\n-\tstruct gve_tx_queue *q = txq;\n+\tstruct gve_tx_queue *q = dev->data->tx_queues[qid];\n \n \tif (!q)\n \t\treturn;\n@@ -553,7 +553,7 @@ gve_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id, uint16_t nb_desc,\n \n \t/* Free memory if needed. */\n \tif (dev->data->tx_queues[queue_id]) {\n-\t\tgve_tx_queue_release(dev->data->tx_queues[queue_id]);\n+\t\tgve_tx_queue_release(dev, queue_id);\n \t\tdev->data->tx_queues[queue_id] = NULL;\n \t}\n \n",
    "prefixes": []
}