get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 121658,
    "url": "https://patches.dpdk.org/api/patches/121658/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230106090501.9106-4-beilei.xing@intel.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20230106090501.9106-4-beilei.xing@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230106090501.9106-4-beilei.xing@intel.com",
    "date": "2023-01-06T09:04:59",
    "name": "[v2,3/5] net/idpf: fix splitq xmit free",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "0314813e9944d19bd7fdd1651d0ea752a541821b",
    "submitter": {
        "id": 410,
        "url": "https://patches.dpdk.org/api/people/410/?format=api",
        "name": "Xing, Beilei",
        "email": "beilei.xing@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "https://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230106090501.9106-4-beilei.xing@intel.com/mbox/",
    "series": [
        {
            "id": 26411,
            "url": "https://patches.dpdk.org/api/series/26411/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=26411",
            "date": "2023-01-06T09:04:56",
            "name": "net/idpf: code refine",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/26411/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/121658/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/121658/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 BB4D3A00C2;\n\tFri,  6 Jan 2023 10:28:14 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3CFA842D2A;\n\tFri,  6 Jan 2023 10:28:03 +0100 (CET)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by mails.dpdk.org (Postfix) with ESMTP id 2D48A42D26;\n Fri,  6 Jan 2023 10:28:01 +0100 (CET)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Jan 2023 01:28:00 -0800",
            "from dpdk-beileix-3.sh.intel.com ([10.67.110.253])\n by orsmga002.jf.intel.com with ESMTP; 06 Jan 2023 01:27:58 -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=1672997281; x=1704533281;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=mlKaZuJJrjek7S2PDcZX2JhpxPZdS0ONsWt6mT36Hfg=;\n b=ZzXpKrOKQBVmoyW2Ygbof+YSE97xehfU5t3C237J60tAvWZFU9M8D4kE\n V6qMkWBC31iMO4JqFZeoT2r6rfb/EJjzK/Hhxz40+M67w9fuvSVam0WvB\n +PKWGtC5xXXCG38pyFtUkjF9n5zoVQkdFT9JiuWiIQhRdJK7uOoGhbCSB\n dfKRR7hhXKSKauc1iu9HUxxopxLoQxF7TOju4v6YaGegWOl2YgEyE0rNn\n /bPZNrY6Imb1AVp5YFrj7W4F/nSCG4rtj02VAjRp3zvWvCPFK1jnYNDpY\n rJli8hh+XbYA6pgxCfc4GWqpT5ruv4Mi4YugjJkWANP7boHNmzMxKr90Y g==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10581\"; a=\"386893914\"",
            "E=Sophos;i=\"5.96,304,1665471600\"; d=\"scan'208\";a=\"386893914\"",
            "E=McAfee;i=\"6500,9779,10581\"; a=\"655907979\"",
            "E=Sophos;i=\"5.96,304,1665471600\"; d=\"scan'208\";a=\"655907979\""
        ],
        "X-ExtLoop1": "1",
        "From": "beilei.xing@intel.com",
        "To": "qi.z.zhang@intel.com",
        "Cc": "dev@dpdk.org, Jingjing Wu <jingjing.wu@intel.com>, stable@dpdk.org,\n Beilei Xing <beilei.xing@intel.com>",
        "Subject": "[PATCH v2 3/5] net/idpf: fix splitq xmit free",
        "Date": "Fri,  6 Jan 2023 09:04:59 +0000",
        "Message-Id": "<20230106090501.9106-4-beilei.xing@intel.com>",
        "X-Mailer": "git-send-email 2.26.2",
        "In-Reply-To": "<20230106090501.9106-1-beilei.xing@intel.com>",
        "References": "<20221208072725.32434-1-beilei.xing@intel.com>\n <20230106090501.9106-1-beilei.xing@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": "From: Jingjing Wu <jingjing.wu@intel.com>\n\nWhen context descriptor is used during sending packets, mbuf\nis not freed correctly, it will cause mempool be exhausted.\nThis patch refines the free function.\n\nFixes: 770f4dfe0f79 (\"net/idpf: support basic Tx data path\")\nCc: stable@dpdk.org\n\nSigned-off-by: Jingjing Wu <jingjing.wu@intel.com>\nSigned-off-by: Beilei Xing <beilei.xing@intel.com>\n---\n drivers/net/idpf/idpf_rxtx.c | 29 +++++++++++++++++++----------\n 1 file changed, 19 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/drivers/net/idpf/idpf_rxtx.c b/drivers/net/idpf/idpf_rxtx.c\nindex b4a396c3f5..5aef8ba2b6 100644\n--- a/drivers/net/idpf/idpf_rxtx.c\n+++ b/drivers/net/idpf/idpf_rxtx.c\n@@ -1508,6 +1508,7 @@ idpf_split_tx_free(struct idpf_tx_queue *cq)\n \tstruct idpf_tx_entry *txe;\n \tstruct idpf_tx_queue *txq;\n \tuint16_t gen, qid, q_head;\n+\tuint16_t nb_desc_clean;\n \tuint8_t ctype;\n \n \ttxd = &compl_ring[next];\n@@ -1525,20 +1526,24 @@ idpf_split_tx_free(struct idpf_tx_queue *cq)\n \n \tswitch (ctype) {\n \tcase IDPF_TXD_COMPLT_RE:\n-\t\tif (q_head == 0)\n-\t\t\ttxq->last_desc_cleaned = txq->nb_tx_desc - 1;\n-\t\telse\n-\t\t\ttxq->last_desc_cleaned = q_head - 1;\n-\t\tif (unlikely((txq->last_desc_cleaned % 32) == 0)) {\n+\t\t/* clean to q_head which indicates be fetched txq desc id + 1.\n+\t\t * TODO: need to refine and remove the if condition.\n+\t\t */\n+\t\tif (unlikely(q_head % 32)) {\n \t\t\tPMD_DRV_LOG(ERR, \"unexpected desc (head = %u) completion.\",\n \t\t\t\t\t\tq_head);\n \t\t\treturn;\n \t\t}\n-\n+\t\tif (txq->last_desc_cleaned > q_head)\n+\t\t\tnb_desc_clean = (txq->nb_tx_desc - txq->last_desc_cleaned) +\n+\t\t\t\tq_head;\n+\t\telse\n+\t\t\tnb_desc_clean = q_head - txq->last_desc_cleaned;\n+\t\ttxq->nb_free += nb_desc_clean;\n+\t\ttxq->last_desc_cleaned = q_head;\n \t\tbreak;\n \tcase IDPF_TXD_COMPLT_RS:\n-\t\ttxq->nb_free++;\n-\t\ttxq->nb_used--;\n+\t\t/* q_head indicates sw_id when ctype is 2 */\n \t\ttxe = &txq->sw_ring[q_head];\n \t\tif (txe->mbuf != NULL) {\n \t\t\trte_pktmbuf_free_seg(txe->mbuf);\n@@ -1693,12 +1698,16 @@ idpf_splitq_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \t\t/* fill the last descriptor with End of Packet (EOP) bit */\n \t\ttxd->qw1.cmd_dtype |= IDPF_TXD_FLEX_FLOW_CMD_EOP;\n \n-\t\tif (unlikely((tx_id % 32) == 0))\n-\t\t\ttxd->qw1.cmd_dtype |= IDPF_TXD_FLEX_FLOW_CMD_RE;\n \t\tif (ol_flags & IDPF_TX_CKSUM_OFFLOAD_MASK)\n \t\t\ttxd->qw1.cmd_dtype |= IDPF_TXD_FLEX_FLOW_CMD_CS_EN;\n \t\ttxq->nb_free = (uint16_t)(txq->nb_free - nb_used);\n \t\ttxq->nb_used = (uint16_t)(txq->nb_used + nb_used);\n+\n+\t\tif (txq->nb_used >= 32) {\n+\t\t\ttxd->qw1.cmd_dtype |= IDPF_TXD_FLEX_FLOW_CMD_RE;\n+\t\t\t/* Update txq RE bit counters */\n+\t\t\ttxq->nb_used = 0;\n+\t\t}\n \t}\n \n \t/* update the tail pointer if any packets were processed */\n",
    "prefixes": [
        "v2",
        "3/5"
    ]
}