get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 130418,
    "url": "http://patches.dpdk.org/api/patches/130418/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230816153439.551501-2-bruce.richardson@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": "<20230816153439.551501-2-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230816153439.551501-2-bruce.richardson@intel.com",
    "date": "2023-08-16T15:34:29",
    "name": "[v6,01/11] mempool: fix default ops for an empty mempool",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "95cf6da0f0eae39ca1bdde645bdbfe72ded40c9b",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230816153439.551501-2-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 29252,
            "url": "http://patches.dpdk.org/api/series/29252/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=29252",
            "date": "2023-08-16T15:34:28",
            "name": "expand list of optional libraries",
            "version": 6,
            "mbox": "http://patches.dpdk.org/series/29252/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/130418/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/130418/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 02F6643081;\n\tWed, 16 Aug 2023 17:35:34 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E4A8F4324F;\n\tWed, 16 Aug 2023 17:35:33 +0200 (CEST)",
            "from mgamail.intel.com (mgamail.intel.com [192.55.52.43])\n by mails.dpdk.org (Postfix) with ESMTP id 318E64003C;\n Wed, 16 Aug 2023 17:35:32 +0200 (CEST)",
            "from orsmga004.jf.intel.com ([10.7.209.38])\n by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 16 Aug 2023 08:35:31 -0700",
            "from silpixa00401385.ir.intel.com ([10.237.214.14])\n by orsmga004.jf.intel.com with ESMTP; 16 Aug 2023 08:35:29 -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=1692200132; x=1723736132;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=+AyIjOXduHBzG5WxGVrasRlFgrXwzlKwK56VeX8q4Ws=;\n b=L+B/C2t8g7qK1OvghmgK62LbT4r8EKgxNaiQRV0V7pbaM4FXKI6GBcM+\n JaBEqQNcVUlasC+3K6S43FT7VQh6L7qKWSaTDe4rU/h0nqnH9mkRzVn+2\n NDlU9BNGWnZ2++Hf/zp85Q6g32rzG3eehETLFyjHL63RRVr0b7CJ5UHA1\n NAInn8EeyZoBB+3wgKilDDjRoi6gDnjwtB6/zcnD9jxLNO0k82S/5P+RP\n qqKalT+aMR8yBaTIViIPKAXgGmuc7tV/H2oGiDlNf+VFN5CqkSjNuKfwq\n IWJCiG7o9xN7O/hIU/YFKyK9SnRvkjpqHgScRkLdktPK0xG4edjmO15Kb g==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10803\"; a=\"458915935\"",
            "E=Sophos;i=\"6.01,177,1684825200\"; d=\"scan'208\";a=\"458915935\"",
            "E=McAfee;i=\"6600,9927,10803\"; a=\"857856212\"",
            "E=Sophos;i=\"6.01,177,1684825200\"; d=\"scan'208\";a=\"857856212\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "david.marchand@redhat.com, probb@iol.unh.edu, mb@smartsharesystems.com,\n stable@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>",
        "Subject": "[PATCH v6 01/11] mempool: fix default ops for an empty mempool",
        "Date": "Wed, 16 Aug 2023 16:34:29 +0100",
        "Message-Id": "<20230816153439.551501-2-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.39.2",
        "In-Reply-To": "<20230816153439.551501-1-bruce.richardson@intel.com>",
        "References": "<20230721115125.55137-1-bruce.richardson@intel.com>\n <20230816153439.551501-1-bruce.richardson@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: David Marchand <david.marchand@redhat.com>\n\nAn empty mempool's ops were not initialised to a default value wrt to\nwhat the application requested via the flags parameter.  As\nrte_mempool_create() relies on rte_mempool_create_empty(), simply move\nthis ops initialisation to rte_mempool_create_empty().\n\nFixes: aa10457eb4c2 (\"mempool: make mempool populate and free api public\")\nCc: stable@dpdk.org\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\nReviewed-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n lib/mempool/rte_mempool.c | 33 ++++++++++++++++-----------------\n 1 file changed, 16 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c\nindex 4d337fca8d..7a7a9bf6db 100644\n--- a/lib/mempool/rte_mempool.c\n+++ b/lib/mempool/rte_mempool.c\n@@ -914,6 +914,22 @@ rte_mempool_create_empty(const char *name, unsigned n, unsigned elt_size,\n \tSTAILQ_INIT(&mp->elt_list);\n \tSTAILQ_INIT(&mp->mem_list);\n \n+\t/*\n+\t * Since we have 4 combinations of the SP/SC/MP/MC examine the flags to\n+\t * set the correct index into the table of ops structs.\n+\t */\n+\tif ((flags & RTE_MEMPOOL_F_SP_PUT) && (flags & RTE_MEMPOOL_F_SC_GET))\n+\t\tret = rte_mempool_set_ops_byname(mp, \"ring_sp_sc\", NULL);\n+\telse if (flags & RTE_MEMPOOL_F_SP_PUT)\n+\t\tret = rte_mempool_set_ops_byname(mp, \"ring_sp_mc\", NULL);\n+\telse if (flags & RTE_MEMPOOL_F_SC_GET)\n+\t\tret = rte_mempool_set_ops_byname(mp, \"ring_mp_sc\", NULL);\n+\telse\n+\t\tret = rte_mempool_set_ops_byname(mp, \"ring_mp_mc\", NULL);\n+\n+\tif (ret)\n+\t\tgoto exit_unlock;\n+\n \t/*\n \t * local_cache pointer is set even if cache_size is zero.\n \t * The local_cache points to just past the elt_pa[] array.\n@@ -954,7 +970,6 @@ rte_mempool_create(const char *name, unsigned n, unsigned elt_size,\n \trte_mempool_obj_cb_t *obj_init, void *obj_init_arg,\n \tint socket_id, unsigned flags)\n {\n-\tint ret;\n \tstruct rte_mempool *mp;\n \n \tmp = rte_mempool_create_empty(name, n, elt_size, cache_size,\n@@ -962,22 +977,6 @@ rte_mempool_create(const char *name, unsigned n, unsigned elt_size,\n \tif (mp == NULL)\n \t\treturn NULL;\n \n-\t/*\n-\t * Since we have 4 combinations of the SP/SC/MP/MC examine the flags to\n-\t * set the correct index into the table of ops structs.\n-\t */\n-\tif ((flags & RTE_MEMPOOL_F_SP_PUT) && (flags & RTE_MEMPOOL_F_SC_GET))\n-\t\tret = rte_mempool_set_ops_byname(mp, \"ring_sp_sc\", NULL);\n-\telse if (flags & RTE_MEMPOOL_F_SP_PUT)\n-\t\tret = rte_mempool_set_ops_byname(mp, \"ring_sp_mc\", NULL);\n-\telse if (flags & RTE_MEMPOOL_F_SC_GET)\n-\t\tret = rte_mempool_set_ops_byname(mp, \"ring_mp_sc\", NULL);\n-\telse\n-\t\tret = rte_mempool_set_ops_byname(mp, \"ring_mp_mc\", NULL);\n-\n-\tif (ret)\n-\t\tgoto fail;\n-\n \t/* call the mempool priv initializer */\n \tif (mp_init)\n \t\tmp_init(mp, mp_init_arg);\n",
    "prefixes": [
        "v6",
        "01/11"
    ]
}