Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/53102/?format=api
https://patches.dpdk.org/api/patches/53102/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1556289684-11276-1-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": "<1556289684-11276-1-git-send-email-erik.g.carrillo@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1556289684-11276-1-git-send-email-erik.g.carrillo@intel.com", "date": "2019-04-26T14:41:24", "name": "timer: fix reset/stop in callback for new API", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "6cba06b78843dbe8055fb331c669474fc6de5905", "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/1556289684-11276-1-git-send-email-erik.g.carrillo@intel.com/mbox/", "series": [ { "id": 4481, "url": "https://patches.dpdk.org/api/series/4481/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=4481", "date": "2019-04-26T14:41:24", "name": "timer: fix reset/stop in callback for new API", "version": 1, "mbox": "https://patches.dpdk.org/series/4481/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/53102/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/53102/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 78FDA1B6CA;\n\tFri, 26 Apr 2019 16:42:42 +0200 (CEST)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby dpdk.org (Postfix) with ESMTP id 865331B691\n\tfor <dev@dpdk.org>; Fri, 26 Apr 2019 16:42:40 +0200 (CEST)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t26 Apr 2019 07:42:39 -0700", "from txasoft-yocto.an.intel.com ([10.123.72.192])\n\tby orsmga002.jf.intel.com with ESMTP; 26 Apr 2019 07:42:38 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.60,397,1549958400\"; d=\"scan'208\";a=\"153999487\"", "From": "Erik Gabriel Carrillo <erik.g.carrillo@intel.com>", "To": "rsanford@akamai.com,\n\tthomas@monjalon.net", "Cc": "dev@dpdk.org", "Date": "Fri, 26 Apr 2019 09:41:24 -0500", "Message-Id": "<1556289684-11276-1-git-send-email-erik.g.carrillo@intel.com>", "X-Mailer": "git-send-email 1.7.10", "Subject": "[dpdk-dev] [PATCH] timer: fix reset/stop in callback for new API", "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": "The rte_timer_alt_manage function should track which is the running\ntimer and whether or not it was updated by a callback in the priv_timer\nstructure that corresponds to the running lcore, so that restarting\nor stopping the timer from the callback works correctly.\n\nFixes: c0749f7096c7 (\"timer: allow management in shared memory\")\n\nSigned-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>\n---\n lib/librte_timer/rte_timer.c | 13 +++++--------\n 1 file changed, 5 insertions(+), 8 deletions(-)", "diff": "diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c\nindex d443b8c..9f2e921 100644\n--- a/lib/librte_timer/rte_timer.c\n+++ b/lib/librte_timer/rte_timer.c\n@@ -830,7 +830,6 @@ rte_timer_alt_manage(uint32_t timer_data_id,\n \tunion rte_timer_status status;\n \tstruct rte_timer *tim, *next_tim, **pprev;\n \tstruct rte_timer *run_first_tims[RTE_MAX_LCORE];\n-\tunsigned int runlist_lcore_ids[RTE_MAX_LCORE];\n \tunsigned int this_lcore = rte_lcore_id();\n \tstruct rte_timer *prev[MAX_SKIPLIST_DEPTH + 1];\n \tuint64_t cur_time;\n@@ -899,7 +898,6 @@ rte_timer_alt_manage(uint32_t timer_data_id,\n \n \t\t/* transition run-list from PENDING to RUNNING */\n \t\trun_first_tims[nb_runlists] = tim;\n-\t\trunlist_lcore_ids[nb_runlists] = poll_lcore;\n \t\tpprev = &run_first_tims[nb_runlists];\n \t\tnb_runlists++;\n \n@@ -946,25 +944,24 @@ rte_timer_alt_manage(uint32_t timer_data_id,\n \t\t\tbreak;\n \n \t\ttim = run_first_tims[min_idx];\n-\t\tprivp = &data->priv_timer[runlist_lcore_ids[min_idx]];\n \n \t\t/* Move down the runlist from which we picked a timer to\n \t\t * execute\n \t\t */\n \t\trun_first_tims[min_idx] = run_first_tims[min_idx]->sl_next[0];\n \n-\t\tprivp->updated = 0;\n-\t\tprivp->running_tim = tim;\n+\t\tdata->priv_timer[this_lcore].updated = 0;\n+\t\tdata->priv_timer[this_lcore].running_tim = tim;\n \n \t\t/* Call the provided callback function */\n \t\tf(tim);\n \n-\t\t__TIMER_STAT_ADD(privp, pending, -1);\n+\t\t__TIMER_STAT_ADD(data->priv_timer, pending, -1);\n \n \t\t/* the timer was stopped or reloaded by the callback\n \t\t * function, we have nothing to do here\n \t\t */\n-\t\tif (privp->updated == 1)\n+\t\tif (data->priv_timer[this_lcore].updated == 1)\n \t\t\tcontinue;\n \n \t\tif (tim->period == 0) {\n@@ -989,7 +986,7 @@ rte_timer_alt_manage(uint32_t timer_data_id,\n \t\t\t\t&data->priv_timer[this_lcore].list_lock);\n \t\t}\n \n-\t\tprivp->running_tim = NULL;\n+\t\tdata->priv_timer[this_lcore].running_tim = NULL;\n \t}\n \n \treturn 0;\n", "prefixes": [] }{ "id": 53102, "url": "