get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 130003,
    "url": "http://patchwork.dpdk.org/api/patches/130003/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230809013308.1449103-10-wenjing.qiao@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": "<20230809013308.1449103-10-wenjing.qiao@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230809013308.1449103-10-wenjing.qiao@intel.com",
    "date": "2023-08-09T01:33:03",
    "name": "[09/14] common/idpf/base: use local pointer before updating 'CQ out'",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5c4713f029397cf19197cb68902503bf1d52aa1c",
    "submitter": {
        "id": 2680,
        "url": "http://patchwork.dpdk.org/api/people/2680/?format=api",
        "name": "Wenjing Qiao",
        "email": "wenjing.qiao@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patchwork.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230809013308.1449103-10-wenjing.qiao@intel.com/mbox/",
    "series": [
        {
            "id": 29135,
            "url": "http://patchwork.dpdk.org/api/series/29135/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=29135",
            "date": "2023-08-09T01:32:54",
            "name": "update idpf base code",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/29135/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/130003/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/130003/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 C7C5843011;\n\tWed,  9 Aug 2023 03:34:25 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 1C83643279;\n\tWed,  9 Aug 2023 03:33:48 +0200 (CEST)",
            "from mgamail.intel.com (mgamail.intel.com [134.134.136.65])\n by mails.dpdk.org (Postfix) with ESMTP id 2C57343279\n for <dev@dpdk.org>; Wed,  9 Aug 2023 03:33:46 +0200 (CEST)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 08 Aug 2023 18:33:45 -0700",
            "from dpdk-wenjing-02.sh.intel.com ([10.67.119.75])\n by fmsmga002.fm.intel.com with ESMTP; 08 Aug 2023 18:33:43 -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=1691544826; x=1723080826;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=rAnqoUL21lfWu5qDFi+dNdsgHRQlXuoVWGayih/1j+M=;\n b=SfYSQ1dOZQRWLWbiL6rd9jO7Wb3JndEcs6bHxq74MIytoN4UHRabM+xj\n XXFuCB2cDy3P5w9c/Ib4C4kNrFIUuO8lrX036UPRFqNLl1bidiGycoi2p\n u5fbrqF3XVP02X9N50Nu3c0r0AxLCoayCjFvgRgOOB0GrVEg7PXZpH54N\n A7CJeFIyDjgF13XCIZ1+t8O3rXGhd5cpLvum1s/3vCjibxl6fVsMQDdIW\n FMkv2JVgrBoCxHbKXXY6+ckjBK+DFf1FVia4wy0PtADTvv78N/jfOy25I\n /O6/6jHIrSG+ek8IhJLsBprYRNuDiZ+X8XfO+PE+xRQigFRZZ+bvLjv+C g==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10795\"; a=\"374704503\"",
            "E=Sophos;i=\"6.01,157,1684825200\"; d=\"scan'208\";a=\"374704503\"",
            "E=McAfee;i=\"6600,9927,10795\"; a=\"845735131\"",
            "E=Sophos;i=\"6.01,157,1684825200\"; d=\"scan'208\";a=\"845735131\""
        ],
        "X-ExtLoop1": "1",
        "From": "Wenjing Qiao <wenjing.qiao@intel.com>",
        "To": "jingjing.wu@intel.com,\n\tbeilei.xing@intel.com,\n\tqi.z.zhang@intel.com",
        "Cc": "dev@dpdk.org, mingxia.liu@intel.com, wenjing.qiao@intel.com,\n Simei Su <simei.su@intel.com>,\n Pavan Kumar Linga <pavan.kumar.linga@intel.com>",
        "Subject": "[PATCH 09/14] common/idpf/base: use local pointer before updating 'CQ\n out'",
        "Date": "Wed,  9 Aug 2023 01:33:03 +0000",
        "Message-Id": "<20230809013308.1449103-10-wenjing.qiao@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20230809013308.1449103-1-wenjing.qiao@intel.com>",
        "References": "<20230809013308.1449103-1-wenjing.qiao@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: Simei Su <simei.su@intel.com>\n\nInstead of updating directly to 'cq_out' double pointer, use a\nlocal pointer and update only when we return success.\n\nSigned-off-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>\nSigned-off-by: Simei Su <simei.su@intel.com>\n---\n drivers/common/idpf/base/idpf_controlq.c | 43 +++++++++++++-----------\n 1 file changed, 23 insertions(+), 20 deletions(-)",
    "diff": "diff --git a/drivers/common/idpf/base/idpf_controlq.c b/drivers/common/idpf/base/idpf_controlq.c\nindex 6815153e1d..b84a1ea046 100644\n--- a/drivers/common/idpf/base/idpf_controlq.c\n+++ b/drivers/common/idpf/base/idpf_controlq.c\n@@ -137,6 +137,7 @@ int idpf_ctlq_add(struct idpf_hw *hw,\n \t\t  struct idpf_ctlq_create_info *qinfo,\n \t\t  struct idpf_ctlq_info **cq_out)\n {\n+\tstruct idpf_ctlq_info *cq;\n \tbool is_rxq = false;\n \tint status = 0;\n \n@@ -145,26 +146,26 @@ int idpf_ctlq_add(struct idpf_hw *hw,\n \t    qinfo->buf_size > IDPF_CTLQ_MAX_BUF_LEN)\n \t\treturn -EINVAL;\n \n-\t*cq_out = (struct idpf_ctlq_info *)\n-\t\tidpf_calloc(hw, 1, sizeof(struct idpf_ctlq_info));\n-\tif (!(*cq_out))\n+\tcq = (struct idpf_ctlq_info *)\n+\t     idpf_calloc(hw, 1, sizeof(struct idpf_ctlq_info));\n+\tif (!cq)\n \t\treturn -ENOMEM;\n \n-\t(*cq_out)->cq_type = qinfo->type;\n-\t(*cq_out)->q_id = qinfo->id;\n-\t(*cq_out)->buf_size = qinfo->buf_size;\n-\t(*cq_out)->ring_size = qinfo->len;\n+\t(cq)->cq_type = qinfo->type;\n+\t(cq)->q_id = qinfo->id;\n+\t(cq)->buf_size = qinfo->buf_size;\n+\t(cq)->ring_size = qinfo->len;\n \n-\t(*cq_out)->next_to_use = 0;\n-\t(*cq_out)->next_to_clean = 0;\n-\t(*cq_out)->next_to_post = (*cq_out)->ring_size - 1;\n+\t(cq)->next_to_use = 0;\n+\t(cq)->next_to_clean = 0;\n+\t(cq)->next_to_post = cq->ring_size - 1;\n \n \tswitch (qinfo->type) {\n \tcase IDPF_CTLQ_TYPE_MAILBOX_RX:\n \t\tis_rxq = true;\n \t\t/* fallthrough */\n \tcase IDPF_CTLQ_TYPE_MAILBOX_TX:\n-\t\tstatus = idpf_ctlq_alloc_ring_res(hw, *cq_out);\n+\t\tstatus = idpf_ctlq_alloc_ring_res(hw, cq);\n \t\tbreak;\n \tdefault:\n \t\tstatus = -EINVAL;\n@@ -175,33 +176,35 @@ int idpf_ctlq_add(struct idpf_hw *hw,\n \t\tgoto init_free_q;\n \n \tif (is_rxq) {\n-\t\tidpf_ctlq_init_rxq_bufs(*cq_out);\n+\t\tidpf_ctlq_init_rxq_bufs(cq);\n \t} else {\n \t\t/* Allocate the array of msg pointers for TX queues */\n-\t\t(*cq_out)->bi.tx_msg = (struct idpf_ctlq_msg **)\n+\t\tcq->bi.tx_msg = (struct idpf_ctlq_msg **)\n \t\t\tidpf_calloc(hw, qinfo->len,\n \t\t\t\t    sizeof(struct idpf_ctlq_msg *));\n-\t\tif (!(*cq_out)->bi.tx_msg) {\n+\t\tif (!cq->bi.tx_msg) {\n \t\t\tstatus = -ENOMEM;\n \t\t\tgoto init_dealloc_q_mem;\n \t\t}\n \t}\n \n-\tidpf_ctlq_setup_regs(*cq_out, qinfo);\n+\tidpf_ctlq_setup_regs(cq, qinfo);\n \n-\tidpf_ctlq_init_regs(hw, *cq_out, is_rxq);\n+\tidpf_ctlq_init_regs(hw, cq, is_rxq);\n \n-\tidpf_init_lock(&(*cq_out)->cq_lock);\n+\tidpf_init_lock(&(cq->cq_lock));\n \n-\tLIST_INSERT_HEAD(&hw->cq_list_head, (*cq_out), cq_list);\n+\tLIST_INSERT_HEAD(&hw->cq_list_head, cq, cq_list);\n \n+\t*cq_out = cq;\n \treturn status;\n \n init_dealloc_q_mem:\n \t/* free ring buffers and the ring itself */\n-\tidpf_ctlq_dealloc_ring_res(hw, *cq_out);\n+\tidpf_ctlq_dealloc_ring_res(hw, cq);\n init_free_q:\n-\tidpf_free(hw, *cq_out);\n+\tidpf_free(hw, cq);\n+\tcq = NULL;\n \n \treturn status;\n }\n",
    "prefixes": [
        "09/14"
    ]
}