Show a patch.

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

{
    "id": 354,
    "url": "https://patches.dpdk.org/api/patches/354/?format=api",
    "web_url": "https://patches.dpdk.org/patch/354/",
    "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"
    },
    "msgid": "<1410445387-4849-3-git-send-email-bruce.richardson@intel.com>",
    "date": "2014-09-11T14:23:06",
    "name": "[dpdk-dev,2/3] eal: increase scope of eal_thread_set_affinity",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "2f2074ff8b89dd8a99db8e9f55a8970a016e4978",
    "submitter": {
        "id": 20,
        "url": "https://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/patch/354/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/354/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/354/checks/",
    "tags": {},
    "headers": {
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "Message-Id": "<1410445387-4849-3-git-send-email-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "To": "dev@dpdk.org",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 5B6D8B39A;\n\tThu, 11 Sep 2014 16:18:04 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 90526B399\n\tfor <dev@dpdk.org>; Thu, 11 Sep 2014 16:18:03 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga102.jf.intel.com with ESMTP; 11 Sep 2014 07:17:07 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga001.jf.intel.com with ESMTP; 11 Sep 2014 07:23:08 -0700",
            "from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com\n\t[10.237.217.46])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\ts8BEN7Rc013314; Thu, 11 Sep 2014 15:23:08 +0100",
            "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev02.ir.intel.com with ESMTP id s8BEN740004903;\n\tThu, 11 Sep 2014 15:23:07 +0100",
            "(from bricha3@localhost)\n\tby sivswdev02.ir.intel.com with  id s8BEN7dM004899;\n\tThu, 11 Sep 2014 15:23:07 +0100"
        ],
        "X-BeenThere": "dev@dpdk.org",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Subject": "[dpdk-dev] [PATCH 2/3] eal: increase scope of\n\teal_thread_set_affinity",
        "In-Reply-To": "<1410445387-4849-1-git-send-email-bruce.richardson@intel.com>",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Date": "Thu, 11 Sep 2014 15:23:06 +0100",
        "X-ExtLoop1": "1",
        "Precedence": "list",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "X-IronPort-AV": "E=Sophos;i=\"5.04,506,1406617200\"; d=\"scan'208\";a=\"571778894\"",
        "References": "<1410445387-4849-1-git-send-email-bruce.richardson@intel.com>",
        "X-Original-To": "patchwork@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Errors-To": "dev-bounces@dpdk.org",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Delivered-To": "patchwork@dpdk.org",
        "X-Mailman-Version": "2.1.15"
    },
    "content": "This patch changes eal_thread_set_affinity to the EAL-local function\nrte_eal_thread_set_affinity. This will allow us to use the function\nanywhere else in the EAL, while not having it part of the official APIs\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n lib/librte_eal/bsdapp/eal/eal_thread.c      |  8 ++++----\n lib/librte_eal/common/include/eal_private.h | 10 ++++++++++\n lib/librte_eal/linuxapp/eal/eal_thread.c    |  8 ++++----\n 3 files changed, 18 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/bsdapp/eal/eal_thread.c b/lib/librte_eal/bsdapp/eal/eal_thread.c\nindex 18df2a3..66191bb 100644\n--- a/lib/librte_eal/bsdapp/eal/eal_thread.c\n+++ b/lib/librte_eal/bsdapp/eal/eal_thread.c\n@@ -95,8 +95,8 @@ rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned slave_id)\n }\n \n /* set affinity for current thread */\n-static int\n-eal_thread_set_affinity(unsigned lcore_id)\n+int\n+rte_eal_thread_set_affinity(unsigned lcore_id)\n {\n \tint s;\n \tpthread_t thread;\n@@ -158,7 +158,7 @@ void eal_thread_init_master(unsigned lcore_id)\n \tRTE_PER_LCORE(_lcore_id) = lcore_id;\n \n \t/* set CPU affinity */\n-\tif (eal_thread_set_affinity(lcore_id) < 0)\n+\tif (rte_eal_thread_set_affinity(lcore_id) < 0)\n \t\trte_panic(\"cannot set affinity\\n\");\n }\n \n@@ -192,7 +192,7 @@ eal_thread_loop(__attribute__((unused)) void *arg)\n \tRTE_PER_LCORE(_lcore_id) = lcore_id;\n \n \t/* set CPU affinity */\n-\tif (eal_thread_set_affinity(lcore_id) < 0)\n+\tif (rte_eal_thread_set_affinity(lcore_id) < 0)\n \t\trte_panic(\"cannot set affinity\\n\");\n \n \t/* read on our pipe to get commands */\ndiff --git a/lib/librte_eal/common/include/eal_private.h b/lib/librte_eal/common/include/eal_private.h\nindex b440ffb..0f01f81 100644\n--- a/lib/librte_eal/common/include/eal_private.h\n+++ b/lib/librte_eal/common/include/eal_private.h\n@@ -196,4 +196,14 @@ int rte_eal_intr_init(void);\n  */\n int rte_eal_alarm_init(void);\n \n+/**\n+ * Set the affinity of the current thread to a given core\n+ *\n+ * This function is private to EAL.\n+ *\n+ * @return\n+ *  0 on success, negative on error\n+ */\n+int rte_eal_thread_set_affinity(unsigned lcore_id);\n+\n #endif /* _EAL_PRIVATE_H_ */\ndiff --git a/lib/librte_eal/linuxapp/eal/eal_thread.c b/lib/librte_eal/linuxapp/eal/eal_thread.c\nindex 9dc3f98..cf5e75c 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_thread.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_thread.c\n@@ -95,8 +95,8 @@ rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned slave_id)\n }\n \n /* set affinity for current thread */\n-static int\n-eal_thread_set_affinity(unsigned lcore_id)\n+int\n+rte_eal_thread_set_affinity(unsigned lcore_id)\n {\n \tint s;\n \tpthread_t thread;\n@@ -158,7 +158,7 @@ void eal_thread_init_master(unsigned lcore_id)\n \tRTE_PER_LCORE(_lcore_id) = lcore_id;\n \n \t/* set CPU affinity */\n-\tif (eal_thread_set_affinity(lcore_id) < 0)\n+\tif (rte_eal_thread_set_affinity(lcore_id) < 0)\n \t\trte_panic(\"cannot set affinity\\n\");\n }\n \n@@ -192,7 +192,7 @@ eal_thread_loop(__attribute__((unused)) void *arg)\n \tRTE_PER_LCORE(_lcore_id) = lcore_id;\n \n \t/* set CPU affinity */\n-\tif (eal_thread_set_affinity(lcore_id) < 0)\n+\tif (rte_eal_thread_set_affinity(lcore_id) < 0)\n \t\trte_panic(\"cannot set affinity\\n\");\n \n \t/* read on our pipe to get commands */\n",
    "prefixes": [
        "dpdk-dev",
        "2/3"
    ]
}