get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2608,
    "url": "https://patches.dpdk.org/api/patches/2608/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1422428365-5875-5-git-send-email-cunming.liang@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": "<1422428365-5875-5-git-send-email-cunming.liang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1422428365-5875-5-git-send-email-cunming.liang@intel.com",
    "date": "2015-01-28T06:59:14",
    "name": "[dpdk-dev,v2,04/15] eal: new TLS definition and API declaration",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2891dbb57f973b4bbde7d1b91d8a96217daec15a",
    "submitter": {
        "id": 46,
        "url": "https://patches.dpdk.org/api/people/46/?format=api",
        "name": "Cunming Liang",
        "email": "cunming.liang@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1422428365-5875-5-git-send-email-cunming.liang@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/2608/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/2608/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 5230F5A9D;\n\tWed, 28 Jan 2015 08:00:14 +0100 (CET)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 6F85F5A7A\n\tfor <dev@dpdk.org>; Wed, 28 Jan 2015 08:00:00 +0100 (CET)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby orsmga101.jf.intel.com with ESMTP; 27 Jan 2015 22:59:59 -0800",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga002.fm.intel.com with ESMTP; 27 Jan 2015 22:59:57 -0800",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t0S6xth6023719;\n\tWed, 28 Jan 2015 14:59:55 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid t0S6xq7n005957; Wed, 28 Jan 2015 14:59:55 +0800",
            "(from cliang18@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t0S6xqoC005953; \n\tWed, 28 Jan 2015 14:59:52 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.09,479,1418112000\"; d=\"scan'208\";a=\"668814791\"",
        "From": "Cunming Liang <cunming.liang@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Wed, 28 Jan 2015 14:59:14 +0800",
        "Message-Id": "<1422428365-5875-5-git-send-email-cunming.liang@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1422428365-5875-1-git-send-email-cunming.liang@intel.com>",
        "References": "<1421914598-2747-1-git-send-email-cunming.liang@intel.com>\n\t<1422428365-5875-1-git-send-email-cunming.liang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 04/15] eal: new TLS definition and API\n\tdeclaration",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "1. add two TLS *_socket_id* and *_cpuset*\n2. add two external API rte_thread_set/get_affinity\n3. add one internal API eal_thread_dump_affinity\n\nSigned-off-by: Cunming Liang <cunming.liang@intel.com>\n---\n lib/librte_eal/bsdapp/eal/eal_thread.c    |  2 ++\n lib/librte_eal/common/eal_thread.h        | 14 ++++++++++++++\n lib/librte_eal/common/include/rte_lcore.h | 29 +++++++++++++++++++++++++++--\n lib/librte_eal/linuxapp/eal/eal_thread.c  |  2 ++\n 4 files changed, 45 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/bsdapp/eal/eal_thread.c b/lib/librte_eal/bsdapp/eal/eal_thread.c\nindex ab05368..10220c7 100644\n--- a/lib/librte_eal/bsdapp/eal/eal_thread.c\n+++ b/lib/librte_eal/bsdapp/eal/eal_thread.c\n@@ -56,6 +56,8 @@\n #include \"eal_thread.h\"\n \n RTE_DEFINE_PER_LCORE(unsigned, _lcore_id);\n+RTE_DEFINE_PER_LCORE(unsigned, _socket_id);\n+RTE_DEFINE_PER_LCORE(rte_cpuset_t, _cpuset);\n \n /*\n  * Send a message to a slave lcore identified by slave_id to call a\ndiff --git a/lib/librte_eal/common/eal_thread.h b/lib/librte_eal/common/eal_thread.h\nindex a25ee86..28edf51 100644\n--- a/lib/librte_eal/common/eal_thread.h\n+++ b/lib/librte_eal/common/eal_thread.h\n@@ -102,4 +102,18 @@ eal_cpuset_socket_id(rte_cpuset_t *cpusetp)\n \treturn socket_id;\n }\n \n+/**\n+ * Dump the current pthread cpuset.\n+ * This function is private to EAL.\n+ *\n+ * @param str\n+ *   The string buffer the cpuset will dump to.\n+ * @param size\n+ *   The string buffer size.\n+ */\n+#define CPU_STR_LEN            256\n+void\n+eal_thread_dump_affinity(char str[], unsigned size);\n+\n+\n #endif /* EAL_THREAD_H */\ndiff --git a/lib/librte_eal/common/include/rte_lcore.h b/lib/librte_eal/common/include/rte_lcore.h\nindex 4c7d6bb..facdbdc 100644\n--- a/lib/librte_eal/common/include/rte_lcore.h\n+++ b/lib/librte_eal/common/include/rte_lcore.h\n@@ -43,6 +43,7 @@\n #include <rte_per_lcore.h>\n #include <rte_eal.h>\n #include <rte_launch.h>\n+#include <rte_memory.h>\n \n #ifdef __cplusplus\n extern \"C\" {\n@@ -80,7 +81,9 @@ struct lcore_config {\n  */\n extern struct lcore_config lcore_config[RTE_MAX_LCORE];\n \n-RTE_DECLARE_PER_LCORE(unsigned, _lcore_id); /**< Per core \"core id\". */\n+RTE_DECLARE_PER_LCORE(unsigned, _lcore_id);  /**< Per thread \"lcore id\". */\n+RTE_DECLARE_PER_LCORE(unsigned, _socket_id); /**< Per thread \"socket id\". */\n+RTE_DECLARE_PER_LCORE(rte_cpuset_t, _cpuset); /**< Per thread \"cpuset\". */\n \n /**\n  * Return the ID of the execution unit we are running on.\n@@ -146,7 +149,7 @@ rte_lcore_index(int lcore_id)\n static inline unsigned\n rte_socket_id(void)\n {\n-\treturn lcore_config[rte_lcore_id()].socket_id;\n+\treturn RTE_PER_LCORE(_socket_id);\n }\n \n /**\n@@ -229,6 +232,28 @@ rte_get_next_lcore(unsigned i, int skip_master, int wrap)\n \t     i<RTE_MAX_LCORE;\t\t\t\t\t\t\\\n \t     i = rte_get_next_lcore(i, 1, 0))\n \n+/**\n+ * Set core affinity of the current thread.\n+ * Support both EAL and none-EAL thread and update TLS.\n+ *\n+ * @param cpusetp\n+ *   Point to cpu_set_t for setting current thread affinity.\n+ * @return\n+ *   On success, return 0; otherwise return -1;\n+ */\n+int rte_thread_set_affinity(rte_cpuset_t *cpusetp);\n+\n+/**\n+ * Get core affinity of the current thread.\n+ *\n+ * @param cpusetp\n+ *   Point to cpu_set_t for getting current thread cpu affinity.\n+ * @return\n+ *   On success, return 0; otherwise return -1;\n+ */\n+int rte_thread_get_affinity(rte_cpuset_t *cpusetp);\n+\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/librte_eal/linuxapp/eal/eal_thread.c b/lib/librte_eal/linuxapp/eal/eal_thread.c\nindex 80a985f..748a83a 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_thread.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_thread.c\n@@ -56,6 +56,8 @@\n #include \"eal_thread.h\"\n \n RTE_DEFINE_PER_LCORE(unsigned, _lcore_id);\n+RTE_DEFINE_PER_LCORE(unsigned, _socket_id);\n+RTE_DEFINE_PER_LCORE(rte_cpuset_t, _cpuset);\n \n /*\n  * Send a message to a slave lcore identified by slave_id to call a\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "04/15"
    ]
}