Show a patch.

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

{
    "id": 73342,
    "url": "https://patches.dpdk.org/api/patches/73342/",
    "web_url": "https://patches.dpdk.org/patch/73342/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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": "<20200706205234.8040-4-david.marchand@redhat.com>",
    "date": "2020-07-06T20:52:27",
    "name": "[v6,03/10] eal: introduce thread init helper",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "c7c10134c021efba8c359fa63c80091ff5338491",
    "submitter": {
        "id": 1173,
        "url": "https://patches.dpdk.org/api/people/1173/",
        "name": "David Marchand",
        "email": "david.marchand@redhat.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/patch/73342/mbox/",
    "series": [
        {
            "id": 10826,
            "url": "https://patches.dpdk.org/api/series/10826/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10826",
            "date": "2020-07-06T20:52:25",
            "name": "Register non-EAL threads as lcore",
            "version": 6,
            "mbox": "https://patches.dpdk.org/series/10826/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/73342/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/73342/checks/",
    "tags": {},
    "headers": {
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "To": "dev@dpdk.org",
        "X-MC-Unique": "oopeFXeiNFCG8Y6bd4UmPA-1",
        "Message-Id": "<20200706205234.8040-4-david.marchand@redhat.com>",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1594068788;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=E54v03bb2+hpUh6ihJTcG8VCcAwR1+8C1shjD5kYdQA=;\n b=hCEOmRTR7jiFXrDa4tgQLCu6QX/JCbr/yzT7ovZ/ffdnSR7K6KhYG3dl8KpWrqWSpxYXAk\n t+0VoJfbnARORkAnrGV43pBqBqT1A0c6fmJPKJf306LKavD02215ohIAgzvExRU2avAI+a\n zr8Z1t3EeY0jRna8QWVtKzOBfkgVCc4=",
        "X-Scanned-By": "MIMEDefang 2.84 on 10.5.11.22",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-BeenThere": "dev@dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 0CF73A00C5;\n\tMon,  6 Jul 2020 22:53:24 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 3E4E31DDAC;\n\tMon,  6 Jul 2020 22:53:10 +0200 (CEST)",
            "from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com\n [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 989A51DD75\n for <dev@dpdk.org>; Mon,  6 Jul 2020 22:53:08 +0200 (CEST)",
            "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-104-oopeFXeiNFCG8Y6bd4UmPA-1; Mon, 06 Jul 2020 16:53:04 -0400",
            "from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com\n [10.5.11.22])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 53AAF19057A0;\n Mon,  6 Jul 2020 20:53:02 +0000 (UTC)",
            "from dmarchan.remote.csb (unknown [10.40.195.188])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 837CE10013D7;\n Mon,  6 Jul 2020 20:52:57 +0000 (UTC)"
        ],
        "Subject": "[dpdk-dev] [PATCH v6 03/10] eal: introduce thread init helper",
        "In-Reply-To": "<20200706205234.8040-1-david.marchand@redhat.com>",
        "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com",
        "X-Mimecast-Spam-Score": "0",
        "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-Post": "<mailto:dev@dpdk.org>",
        "Cc": "jerinjacobk@gmail.com, bruce.richardson@intel.com, mdr@ashroe.eu,\n thomas@monjalon.net, arybchenko@solarflare.com, ktraynor@redhat.com,\n ian.stokes@intel.com, i.maximets@ovn.org, olivier.matz@6wind.com,\n konstantin.ananyev@intel.com,\n Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>,\n Omar Cardona <ocardona@microsoft.com>,\n Pallavi Kadam <pallavi.kadam@intel.com>,\n Ranjit Menon <ranjit.menon@intel.com>",
        "Precedence": "list",
        "From": "David Marchand <david.marchand@redhat.com>",
        "Content-Transfer-Encoding": "8bit",
        "MIME-Version": "1.0",
        "References": "<20200610144506.30505-1-david.marchand@redhat.com>\n <20200706205234.8040-1-david.marchand@redhat.com>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Errors-To": "dev-bounces@dpdk.org",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Content-Type": "text/plain; charset=US-ASCII",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Date": "Mon,  6 Jul 2020 22:52:27 +0200",
        "X-Mimecast-Originator": "redhat.com",
        "X-Mailman-Version": "2.1.15"
    },
    "content": "Introduce a helper responsible for initialising the per thread context.\nWe can then have a unified context for EAL and non-EAL threads and\nremove copy/paste'd OS-specific helpers.\n\nPer EAL thread CPU affinity setting is separated from the thread init.\nIt is to accommodate with Windows EAL where CPU affinity is not set at\nthe moment.\nBesides, having affinity set by the master lcore in FreeBSD and Linux\nwill make it possible to detect errors rather than panic in the child\nthread. But the cleanup when such an event happens is left for later.\n\nA side-effect of this patch is that control threads can now use\nrecursive locks (rte_gettid() was not called before).\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\nChanges since v4:\n- renamed rte_thread_init as __rte_thread_init and moved to\n  eal_private.h,\n\nChanges since v1:\n- rebased on master, removed Windows workarounds wrt gettid and traces\n  support,\n\n---\n lib/librte_eal/common/eal_common_thread.c | 50 ++++++++++++++---------\n lib/librte_eal/common/eal_private.h       | 10 +++++\n lib/librte_eal/common/eal_thread.h        |  8 ----\n lib/librte_eal/freebsd/eal.c              | 14 ++++++-\n lib/librte_eal/freebsd/eal_thread.c       | 32 +--------------\n lib/librte_eal/linux/eal.c                | 15 ++++++-\n lib/librte_eal/linux/eal_thread.c         | 32 +--------------\n lib/librte_eal/windows/eal.c              |  3 +-\n lib/librte_eal/windows/eal_thread.c       | 10 +----\n 9 files changed, 71 insertions(+), 103 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_thread.c b/lib/librte_eal/common/eal_common_thread.c\nindex fd13453fee..fb06f8f802 100644\n--- a/lib/librte_eal/common/eal_common_thread.c\n+++ b/lib/librte_eal/common/eal_common_thread.c\n@@ -71,20 +71,10 @@ eal_cpuset_socket_id(rte_cpuset_t *cpusetp)\n \treturn socket_id;\n }\n \n-int\n-rte_thread_set_affinity(rte_cpuset_t *cpusetp)\n+static void\n+thread_update_affinity(rte_cpuset_t *cpusetp)\n {\n-\tint s;\n-\tunsigned lcore_id;\n-\tpthread_t tid;\n-\n-\ttid = pthread_self();\n-\n-\ts = pthread_setaffinity_np(tid, sizeof(rte_cpuset_t), cpusetp);\n-\tif (s != 0) {\n-\t\tRTE_LOG(ERR, EAL, \"pthread_setaffinity_np failed\\n\");\n-\t\treturn -1;\n-\t}\n+\tunsigned int lcore_id = rte_lcore_id();\n \n \t/* store socket_id in TLS for quick access */\n \tRTE_PER_LCORE(_socket_id) =\n@@ -94,14 +84,24 @@ rte_thread_set_affinity(rte_cpuset_t *cpusetp)\n \tmemmove(&RTE_PER_LCORE(_cpuset), cpusetp,\n \t\tsizeof(rte_cpuset_t));\n \n-\tlcore_id = rte_lcore_id();\n \tif (lcore_id != (unsigned)LCORE_ID_ANY) {\n \t\t/* EAL thread will update lcore_config */\n \t\tlcore_config[lcore_id].socket_id = RTE_PER_LCORE(_socket_id);\n \t\tmemmove(&lcore_config[lcore_id].cpuset, cpusetp,\n \t\t\tsizeof(rte_cpuset_t));\n \t}\n+}\n+\n+int\n+rte_thread_set_affinity(rte_cpuset_t *cpusetp)\n+{\n+\tif (pthread_setaffinity_np(pthread_self(), sizeof(rte_cpuset_t),\n+\t\t\tcpusetp) != 0) {\n+\t\tRTE_LOG(ERR, EAL, \"pthread_setaffinity_np failed\\n\");\n+\t\treturn -1;\n+\t}\n \n+\tthread_update_affinity(cpusetp);\n \treturn 0;\n }\n \n@@ -147,6 +147,19 @@ eal_thread_dump_affinity(char *str, unsigned size)\n \treturn ret;\n }\n \n+void\n+__rte_thread_init(unsigned int lcore_id, rte_cpuset_t *cpuset)\n+{\n+\t/* set the lcore ID in per-lcore memory area */\n+\tRTE_PER_LCORE(_lcore_id) = lcore_id;\n+\n+\t/* acquire system unique id */\n+\trte_gettid();\n+\n+\tthread_update_affinity(cpuset);\n+\n+\t__rte_trace_mem_per_thread_alloc();\n+}\n \n struct rte_thread_ctrl_params {\n \tvoid *(*start_routine)(void *);\n@@ -154,7 +167,7 @@ struct rte_thread_ctrl_params {\n \tpthread_barrier_t configured;\n };\n \n-static void *rte_thread_init(void *arg)\n+static void *ctrl_thread_init(void *arg)\n {\n \tint ret;\n \tstruct internal_config *internal_conf =\n@@ -164,8 +177,7 @@ static void *rte_thread_init(void *arg)\n \tvoid *(*start_routine)(void *) = params->start_routine;\n \tvoid *routine_arg = params->arg;\n \n-\t/* Store cpuset in TLS for quick access */\n-\tmemmove(&RTE_PER_LCORE(_cpuset), cpuset, sizeof(rte_cpuset_t));\n+\t__rte_thread_init(rte_lcore_id(), cpuset);\n \n \tret = pthread_barrier_wait(&params->configured);\n \tif (ret == PTHREAD_BARRIER_SERIAL_THREAD) {\n@@ -173,8 +185,6 @@ static void *rte_thread_init(void *arg)\n \t\tfree(params);\n \t}\n \n-\t__rte_trace_mem_per_thread_alloc();\n-\n \treturn start_routine(routine_arg);\n }\n \n@@ -198,7 +208,7 @@ rte_ctrl_thread_create(pthread_t *thread, const char *name,\n \n \tpthread_barrier_init(&params->configured, NULL, 2);\n \n-\tret = pthread_create(thread, attr, rte_thread_init, (void *)params);\n+\tret = pthread_create(thread, attr, ctrl_thread_init, (void *)params);\n \tif (ret != 0) {\n \t\tfree(params);\n \t\treturn -ret;\ndiff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h\nindex 46bcae9305..5d8b53882d 100644\n--- a/lib/librte_eal/common/eal_private.h\n+++ b/lib/librte_eal/common/eal_private.h\n@@ -699,4 +699,14 @@ eal_get_internal_configuration(void);\n rte_usage_hook_t\n eal_get_application_usage_hook(void);\n \n+/**\n+ * Init per-lcore info in current thread.\n+ *\n+ * @param lcore_id\n+ *   identifier of lcore.\n+ * @param cpuset\n+ *   CPU affinity for this thread.\n+ */\n+void __rte_thread_init(unsigned int lcore_id, rte_cpuset_t *cpuset);\n+\n #endif /* _EAL_PRIVATE_H_ */\ndiff --git a/lib/librte_eal/common/eal_thread.h b/lib/librte_eal/common/eal_thread.h\nindex b40ed249ed..dc1fc6eb99 100644\n--- a/lib/librte_eal/common/eal_thread.h\n+++ b/lib/librte_eal/common/eal_thread.h\n@@ -15,14 +15,6 @@\n  */\n __rte_noreturn void *eal_thread_loop(void *arg);\n \n-/**\n- * Init per-lcore info for master thread\n- *\n- * @param lcore_id\n- *   identifier of master lcore\n- */\n-void eal_thread_init_master(unsigned lcore_id);\n-\n /**\n  * Get the NUMA socket id from cpu id.\n  * This function is private to EAL.\ndiff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c\nindex 8c75cba79a..fd577daf44 100644\n--- a/lib/librte_eal/freebsd/eal.c\n+++ b/lib/librte_eal/freebsd/eal.c\n@@ -845,7 +845,14 @@ rte_eal_init(int argc, char **argv)\n \n \teal_check_mem_on_local_socket();\n \n-\teal_thread_init_master(config->master_lcore);\n+\tif (pthread_setaffinity_np(pthread_self(), sizeof(rte_cpuset_t),\n+\t\t\t&lcore_config[config->master_lcore].cpuset) != 0) {\n+\t\trte_eal_init_alert(\"Cannot set affinity\");\n+\t\trte_errno = EINVAL;\n+\t\treturn -1;\n+\t}\n+\t__rte_thread_init(config->master_lcore,\n+\t\t&lcore_config[config->master_lcore].cpuset);\n \n \tret = eal_thread_dump_affinity(cpuset, sizeof(cpuset));\n \n@@ -876,6 +883,11 @@ rte_eal_init(int argc, char **argv)\n \t\tsnprintf(thread_name, sizeof(thread_name),\n \t\t\t\t\"lcore-slave-%d\", i);\n \t\trte_thread_setname(lcore_config[i].thread_id, thread_name);\n+\n+\t\tret = pthread_setaffinity_np(lcore_config[i].thread_id,\n+\t\t\tsizeof(rte_cpuset_t), &lcore_config[i].cpuset);\n+\t\tif (ret != 0)\n+\t\t\trte_panic(\"Cannot set affinity\\n\");\n \t}\n \n \t/*\ndiff --git a/lib/librte_eal/freebsd/eal_thread.c b/lib/librte_eal/freebsd/eal_thread.c\nindex 40676d9ef5..0788a54fe6 100644\n--- a/lib/librte_eal/freebsd/eal_thread.c\n+++ b/lib/librte_eal/freebsd/eal_thread.c\n@@ -66,29 +66,6 @@ rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned slave_id)\n \treturn rc;\n }\n \n-/* set affinity for current thread */\n-static int\n-eal_thread_set_affinity(void)\n-{\n-\tunsigned lcore_id = rte_lcore_id();\n-\n-\t/* acquire system unique id  */\n-\trte_gettid();\n-\n-\t/* update EAL thread core affinity */\n-\treturn rte_thread_set_affinity(&lcore_config[lcore_id].cpuset);\n-}\n-\n-void eal_thread_init_master(unsigned lcore_id)\n-{\n-\t/* set the lcore ID in per-lcore memory area */\n-\tRTE_PER_LCORE(_lcore_id) = lcore_id;\n-\n-\t/* set CPU affinity */\n-\tif (eal_thread_set_affinity() < 0)\n-\t\trte_panic(\"cannot set affinity\\n\");\n-}\n-\n /* main loop of threads */\n __rte_noreturn void *\n eal_thread_loop(__rte_unused void *arg)\n@@ -113,19 +90,12 @@ eal_thread_loop(__rte_unused void *arg)\n \tm2s = lcore_config[lcore_id].pipe_master2slave[0];\n \ts2m = lcore_config[lcore_id].pipe_slave2master[1];\n \n-\t/* set the lcore ID in per-lcore memory area */\n-\tRTE_PER_LCORE(_lcore_id) = lcore_id;\n-\n-\t/* set CPU affinity */\n-\tif (eal_thread_set_affinity() < 0)\n-\t\trte_panic(\"cannot set affinity\\n\");\n+\t__rte_thread_init(lcore_id, &lcore_config[lcore_id].cpuset);\n \n \tret = eal_thread_dump_affinity(cpuset, sizeof(cpuset));\n-\n \tRTE_LOG(DEBUG, EAL, \"lcore %u is ready (tid=%p;cpuset=[%s%s])\\n\",\n \t\tlcore_id, thread_id, cpuset, ret == 0 ? \"\" : \"...\");\n \n-\t__rte_trace_mem_per_thread_alloc();\n \trte_eal_trace_thread_lcore_ready(lcore_id, cpuset);\n \n \t/* read on our pipe to get commands */\ndiff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c\nindex 3b56d14da1..bd089cdd44 100644\n--- a/lib/librte_eal/linux/eal.c\n+++ b/lib/librte_eal/linux/eal.c\n@@ -1184,10 +1184,16 @@ rte_eal_init(int argc, char **argv)\n \n \teal_check_mem_on_local_socket();\n \n-\teal_thread_init_master(config->master_lcore);\n+\tif (pthread_setaffinity_np(pthread_self(), sizeof(rte_cpuset_t),\n+\t\t\t&lcore_config[config->master_lcore].cpuset) != 0) {\n+\t\trte_eal_init_alert(\"Cannot set affinity\");\n+\t\trte_errno = EINVAL;\n+\t\treturn -1;\n+\t}\n+\t__rte_thread_init(config->master_lcore,\n+\t\t&lcore_config[config->master_lcore].cpuset);\n \n \tret = eal_thread_dump_affinity(cpuset, sizeof(cpuset));\n-\n \tRTE_LOG(DEBUG, EAL, \"Master lcore %u is ready (tid=%zx;cpuset=[%s%s])\\n\",\n \t\tconfig->master_lcore, (uintptr_t)thread_id, cpuset,\n \t\tret == 0 ? \"\" : \"...\");\n@@ -1219,6 +1225,11 @@ rte_eal_init(int argc, char **argv)\n \t\tif (ret != 0)\n \t\t\tRTE_LOG(DEBUG, EAL,\n \t\t\t\t\"Cannot set name for lcore thread\\n\");\n+\n+\t\tret = pthread_setaffinity_np(lcore_config[i].thread_id,\n+\t\t\tsizeof(rte_cpuset_t), &lcore_config[i].cpuset);\n+\t\tif (ret != 0)\n+\t\t\trte_panic(\"Cannot set affinity\\n\");\n \t}\n \n \t/*\ndiff --git a/lib/librte_eal/linux/eal_thread.c b/lib/librte_eal/linux/eal_thread.c\nindex a52ebef3a4..e0440c0000 100644\n--- a/lib/librte_eal/linux/eal_thread.c\n+++ b/lib/librte_eal/linux/eal_thread.c\n@@ -66,29 +66,6 @@ rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned slave_id)\n \treturn rc;\n }\n \n-/* set affinity for current EAL thread */\n-static int\n-eal_thread_set_affinity(void)\n-{\n-\tunsigned lcore_id = rte_lcore_id();\n-\n-\t/* acquire system unique id  */\n-\trte_gettid();\n-\n-\t/* update EAL thread core affinity */\n-\treturn rte_thread_set_affinity(&lcore_config[lcore_id].cpuset);\n-}\n-\n-void eal_thread_init_master(unsigned lcore_id)\n-{\n-\t/* set the lcore ID in per-lcore memory area */\n-\tRTE_PER_LCORE(_lcore_id) = lcore_id;\n-\n-\t/* set CPU affinity */\n-\tif (eal_thread_set_affinity() < 0)\n-\t\trte_panic(\"cannot set affinity\\n\");\n-}\n-\n /* main loop of threads */\n __rte_noreturn void *\n eal_thread_loop(__rte_unused void *arg)\n@@ -113,19 +90,12 @@ eal_thread_loop(__rte_unused void *arg)\n \tm2s = lcore_config[lcore_id].pipe_master2slave[0];\n \ts2m = lcore_config[lcore_id].pipe_slave2master[1];\n \n-\t/* set the lcore ID in per-lcore memory area */\n-\tRTE_PER_LCORE(_lcore_id) = lcore_id;\n-\n-\t/* set CPU affinity */\n-\tif (eal_thread_set_affinity() < 0)\n-\t\trte_panic(\"cannot set affinity\\n\");\n+\t__rte_thread_init(lcore_id, &lcore_config[lcore_id].cpuset);\n \n \tret = eal_thread_dump_affinity(cpuset, sizeof(cpuset));\n-\n \tRTE_LOG(DEBUG, EAL, \"lcore %u is ready (tid=%zx;cpuset=[%s%s])\\n\",\n \t\tlcore_id, (uintptr_t)thread_id, cpuset, ret == 0 ? \"\" : \"...\");\n \n-\t__rte_trace_mem_per_thread_alloc();\n \trte_eal_trace_thread_lcore_ready(lcore_id, cpuset);\n \n \t/* read on our pipe to get commands */\ndiff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c\nindex eb10b4ef96..9f5d019e64 100644\n--- a/lib/librte_eal/windows/eal.c\n+++ b/lib/librte_eal/windows/eal.c\n@@ -333,7 +333,8 @@ rte_eal_init(int argc, char **argv)\n \t\treturn -1;\n \t}\n \n-\teal_thread_init_master(config->master_lcore);\n+\t__rte_thread_init(config->master_lcore,\n+\t\t&lcore_config[config->master_lcore].cpuset);\n \n \tbscan = rte_bus_scan();\n \tif (bscan < 0) {\ndiff --git a/lib/librte_eal/windows/eal_thread.c b/lib/librte_eal/windows/eal_thread.c\nindex f12a2ec6ad..20889b6196 100644\n--- a/lib/librte_eal/windows/eal_thread.c\n+++ b/lib/librte_eal/windows/eal_thread.c\n@@ -53,13 +53,6 @@ rte_eal_remote_launch(lcore_function_t *f, void *arg, unsigned int slave_id)\n \treturn 0;\n }\n \n-void\n-eal_thread_init_master(unsigned int lcore_id)\n-{\n-\t/* set the lcore ID in per-lcore memory area */\n-\tRTE_PER_LCORE(_lcore_id) = lcore_id;\n-}\n-\n /* main loop of threads */\n void *\n eal_thread_loop(void *arg __rte_unused)\n@@ -84,8 +77,7 @@ eal_thread_loop(void *arg __rte_unused)\n \tm2s = lcore_config[lcore_id].pipe_master2slave[0];\n \ts2m = lcore_config[lcore_id].pipe_slave2master[1];\n \n-\t/* set the lcore ID in per-lcore memory area */\n-\tRTE_PER_LCORE(_lcore_id) = lcore_id;\n+\t__rte_thread_init(lcore_id, &lcore_config[lcore_id].cpuset);\n \n \tRTE_LOG(DEBUG, EAL, \"lcore %u is ready (tid=%zx;cpuset=[%s])\\n\",\n \t\tlcore_id, (uintptr_t)thread_id, cpuset);\n",
    "prefixes": [
        "v6",
        "03/10"
    ]
}