get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 53667,
    "url": "http://patches.dpdk.org/api/patches/53667/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1558619942-9723-3-git-send-email-david.marchand@redhat.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": "<1558619942-9723-3-git-send-email-david.marchand@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1558619942-9723-3-git-send-email-david.marchand@redhat.com",
    "date": "2019-05-23T13:58:58",
    "name": "[v4,2/5] eal: add lcore accessors",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "c038b8edd02d2d792cfa63fe08b2fb917e416e74",
    "submitter": {
        "id": 1173,
        "url": "http://patches.dpdk.org/api/people/1173/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@redhat.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1558619942-9723-3-git-send-email-david.marchand@redhat.com/mbox/",
    "series": [
        {
            "id": 4759,
            "url": "http://patches.dpdk.org/api/series/4759/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4759",
            "date": "2019-05-23T13:58:56",
            "name": "make lcore_config internal",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/4759/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/53667/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/53667/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 43D971B959;\n\tThu, 23 May 2019 15:59:57 +0200 (CEST)",
            "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id 95A5C1B94E\n\tfor <dev@dpdk.org>; Thu, 23 May 2019 15:59:52 +0200 (CEST)",
            "from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 9ED463092667;\n\tThu, 23 May 2019 13:59:48 +0000 (UTC)",
            "from dmarchan.remote.csb (ovpn-204-124.brq.redhat.com\n\t[10.40.204.124])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 0D4AC5D707;\n\tThu, 23 May 2019 13:59:45 +0000 (UTC)"
        ],
        "From": "David Marchand <david.marchand@redhat.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net,\n\tstephen@networkplumber.org",
        "Date": "Thu, 23 May 2019 15:58:58 +0200",
        "Message-Id": "<1558619942-9723-3-git-send-email-david.marchand@redhat.com>",
        "In-Reply-To": "<1558619942-9723-1-git-send-email-david.marchand@redhat.com>",
        "References": "<20190408182510.16078-1-stephen@networkplumber.org>\n\t<1558619942-9723-1-git-send-email-david.marchand@redhat.com>",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.15",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.43]); Thu, 23 May 2019 13:59:51 +0000 (UTC)",
        "Subject": "[dpdk-dev] [PATCH v4 2/5] eal: add lcore accessors",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Stephen Hemminger <stephen@networkplumber.org>\n\nThe fields of the internal EAL core configuration are currently\nlaid bare as part of the API. This is not good practice and limits\nfixing issues with layout and sizes.\n\nMake new accessor functions for the fields used by current drivers\nand examples.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\n lib/librte_eal/common/eal_common_lcore.c  | 33 +++++++++++++++++++++++++++\n lib/librte_eal/common/include/rte_lcore.h | 38 +++++++++++++++++++------------\n lib/librte_eal/rte_eal_version.map        | 10 ++++++++\n 3 files changed, 67 insertions(+), 14 deletions(-)\n\n---\nChangelog since v3:\n- updated title\n- rebased on master\n- removed doc update\n- removed unneeded rte_lcore_return_code",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_lcore.c b/lib/librte_eal/common/eal_common_lcore.c\nindex 8c2744f..38af260 100644\n--- a/lib/librte_eal/common/eal_common_lcore.c\n+++ b/lib/librte_eal/common/eal_common_lcore.c\n@@ -16,6 +16,39 @@\n #include \"eal_private.h\"\n #include \"eal_thread.h\"\n \n+int rte_lcore_index(int lcore_id)\n+{\n+\tif (unlikely(lcore_id >= RTE_MAX_LCORE))\n+\t\treturn -1;\n+\n+\tif (lcore_id < 0)\n+\t\tlcore_id = (int)rte_lcore_id();\n+\n+\treturn lcore_config[lcore_id].core_index;\n+}\n+\n+int rte_lcore_to_cpu_id(int lcore_id)\n+{\n+\tif (unlikely(lcore_id >= RTE_MAX_LCORE))\n+\t\treturn -1;\n+\n+\tif (lcore_id < 0)\n+\t\tlcore_id = (int)rte_lcore_id();\n+\n+\treturn lcore_config[lcore_id].core_id;\n+}\n+\n+rte_cpuset_t rte_lcore_cpuset(unsigned int lcore_id)\n+{\n+\treturn lcore_config[lcore_id].cpuset;\n+}\n+\n+unsigned int\n+rte_lcore_to_socket_id(unsigned int lcore_id)\n+{\n+\treturn lcore_config[lcore_id].socket_id;\n+}\n+\n static int\n socket_id_cmp(const void *a, const void *b)\n {\ndiff --git a/lib/librte_eal/common/include/rte_lcore.h b/lib/librte_eal/common/include/rte_lcore.h\nindex 705594a..e688450 100644\n--- a/lib/librte_eal/common/include/rte_lcore.h\n+++ b/lib/librte_eal/common/include/rte_lcore.h\n@@ -121,15 +121,7 @@ struct lcore_config {\n  * @return\n  *   The relative index, or -1 if not enabled.\n  */\n-static inline int\n-rte_lcore_index(int lcore_id)\n-{\n-\tif (lcore_id >= RTE_MAX_LCORE)\n-\t\treturn -1;\n-\tif (lcore_id < 0)\n-\t\tlcore_id = (int)rte_lcore_id();\n-\treturn lcore_config[lcore_id].core_index;\n-}\n+int rte_lcore_index(int lcore_id);\n \n /**\n  * Return the ID of the physical socket of the logical core we are\n@@ -177,11 +169,29 @@ struct lcore_config {\n  * @return\n  *   the ID of lcoreid's physical socket\n  */\n-static inline unsigned int\n-rte_lcore_to_socket_id(unsigned int lcore_id)\n-{\n-\treturn lcore_config[lcore_id].socket_id;\n-}\n+unsigned int\n+rte_lcore_to_socket_id(unsigned int lcore_id);\n+\n+/**\n+ * Return the id of the lcore on a socket starting from zero.\n+ *\n+ * @param lcore_id\n+ *   The targeted lcore, or -1 for the current one.\n+ * @return\n+ *   The relative index, or -1 if not enabled.\n+ */\n+int\n+rte_lcore_to_cpu_id(int lcore_id);\n+\n+/**\n+ * Return the cpuset for a given lcore.\n+ * @param lcore_id\n+ *   the targeted lcore, which MUST be between 0 and RTE_MAX_LCORE-1.\n+ * @return\n+ *   The cpuset of that lcore\n+ */\n+rte_cpuset_t\n+rte_lcore_cpuset(unsigned int lcore_id);\n \n /**\n  * Test if an lcore is enabled.\ndiff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map\nindex 2454934..cb0eb69 100644\n--- a/lib/librte_eal/rte_eal_version.map\n+++ b/lib/librte_eal/rte_eal_version.map\n@@ -287,6 +287,16 @@ DPDK_19.05 {\n \n } DPDK_18.11;\n \n+DPDK_19.08 {\n+\tglobal:\n+\n+\trte_lcore_cpuset;\n+\trte_lcore_index;\n+\trte_lcore_to_cpu_id;\n+\trte_lcore_to_socket_id;\n+\n+} DPDK_19.05;\n+\n EXPERIMENTAL {\n \tglobal:\n \n",
    "prefixes": [
        "v4",
        "2/5"
    ]
}