get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 119203,
    "url": "http://patchwork.dpdk.org/api/patches/119203/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20221027054505.1369248-9-junfeng.guo@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20221027054505.1369248-9-junfeng.guo@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20221027054505.1369248-9-junfeng.guo@intel.com",
    "date": "2022-10-27T05:44:55",
    "name": "[v13,08/18] net/idpf: add queue release",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "d531c44275faff24eaaacfb952323f2f3453f36d",
    "submitter": {
        "id": 1785,
        "url": "http://patchwork.dpdk.org/api/people/1785/?format=api",
        "name": "Junfeng Guo",
        "email": "junfeng.guo@intel.com"
    },
    "delegate": {
        "id": 3961,
        "url": "http://patchwork.dpdk.org/api/users/3961/?format=api",
        "username": "arybchenko",
        "first_name": "Andrew",
        "last_name": "Rybchenko",
        "email": "andrew.rybchenko@oktetlabs.ru"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20221027054505.1369248-9-junfeng.guo@intel.com/mbox/",
    "series": [
        {
            "id": 25450,
            "url": "http://patchwork.dpdk.org/api/series/25450/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=25450",
            "date": "2022-10-27T05:44:47",
            "name": "add support for idpf PMD in DPDK",
            "version": 13,
            "mbox": "http://patchwork.dpdk.org/series/25450/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/119203/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/119203/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 59AE8A00C5;\n\tThu, 27 Oct 2022 07:47:54 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2149642BED;\n\tThu, 27 Oct 2022 07:47:16 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by mails.dpdk.org (Postfix) with ESMTP id 801A742BB0\n for <dev@dpdk.org>; Thu, 27 Oct 2022 07:47:09 +0200 (CEST)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 26 Oct 2022 22:47:09 -0700",
            "from dpdk-jf-ntb-one.sh.intel.com ([10.67.111.104])\n by orsmga003.jf.intel.com with ESMTP; 26 Oct 2022 22:47:07 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1666849629; x=1698385629;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=VjU4hQqjQJqZ6avmapUD4xBt15Dc6CkSIu/GYgTb6ck=;\n b=UKprzLuQ7/yYxP9lIUP6VbmgpO4cWEyxGaRVHXULOQYgSpdwGrk92LeH\n UrsBgDbg+Yllv0/4RkkodBFaDhCj40Eetf8uDZbpza0hI/5rtyJm+dopx\n rbwLZOce5ccsrzSCnYBEes5faiDZFB8Z4O+OliNghEL/IUjBoC15N18y2\n nWpiD5oRoA+OC/oQuJu3Awv6gsvcdP2vcgrEDUqhHJ2mN3oi2534quTGa\n KQq/+NN6Y12tSv64Sg13cqHnIME7xhfRroel6yxqlX4+W0kOXHTSlh4Bk\n 9arXcU9ymNeDtJcT+5rz0d2sAM4GdJzqCyTRgZU/MDBEUlM+VWReeEPAI w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10512\"; a=\"309831068\"",
            "E=Sophos;i=\"5.95,215,1661842800\"; d=\"scan'208\";a=\"309831068\"",
            "E=McAfee;i=\"6500,9779,10512\"; a=\"583429260\"",
            "E=Sophos;i=\"5.95,215,1661842800\"; d=\"scan'208\";a=\"583429260\""
        ],
        "X-ExtLoop1": "1",
        "From": "Junfeng Guo <junfeng.guo@intel.com>",
        "To": "andrew.rybchenko@oktetlabs.ru, qi.z.zhang@intel.com,\n jingjing.wu@intel.com,\n beilei.xing@intel.com",
        "Cc": "dev@dpdk.org, Junfeng Guo <junfeng.guo@intel.com>,\n Xiaoyun Li <xiaoyun.li@intel.com>",
        "Subject": "[PATCH v13 08/18] net/idpf: add queue release",
        "Date": "Thu, 27 Oct 2022 13:44:55 +0800",
        "Message-Id": "<20221027054505.1369248-9-junfeng.guo@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20221027054505.1369248-1-junfeng.guo@intel.com>",
        "References": "<20221026101027.240583-2-junfeng.guo@intel.com>\n <20221027054505.1369248-1-junfeng.guo@intel.com>",
        "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\nSigned-off-by: Beilei Xing <beilei.xing@intel.com>\nSigned-off-by: Xiaoyun Li <xiaoyun.li@intel.com>\nSigned-off-by: Junfeng Guo <junfeng.guo@intel.com>\n---\n drivers/net/idpf/idpf_ethdev.c |  2 +\n drivers/net/idpf/idpf_rxtx.c   | 81 ++++++++++++++++++++++++++++++++++\n drivers/net/idpf/idpf_rxtx.h   |  3 ++\n 3 files changed, 86 insertions(+)",
    "diff": "diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c\nindex 05f087a03c..dee1e03d43 100644\n--- a/drivers/net/idpf/idpf_ethdev.c\n+++ b/drivers/net/idpf/idpf_ethdev.c\n@@ -63,7 +63,9 @@ static const struct eth_dev_ops idpf_eth_dev_ops = {\n \t.tx_queue_start\t\t\t= idpf_tx_queue_start,\n \t.tx_queue_stop\t\t\t= idpf_tx_queue_stop,\n \t.rx_queue_setup\t\t\t= idpf_rx_queue_setup,\n+\t.rx_queue_release\t\t= idpf_dev_rx_queue_release,\n \t.tx_queue_setup\t\t\t= idpf_tx_queue_setup,\n+\t.tx_queue_release\t\t= idpf_dev_tx_queue_release,\n \t.dev_infos_get\t\t\t= idpf_dev_info_get,\n \t.link_update\t\t\t= idpf_dev_link_update,\n };\ndiff --git a/drivers/net/idpf/idpf_rxtx.c b/drivers/net/idpf/idpf_rxtx.c\nindex 8d5ec41a1f..053409b99a 100644\n--- a/drivers/net/idpf/idpf_rxtx.c\n+++ b/drivers/net/idpf/idpf_rxtx.c\n@@ -171,6 +171,51 @@ reset_split_rx_bufq(struct idpf_rx_queue *rxq)\n \trxq->bufq2 = NULL;\n }\n \n+static void\n+idpf_rx_queue_release(void *rxq)\n+{\n+\tstruct idpf_rx_queue *q = rxq;\n+\n+\tif (q == NULL)\n+\t\treturn;\n+\n+\t/* Split queue */\n+\tif (q->bufq1 != NULL && q->bufq2 != NULL) {\n+\t\tq->bufq1->ops->release_mbufs(q->bufq1);\n+\t\trte_free(q->bufq1->sw_ring);\n+\t\trte_memzone_free(q->bufq1->mz);\n+\t\trte_free(q->bufq1);\n+\t\tq->bufq2->ops->release_mbufs(q->bufq2);\n+\t\trte_free(q->bufq2->sw_ring);\n+\t\trte_memzone_free(q->bufq2->mz);\n+\t\trte_free(q->bufq2);\n+\t\trte_memzone_free(q->mz);\n+\t\trte_free(q);\n+\t\treturn;\n+\t}\n+\n+\t/* Single queue */\n+\tq->ops->release_mbufs(q);\n+\trte_free(q->sw_ring);\n+\trte_memzone_free(q->mz);\n+\trte_free(q);\n+}\n+\n+static void\n+idpf_tx_queue_release(void *txq)\n+{\n+\tstruct idpf_tx_queue *q = txq;\n+\n+\tif (q == NULL)\n+\t\treturn;\n+\n+\trte_free(q->complq);\n+\tq->ops->release_mbufs(q);\n+\trte_free(q->sw_ring);\n+\trte_memzone_free(q->mz);\n+\trte_free(q);\n+}\n+\n static inline void\n reset_split_rx_queue(struct idpf_rx_queue *rxq)\n {\n@@ -392,6 +437,12 @@ idpf_rx_split_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,\n \tif (check_rx_thresh(nb_desc, rx_free_thresh) != 0)\n \t\treturn -EINVAL;\n \n+\t/* Free memory if needed */\n+\tif (dev->data->rx_queues[queue_idx] != NULL) {\n+\t\tidpf_rx_queue_release(dev->data->rx_queues[queue_idx]);\n+\t\tdev->data->rx_queues[queue_idx] = NULL;\n+\t}\n+\n \t/* Setup Rx description queue */\n \trxq = rte_zmalloc_socket(\"idpf rxq\",\n \t\t\t\t sizeof(struct idpf_rx_queue),\n@@ -524,6 +575,12 @@ idpf_rx_single_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,\n \tif (check_rx_thresh(nb_desc, rx_free_thresh) != 0)\n \t\treturn -EINVAL;\n \n+\t/* Free memory if needed */\n+\tif (dev->data->rx_queues[queue_idx] != NULL) {\n+\t\tidpf_rx_queue_release(dev->data->rx_queues[queue_idx]);\n+\t\tdev->data->rx_queues[queue_idx] = NULL;\n+\t}\n+\n \t/* Setup Rx description queue */\n \trxq = rte_zmalloc_socket(\"idpf rxq\",\n \t\t\t\t sizeof(struct idpf_rx_queue),\n@@ -630,6 +687,12 @@ idpf_tx_split_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,\n \tif (check_tx_thresh(nb_desc, tx_rs_thresh, tx_free_thresh) != 0)\n \t\treturn -EINVAL;\n \n+\t/* Free memory if needed. */\n+\tif (dev->data->tx_queues[queue_idx] != NULL) {\n+\t\tidpf_tx_queue_release(dev->data->tx_queues[queue_idx]);\n+\t\tdev->data->tx_queues[queue_idx] = NULL;\n+\t}\n+\n \t/* Allocate the TX queue data structure. */\n \ttxq = rte_zmalloc_socket(\"idpf split txq\",\n \t\t\t\t sizeof(struct idpf_tx_queue),\n@@ -754,6 +817,12 @@ idpf_tx_single_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,\n \tif (check_tx_thresh(nb_desc, tx_rs_thresh, tx_free_thresh) != 0)\n \t\treturn -EINVAL;\n \n+\t/* Free memory if needed. */\n+\tif (dev->data->tx_queues[queue_idx] != NULL) {\n+\t\tidpf_tx_queue_release(dev->data->tx_queues[queue_idx]);\n+\t\tdev->data->tx_queues[queue_idx] = NULL;\n+\t}\n+\n \t/* Allocate the TX queue data structure. */\n \ttxq = rte_zmalloc_socket(\"idpf txq\",\n \t\t\t\t sizeof(struct idpf_tx_queue),\n@@ -1102,6 +1171,18 @@ idpf_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)\n \treturn 0;\n }\n \n+void\n+idpf_dev_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid)\n+{\n+\tidpf_rx_queue_release(dev->data->rx_queues[qid]);\n+}\n+\n+void\n+idpf_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid)\n+{\n+\tidpf_tx_queue_release(dev->data->tx_queues[qid]);\n+}\n+\n void\n idpf_stop_queues(struct rte_eth_dev *dev)\n {\ndiff --git a/drivers/net/idpf/idpf_rxtx.h b/drivers/net/idpf/idpf_rxtx.h\nindex b959638489..37944edcac 100644\n--- a/drivers/net/idpf/idpf_rxtx.h\n+++ b/drivers/net/idpf/idpf_rxtx.h\n@@ -124,12 +124,15 @@ int idpf_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,\n int idpf_rx_queue_init(struct rte_eth_dev *dev, uint16_t rx_queue_id);\n int idpf_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);\n int idpf_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);\n+void idpf_dev_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid);\n+\n int idpf_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);\n int idpf_tx_queue_init(struct rte_eth_dev *dev, uint16_t tx_queue_id);\n int idpf_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id);\n int idpf_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id);\n+void idpf_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid);\n \n void idpf_stop_queues(struct rte_eth_dev *dev);\n #endif /* _IDPF_RXTX_H_ */\n",
    "prefixes": [
        "v13",
        "08/18"
    ]
}