Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/6146/?format=api
http://patches.dpdk.org/api/patches/6146/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1436259634-7077-2-git-send-email-david.marchand@6wind.com/", "project": { "id": 1, "url": "http://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": "<1436259634-7077-2-git-send-email-david.marchand@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1436259634-7077-2-git-send-email-david.marchand@6wind.com", "date": "2015-07-07T09:00:29", "name": "[dpdk-dev,1/6] eal/linux: remove useless check on process type", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "5beb1d7be8170dac1d8b411034dbddab8f4be6f4", "submitter": { "id": 3, "url": "http://patches.dpdk.org/api/people/3/?format=api", "name": "David Marchand", "email": "david.marchand@6wind.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1436259634-7077-2-git-send-email-david.marchand@6wind.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/6146/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/6146/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 C32575A26;\n\tTue, 7 Jul 2015 11:00:49 +0200 (CEST)", "from mail-wg0-f53.google.com (mail-wg0-f53.google.com\n\t[74.125.82.53]) by dpdk.org (Postfix) with ESMTP id 50DB6595E\n\tfor <dev@dpdk.org>; Tue, 7 Jul 2015 11:00:48 +0200 (CEST)", "by wgjx7 with SMTP id x7so161561494wgj.2\n\tfor <dev@dpdk.org>; Tue, 07 Jul 2015 02:00:48 -0700 (PDT)", "from alcyon.dev.6wind.com (6wind.net2.nerim.net. [213.41.151.210])\n\tby mx.google.com with ESMTPSA id\n\ty19sm32737674wia.15.2015.07.07.02.00.46 for <dev@dpdk.org>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 07 Jul 2015 02:00:47 -0700 (PDT)" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=vChhA2QXReTT0a5CSJG/xhprWGfCQKWjQMGRwCtF9uI=;\n\tb=jHBCbxO3gMr0Uedei0C6/xS75HaHOWW1cpW2SRdI/Na1uHhoFoQxq33HL8oRCVKEUS\n\tB362o1EWeUDSkD0RnszSn0DX58tXZ2/wERrgZ7hSCQgKgXCwEr5EtIHGsbGIw4CpInsQ\n\tjSztGQv63tSkPAqaLSiD6jjlzK0BiA9V5SCjK+IjGtF6klVnXJbRiO1bz8+cbmHeu8Mn\n\tBJ+Pm3f5rOe80A3zYKxvPFM1Y5m3YnvfSvDAfYLabNY0dtDoGw8f/7c+kadH99PeO3Ud\n\tz5L9j88aYSUBJrzBnwpe/wkapOu5PNWttk1kCa3KCLYpPCidszmoHBL3CAAMOvn26Gvd\n\tpp8A==", "X-Gm-Message-State": "ALoCoQmUy2ffKCkKG463KoceFWeVcobTPlZeGGrMDcXg4LY8aP5cJiC0BTY5fuWSVdk4H1/FbGfP", "X-Received": "by 10.195.11.202 with SMTP id ek10mr6594174wjd.12.1436259647957; \n\tTue, 07 Jul 2015 02:00:47 -0700 (PDT)", "From": "David Marchand <david.marchand@6wind.com>", "To": "dev@dpdk.org", "Date": "Tue, 7 Jul 2015 11:00:29 +0200", "Message-Id": "<1436259634-7077-2-git-send-email-david.marchand@6wind.com>", "X-Mailer": "git-send-email 1.7.10.4", "In-Reply-To": "<1436259634-7077-1-git-send-email-david.marchand@6wind.com>", "References": "<1436259634-7077-1-git-send-email-david.marchand@6wind.com>", "Subject": "[dpdk-dev] [PATCH 1/6] eal/linux: remove useless check on process\n\ttype", "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": "The code in eal_hugepage_info.c is not reachable by secondary processes.\n\nSigned-off-by: David Marchand <david.marchand@6wind.com>\n---\n lib/librte_eal/linuxapp/eal/eal_hugepage_info.c | 17 +++++------------\n 1 file changed, 5 insertions(+), 12 deletions(-)", "diff": "diff --git a/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c b/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c\nindex 028e309..6dd8a0b 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c\n@@ -61,31 +61,24 @@\n \n static const char sys_dir_path[] = \"/sys/kernel/mm/hugepages\";\n \n+/* this function is only called from eal_hugepage_info_init which itself\n+ * is only called from a primary process */\n static int32_t\n get_num_hugepages(const char *subdir)\n {\n \tchar path[PATH_MAX];\n \tlong unsigned resv_pages, num_pages = 0;\n-\tconst char *nr_hp_file;\n+\tconst char *nr_hp_file = \"free_hugepages\";\n \tconst char *nr_rsvd_file = \"resv_hugepages\";\n \n \t/* first, check how many reserved pages kernel reports */\n \tsnprintf(path, sizeof(path), \"%s/%s/%s\",\n \t\t\tsys_dir_path, subdir, nr_rsvd_file);\n-\n \tif (eal_parse_sysfs_value(path, &resv_pages) < 0)\n \t\treturn 0;\n \n-\t/* if secondary process, just look at the number of hugepages,\n-\t * otherwise look at number of free hugepages */\n-\tif (internal_config.process_type == RTE_PROC_SECONDARY)\n-\t\tnr_hp_file = \"nr_hugepages\";\n-\telse\n-\t\tnr_hp_file = \"free_hugepages\";\n-\n \tsnprintf(path, sizeof(path), \"%s/%s/%s\",\n \t\t\tsys_dir_path, subdir, nr_hp_file);\n-\n \tif (eal_parse_sysfs_value(path, &num_pages) < 0)\n \t\treturn 0;\n \n@@ -93,8 +86,8 @@ get_num_hugepages(const char *subdir)\n \t\tRTE_LOG(WARNING, EAL, \"No free hugepages reported in %s\\n\",\n \t\t\t\tsubdir);\n \n-\t/* adjust num_pages in case of primary process */\n-\tif (num_pages > 0 && internal_config.process_type == RTE_PROC_PRIMARY)\n+\t/* adjust num_pages */\n+\tif (num_pages > 0)\n \t\tnum_pages -= resv_pages;\n \n \treturn (int32_t)num_pages;\n", "prefixes": [ "dpdk-dev", "1/6" ] }{ "id": 6146, "url": "