Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/28699/?format=api
https://patches.dpdk.org/api/patches/28699/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1505340308-86141-3-git-send-email-erik.g.carrillo@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": "<1505340308-86141-3-git-send-email-erik.g.carrillo@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1505340308-86141-3-git-send-email-erik.g.carrillo@intel.com", "date": "2017-09-13T22:05:07", "name": "[dpdk-dev,v3,2/3] timer: handle timers installed from non-EAL threads", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "1566907c3ff9628ad82b3fb3dda14af8b61c6f0a", "submitter": { "id": 762, "url": "https://patches.dpdk.org/api/people/762/?format=api", "name": "Carrillo, Erik G", "email": "erik.g.carrillo@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1505340308-86141-3-git-send-email-erik.g.carrillo@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/28699/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/28699/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 2991B1B1AB;\n\tThu, 14 Sep 2017 00:04:29 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 8CD011B1A7\n\tfor <dev@dpdk.org>; Thu, 14 Sep 2017 00:04:27 +0200 (CEST)", "from orsmga004.jf.intel.com ([10.7.209.38])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t13 Sep 2017 15:04:26 -0700", "from wcpqa1.an.intel.com ([10.123.72.207])\n\tby orsmga004.jf.intel.com with ESMTP; 13 Sep 2017 15:04:26 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.42,389,1500966000\"; d=\"scan'208\";a=\"128487056\"", "From": "Erik Gabriel Carrillo <erik.g.carrillo@intel.com>", "To": "rsanford@akamai.com", "Cc": "dev@dpdk.org, konstantin.ananyev@intel.com, stephen@networkplumber.org, \n\tkeith.wiles@intel.com, narender.vangati@intel.com", "Date": "Wed, 13 Sep 2017 17:05:07 -0500", "Message-Id": "<1505340308-86141-3-git-send-email-erik.g.carrillo@intel.com>", "X-Mailer": "git-send-email 1.7.10", "In-Reply-To": "<1505340308-86141-1-git-send-email-erik.g.carrillo@intel.com>", "References": "<1503692783-16148-1-git-send-email-erik.g.carrillo@intel.com>\n\t<1505340308-86141-1-git-send-email-erik.g.carrillo@intel.com>", "Subject": "[dpdk-dev] [PATCH v3 2/3] timer: handle timers installed from\n\tnon-EAL threads", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <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": "This commit adds support for timers being created from\nnon-EAL threads; it maps timers from all such threads to\nlcore id RTE_MAX_LCORE, and puts them all in a corresponding\nskiplist.\n\nSigned-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>\n---\nV3:\n* Rebased patch on reworked parent commit\n\nv2:\n* Address checkpatch warnings\n\n lib/librte_timer/rte_timer.c | 16 ++++++++++++----\n 1 file changed, 12 insertions(+), 4 deletions(-)", "diff": "diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c\nindex 1f4141e..c489c5f 100644\n--- a/lib/librte_timer/rte_timer.c\n+++ b/lib/librte_timer/rte_timer.c\n@@ -66,8 +66,8 @@ struct skiplist {\n } __rte_cache_aligned;\n \n struct priv_timer {\n-\t/** one pending list per enabled lcore */\n-\tstruct skiplist pending_lists[RTE_MAX_LCORE];\n+\t/** one pending list per lcore, plus one for non-EAL threads */\n+\tstruct skiplist pending_lists[RTE_MAX_LCORE + 1];\n \tbool multi_pendlists;\n \n \t/** per-core variable that true if a timer was updated on this\n@@ -88,7 +88,7 @@ struct priv_timer {\n static struct priv_timer priv_timer[RTE_MAX_LCORE];\n \n /** cache of IDs of enabled lcores */\n-static unsigned int enabled_lcores[RTE_MAX_LCORE];\n+static unsigned int enabled_lcores[RTE_MAX_LCORE + 1];\n static int n_enabled_lcores;\n \n /* when debug is enabled, store some statistics */\n@@ -114,12 +114,18 @@ rte_timer_subsystem_init(void)\n \tRTE_LCORE_FOREACH(lcore_id)\n \t\tenabled_lcores[n_enabled_lcores++] = lcore_id;\n \n+\t/* To handle timers coming from non-EAL threads */\n+\tenabled_lcores[n_enabled_lcores++] = RTE_MAX_LCORE;\n+\n \t/* since priv_timer is static, it's zeroed by default, so only init some\n \t * fields.\n \t */\n \tfor (i = 0; i < n_enabled_lcores; i++) {\n \t\tlcore_id = enabled_lcores[i];\n \n+\t\t/* Don't use this value to index the priv_timer array */\n+\t\tif (lcore_id == RTE_MAX_LCORE)\n+\t\t\tcontinue;\n \n \t\tpriv_tim = &priv_timer[lcore_id];\n \t\tpriv_tim->prev_lcore = lcore_id;\n@@ -343,7 +349,9 @@ timer_add(struct rte_timer *tim, unsigned int tim_lcore, int local_is_locked,\n \tstruct priv_timer *priv_tim = &priv_timer[tim_lcore];\n \n \tif (priv_tim->multi_pendlists)\n-\t\t*pending_lists_idx = lcore_id;\n+\t\t/* Check if timer being installed from non-EAL thread */\n+\t\t*pending_lists_idx = (lcore_id == LCORE_ID_ANY) ?\n+\t\t\t\tRTE_MAX_LCORE : lcore_id;\n \telse\n \t\t*pending_lists_idx = SINGLE_LIST_IDX;\n \n", "prefixes": [ "dpdk-dev", "v3", "2/3" ] }{ "id": 28699, "url": "