Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/12679/?format=api
https://patches.dpdk.org/api/patches/12679/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1462956485-3701-1-git-send-email-slawomirx.mrozowicz@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": "<1462956485-3701-1-git-send-email-slawomirx.mrozowicz@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1462956485-3701-1-git-send-email-slawomirx.mrozowicz@intel.com", "date": "2016-05-11T08:48:05", "name": "[dpdk-dev,v4] examples/qos_sched: fix bad bit shift operation", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "14fe38aa9d460a86c63fbaec28d4f5c8f626b317", "submitter": { "id": 457, "url": "https://patches.dpdk.org/api/people/457/?format=api", "name": "Slawomir Mrozowicz", "email": "slawomirx.mrozowicz@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1462956485-3701-1-git-send-email-slawomirx.mrozowicz@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/12679/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/12679/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 DAE08C378;\n\tWed, 11 May 2016 10:42:54 +0200 (CEST)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 102E8C1C0\n\tfor <dev@dpdk.org>; Wed, 11 May 2016 10:42:52 +0200 (CEST)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga101.fm.intel.com with ESMTP; 11 May 2016 01:42:51 -0700", "from gklab-246-018.igk.intel.com (HELO stargo) ([10.217.246.18])\n\tby fmsmga002.fm.intel.com with SMTP; 11 May 2016 01:42:49 -0700", "by stargo (sSMTP sendmail emulation);\n\tWed, 11 May 2016 10:48:09 +0200" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.24,608,1455004800\"; d=\"scan'208\";a=\"977326616\"", "From": "Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>", "To": "cristian.dumitrescu@intel.com", "Cc": "dev@dpdk.org, jasvinder.singh@intel.com,\n\tSlawomir Mrozowicz <slawomirx.mrozowicz@intel.com>", "Date": "Wed, 11 May 2016 10:48:05 +0200", "Message-Id": "<1462956485-3701-1-git-send-email-slawomirx.mrozowicz@intel.com>", "X-Mailer": "git-send-email 1.9.1", "Subject": "[dpdk-dev] [PATCH v4] examples/qos_sched: fix bad bit shift\n\toperation", "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": "Fix issue reported by Coverity.\n\nCoverity ID 30690: Bad bit shift operation\nlarge_shift: In expression 1ULL << i, left shifting by more than 63 bits\nhas undefined behavior. The shift amount, i, is as much as 127.\n\nFixes: de3cfa2c9823 (\"sched: initial import\")\n\nSigned-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>\n---\n examples/qos_sched/args.c | 4 ++--\n examples/qos_sched/main.h | 5 ++++-\n 2 files changed, 6 insertions(+), 3 deletions(-)", "diff": "diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c\nindex 3e7fd08..354372d 100644\n--- a/examples/qos_sched/args.c\n+++ b/examples/qos_sched/args.c\n@@ -123,7 +123,7 @@ app_eal_core_mask(void)\n \tuint64_t cm = 0;\n \tstruct rte_config *cfg = rte_eal_get_configuration();\n \n-\tfor (i = 0; i < RTE_MAX_LCORE; i++) {\n+\tfor (i = 0; i < APP_MAX_LCORE; i++) {\n \t\tif (cfg->lcore_role[i] == ROLE_RTE)\n \t\t\tcm |= (1ULL << i);\n \t}\n@@ -142,7 +142,7 @@ app_cpu_core_count(void)\n \tchar path[PATH_MAX];\n \tuint32_t ncores = 0;\n \n-\tfor(i = 0; i < RTE_MAX_LCORE; i++) {\n+\tfor (i = 0; i < APP_MAX_LCORE; i++) {\n \t\tlen = snprintf(path, sizeof(path), SYS_CPU_DIR, i);\n \t\tif (len <= 0 || (unsigned)len >= sizeof(path))\n \t\t\tcontinue;\ndiff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h\nindex 82aa0fa..c7490c6 100644\n--- a/examples/qos_sched/main.h\n+++ b/examples/qos_sched/main.h\n@@ -68,7 +68,10 @@ extern \"C\" {\n \n #define BURST_TX_DRAIN_US 100\n \n-#define MAX_DATA_STREAMS (RTE_MAX_LCORE/2)\n+#ifndef APP_MAX_LCORE\n+#define APP_MAX_LCORE 64\n+#endif\n+#define MAX_DATA_STREAMS (APP_MAX_LCORE/2)\n #define MAX_SCHED_SUBPORTS\t\t8\n #define MAX_SCHED_PIPES\t\t4096\n \n", "prefixes": [ "dpdk-dev", "v4" ] }{ "id": 12679, "url": "