Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1451/?format=api
https://patches.dpdk.org/api/patches/1451/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1416692622-28886-3-git-send-email-thomas.monjalon@6wind.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": "<1416692622-28886-3-git-send-email-thomas.monjalon@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1416692622-28886-3-git-send-email-thomas.monjalon@6wind.com", "date": "2014-11-22T21:43:34", "name": "[dpdk-dev,02/10] eal: factorize common headers", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "11a4ab112a3c7212a869da14c26ead948511f11c", "submitter": { "id": 1, "url": "https://patches.dpdk.org/api/people/1/?format=api", "name": "Thomas Monjalon", "email": "thomas.monjalon@6wind.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1416692622-28886-3-git-send-email-thomas.monjalon@6wind.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/1451/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/1451/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 236765910;\n\tSat, 22 Nov 2014 22:33:44 +0100 (CET)", "from mail-wi0-f181.google.com (mail-wi0-f181.google.com\n\t[209.85.212.181]) by dpdk.org (Postfix) with ESMTP id 0555A7F38\n\tfor <dev@dpdk.org>; Sat, 22 Nov 2014 22:33:39 +0100 (CET)", "by mail-wi0-f181.google.com with SMTP id r20so2404550wiv.14\n\tfor <dev@dpdk.org>; Sat, 22 Nov 2014 13:44:19 -0800 (PST)", "from localhost.localdomain (136-92-190-109.dsl.ovh.fr.\n\t[109.190.92.136]) by mx.google.com with ESMTPSA id\n\tcz3sm13724087wjb.23.2014.11.22.13.44.17 for <dev@dpdk.org>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tSat, 22 Nov 2014 13:44:18 -0800 (PST)" ], "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=Dsg518E0stAOYnoUvsXzYqzyabiHHv84qvK9/qbN23s=;\n\tb=B7BQaznJn2qcmVgl0+rfjGGE9adaSCv3sVi/Q1FxmV1a8fl/t1UGKua2GaHlrgpfXo\n\tasUVoltoCa+F+lXZliR78SwtDVwSH6w92XfdUcX/lrqrVao2az0uCVtfwPhIwu8dLNMy\n\tJ6397ibLipW12LcgrT/EyNvQK0lbMQCG1HAy+YZQtUvvupEZNBAnB1OC26FESiJoC4Nk\n\ti4Pc0xEIVvcGKIFBqB5mYTitqIkPLR4tEh35DEddweCiIGSheZf2C+x8bd2i2j7tcv20\n\t25grOrvpv81x7WfgmIXhWvsFwB7EBREI9G3k6M65wFByl0aE0BAJHuRxDWROjcxe5jiS\n\tJIxw==", "X-Gm-Message-State": "ALoCoQmd22yYz/30GqmO3K1huT4D5Yctb7d/xIY1YoVJufaLC3c+zfa328KF9KOry08Qo7zen2bU", "X-Received": "by 10.194.61.168 with SMTP id q8mr13221428wjr.53.1416692659544; \n\tSat, 22 Nov 2014 13:44:19 -0800 (PST)", "From": "Thomas Monjalon <thomas.monjalon@6wind.com>", "To": "dev@dpdk.org", "Date": "Sat, 22 Nov 2014 22:43:34 +0100", "Message-Id": "<1416692622-28886-3-git-send-email-thomas.monjalon@6wind.com>", "X-Mailer": "git-send-email 2.1.3", "In-Reply-To": "<1416692622-28886-1-git-send-email-thomas.monjalon@6wind.com>", "References": "<1416692622-28886-1-git-send-email-thomas.monjalon@6wind.com>", "Subject": "[dpdk-dev] [PATCH 02/10] eal: factorize common headers", "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": "No need to have different headers for Linux and BSD.\nThese files are identicals with exception of internal config which has\nuio and vfio fields only useful for Linux.\n\nSigned-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>\n---\n app/test/test_eal_fs.c | 2 +-\n lib/librte_eal/bsdapp/eal/Makefile | 2 +-\n lib/librte_eal/bsdapp/eal/include/eal_filesystem.h | 118 ---------------------\n lib/librte_eal/bsdapp/eal/include/eal_hugepages.h | 67 ------------\n .../bsdapp/eal/include/eal_internal_cfg.h | 87 ---------------\n lib/librte_eal/bsdapp/eal/include/eal_thread.h | 53 ---------\n .../bsdapp/eal/include/exec-env/rte_lcore.h | 67 ------------\n .../bsdapp/eal/include/exec-env/rte_per_lcore.h | 67 ------------\n .../eal/include => common}/eal_filesystem.h | 0\n .../eal/include => common}/eal_hugepages.h | 0\n .../eal/include => common}/eal_internal_cfg.h | 0\n .../{linuxapp/eal/include => common}/eal_thread.h | 0\n lib/librte_eal/common/include/rte_lcore.h | 26 ++++-\n lib/librte_eal/common/include/rte_per_lcore.h | 12 +--\n lib/librte_eal/linuxapp/eal/Makefile | 2 +-\n .../linuxapp/eal/include/exec-env/rte_lcore.h | 67 ------------\n .../linuxapp/eal/include/exec-env/rte_per_lcore.h | 67 ------------\n 17 files changed, 31 insertions(+), 606 deletions(-)\n delete mode 100644 lib/librte_eal/bsdapp/eal/include/eal_filesystem.h\n delete mode 100644 lib/librte_eal/bsdapp/eal/include/eal_hugepages.h\n delete mode 100644 lib/librte_eal/bsdapp/eal/include/eal_internal_cfg.h\n delete mode 100644 lib/librte_eal/bsdapp/eal/include/eal_thread.h\n delete mode 100644 lib/librte_eal/bsdapp/eal/include/exec-env/rte_lcore.h\n delete mode 100644 lib/librte_eal/bsdapp/eal/include/exec-env/rte_per_lcore.h\n rename lib/librte_eal/{linuxapp/eal/include => common}/eal_filesystem.h (100%)\n rename lib/librte_eal/{linuxapp/eal/include => common}/eal_hugepages.h (100%)\n rename lib/librte_eal/{linuxapp/eal/include => common}/eal_internal_cfg.h (100%)\n rename lib/librte_eal/{linuxapp/eal/include => common}/eal_thread.h (100%)\n delete mode 100644 lib/librte_eal/linuxapp/eal/include/exec-env/rte_lcore.h\n delete mode 100644 lib/librte_eal/linuxapp/eal/include/exec-env/rte_per_lcore.h", "diff": "diff --git a/app/test/test_eal_fs.c b/app/test/test_eal_fs.c\nindex cd41b3e..1cbcb9d 100644\n--- a/app/test/test_eal_fs.c\n+++ b/app/test/test_eal_fs.c\n@@ -38,7 +38,7 @@\n #include <errno.h>\n \n /* eal_filesystem.h is not a public header file, so use relative path */\n-#include \"../../lib/librte_eal/linuxapp/eal/include/eal_filesystem.h\"\n+#include \"../../lib/librte_eal/common/eal_filesystem.h\"\n \n static int\n test_parse_sysfs_value(void)\ndiff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile\nindex 4683fc3..d434882 100644\n--- a/lib/librte_eal/bsdapp/eal/Makefile\n+++ b/lib/librte_eal/bsdapp/eal/Makefile\n@@ -86,7 +86,7 @@ CFLAGS_eal_thread.o += -Wno-return-type\n CFLAGS_eal_hpet.o += -Wno-return-type\n endif\n \n-INC := rte_per_lcore.h rte_lcore.h rte_interrupts.h\n+INC := rte_interrupts.h\n \n SYMLINK-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP)-include/exec-env := \\\n \t$(addprefix include/exec-env/,$(INC))\ndiff --git a/lib/librte_eal/bsdapp/eal/include/eal_filesystem.h b/lib/librte_eal/bsdapp/eal/include/eal_filesystem.h\ndeleted file mode 100644\nindex ce442c9..0000000\n--- a/lib/librte_eal/bsdapp/eal/include/eal_filesystem.h\n+++ /dev/null\n@@ -1,118 +0,0 @@\n-/*-\n- * BSD LICENSE\n- *\n- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n- * All rights reserved.\n- *\n- * Redistribution and use in source and binary forms, with or without\n- * modification, are permitted provided that the following conditions\n- * are met:\n- *\n- * * Redistributions of source code must retain the above copyright\n- * notice, this list of conditions and the following disclaimer.\n- * * Redistributions in binary form must reproduce the above copyright\n- * notice, this list of conditions and the following disclaimer in\n- * the documentation and/or other materials provided with the\n- * distribution.\n- * * Neither the name of Intel Corporation nor the names of its\n- * contributors may be used to endorse or promote products derived\n- * from this software without specific prior written permission.\n- *\n- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n- * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n- */\n-\n-/**\n- * @file\n- * Stores functions and path defines for files and directories\n- * on the filesystem for Linux, that are used by the Linux EAL.\n- */\n-\n-#ifndef _EAL_LINUXAPP_FILESYSTEM_H\n-#define _EAL_LINUXAPP_FILESYSTEM_H\n-\n-/** Path of rte config file. */\n-#define RUNTIME_CONFIG_FMT \"%s/.%s_config\"\n-\n-#include <stdint.h>\n-#include <limits.h>\n-#include <unistd.h>\n-#include <stdlib.h>\n-\n-#include <rte_string_fns.h>\n-#include \"eal_internal_cfg.h\"\n-\n-static const char *default_config_dir = \"/var/run\";\n-\n-static inline const char *\n-eal_runtime_config_path(void)\n-{\n-\tstatic char buffer[PATH_MAX]; /* static so auto-zeroed */\n-\tconst char *directory = default_config_dir;\n-\tconst char *home_dir = getenv(\"HOME\");\n-\n-\tif (getuid() != 0 && home_dir != NULL)\n-\t\tdirectory = home_dir;\n-\tsnprintf(buffer, sizeof(buffer) - 1, RUNTIME_CONFIG_FMT, directory,\n-\t\t\tinternal_config.hugefile_prefix);\n-\treturn buffer;\n-}\n-\n-/** Path of hugepage info file. */\n-#define HUGEPAGE_INFO_FMT \"%s/.%s_hugepage_info\"\n-\n-static inline const char *\n-eal_hugepage_info_path(void)\n-{\n-\tstatic char buffer[PATH_MAX]; /* static so auto-zeroed */\n-\tconst char *directory = default_config_dir;\n-\tconst char *home_dir = getenv(\"HOME\");\n-\n-\tif (getuid() != 0 && home_dir != NULL)\n-\t\tdirectory = home_dir;\n-\tsnprintf(buffer, sizeof(buffer) - 1, HUGEPAGE_INFO_FMT, directory,\n-\t\t\tinternal_config.hugefile_prefix);\n-\treturn buffer;\n-}\n-\n-/** String format for hugepage map files. */\n-#define HUGEFILE_FMT \"%s/%smap_%d\"\n-#define TEMP_HUGEFILE_FMT \"%s/%smap_temp_%d\"\n-\n-static inline const char *\n-eal_get_hugefile_path(char *buffer, size_t buflen, const char *hugedir, int f_id)\n-{\n-\tsnprintf(buffer, buflen, HUGEFILE_FMT, hugedir,\n-\t\t\tinternal_config.hugefile_prefix, f_id);\n-\tbuffer[buflen - 1] = '\\0';\n-\treturn buffer;\n-}\n-\n-#ifdef RTE_EAL_SINGLE_FILE_SEGMENTS\n-static inline const char *\n-eal_get_hugefile_temp_path(char *buffer, size_t buflen, const char *hugedir, int f_id)\n-{\n-\tsnprintf(buffer, buflen, TEMP_HUGEFILE_FMT, hugedir,\n-\t\t\tinternal_config.hugefile_prefix, f_id);\n-\tbuffer[buflen - 1] = '\\0';\n-\treturn buffer;\n-}\n-#endif\n-\n-/** define the default filename prefix for the %s values above */\n-#define HUGEFILE_PREFIX_DEFAULT \"rte\"\n-\n-/** Function to read a single numeric value from a file on the filesystem.\n- * Used to read information from files on /sys */\n-int eal_parse_sysfs_value(const char *filename, unsigned long *val);\n-\n-#endif /* _EAL_LINUXAPP_FILESYSTEM_H */\ndiff --git a/lib/librte_eal/bsdapp/eal/include/eal_hugepages.h b/lib/librte_eal/bsdapp/eal/include/eal_hugepages.h\ndeleted file mode 100644\nindex 51e090b..0000000\n--- a/lib/librte_eal/bsdapp/eal/include/eal_hugepages.h\n+++ /dev/null\n@@ -1,67 +0,0 @@\n-/*-\n- * BSD LICENSE\n- *\n- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n- * All rights reserved.\n- *\n- * Redistribution and use in source and binary forms, with or without\n- * modification, are permitted provided that the following conditions\n- * are met:\n- *\n- * * Redistributions of source code must retain the above copyright\n- * notice, this list of conditions and the following disclaimer.\n- * * Redistributions in binary form must reproduce the above copyright\n- * notice, this list of conditions and the following disclaimer in\n- * the documentation and/or other materials provided with the\n- * distribution.\n- * * Neither the name of Intel Corporation nor the names of its\n- * contributors may be used to endorse or promote products derived\n- * from this software without specific prior written permission.\n- *\n- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n- * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n- */\n-\n-#ifndef RTE_LINUXAPP_HUGEPAGES_H_\n-#define RTE_LINUXAPP_HUGEPAGES_H_\n-\n-#include <stddef.h>\n-#include <stdint.h>\n-#include <limits.h>\n-\n-#define MAX_HUGEPAGE_PATH PATH_MAX\n-\n-/**\n- * Structure used to store informations about hugepages that we mapped\n- * through the files in hugetlbfs.\n- */\n-struct hugepage_file {\n-\tvoid *orig_va; /**< virtual addr of first mmap() */\n-\tvoid *final_va; /**< virtual addr of 2nd mmap() */\n-\tuint64_t physaddr; /**< physical addr */\n-\tsize_t size; /**< the page size */\n-\tint socket_id; /**< NUMA socket ID */\n-\tint file_id; /**< the '%d' in HUGEFILE_FMT */\n-\tint memseg_id; /**< the memory segment to which page belongs */\n-#ifdef RTE_EAL_SINGLE_FILE_SEGMENTS\n-\tint repeated;\t\t/**< number of times the page size is repeated */\n-#endif\n-\tchar filepath[MAX_HUGEPAGE_PATH]; /**< path to backing file on filesystem */\n-};\n-\n-/**\n- * Read the information from linux on what hugepages are available\n- * for the EAL to use\n- */\n-int eal_hugepage_info_init(void);\n-\n-#endif /* EAL_HUGEPAGES_H_ */\ndiff --git a/lib/librte_eal/bsdapp/eal/include/eal_internal_cfg.h b/lib/librte_eal/bsdapp/eal/include/eal_internal_cfg.h\ndeleted file mode 100644\nindex 24cefc2..0000000\n--- a/lib/librte_eal/bsdapp/eal/include/eal_internal_cfg.h\n+++ /dev/null\n@@ -1,87 +0,0 @@\n-/*-\n- * BSD LICENSE\n- *\n- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n- * All rights reserved.\n- *\n- * Redistribution and use in source and binary forms, with or without\n- * modification, are permitted provided that the following conditions\n- * are met:\n- *\n- * * Redistributions of source code must retain the above copyright\n- * notice, this list of conditions and the following disclaimer.\n- * * Redistributions in binary form must reproduce the above copyright\n- * notice, this list of conditions and the following disclaimer in\n- * the documentation and/or other materials provided with the\n- * distribution.\n- * * Neither the name of Intel Corporation nor the names of its\n- * contributors may be used to endorse or promote products derived\n- * from this software without specific prior written permission.\n- *\n- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n- * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n- */\n-\n-/**\n- * @file\n- * Holds the structures for the eal internal configuration\n- */\n-\n-#ifndef _EAL_LINUXAPP_INTERNAL_CFG\n-#define _EAL_LINUXAPP_INTERNAL_CFG\n-\n-#include <rte_eal.h>\n-\n-#define MAX_HUGEPAGE_SIZES 3 /**< support up to 3 page sizes */\n-\n-/*\n- * internal configuration structure for the number, size and\n- * mount points of hugepages\n- */\n-struct hugepage_info {\n-\tsize_t hugepage_sz; /**< size of a huge page */\n-\tconst char *hugedir; /**< dir where hugetlbfs is mounted */\n-\tuint32_t num_pages[RTE_MAX_NUMA_NODES];\n-\t\t\t\t/**< number of hugepages of that size on each socket */\n-\tint lock_descriptor; /**< file descriptor for hugepage dir */\n-};\n-\n-/**\n- * internal configuration\n- */\n-struct internal_config {\n-\tvolatile size_t memory; /**< amount of asked memory */\n-\tvolatile unsigned force_nchannel; /**< force number of channels */\n-\tvolatile unsigned force_nrank; /**< force number of ranks */\n-\tvolatile unsigned no_hugetlbfs; /**< true to disable hugetlbfs */\n-\tvolatile unsigned xen_dom0_support; /**< support app running on Xen Dom0*/\n-\tvolatile unsigned no_pci; /**< true to disable PCI */\n-\tvolatile unsigned no_hpet; /**< true to disable HPET */\n-\tvolatile unsigned vmware_tsc_map; /**< true to use VMware TSC mapping\n-\t\t\t\t\t\t\t\t\t\t* instead of native TSC */\n-\tvolatile unsigned no_shconf; /**< true if there is no shared config */\n-\tvolatile enum rte_proc_type_t process_type; /* multi-process proc type */\n-\t/* true to try allocating memory on specific sockets */\n-\tvolatile unsigned force_sockets;\n-\tvolatile uint64_t socket_mem[RTE_MAX_NUMA_NODES]; /**< amount of memory per socket */\n-\tuintptr_t base_virtaddr; /**< base address to try and reserve memory from */\n-\tvolatile int syslog_facility;\t /**< facility passed to openlog() */\n-\tvolatile uint32_t log_level;\t /**< default log level */\n-\tconst char *hugefile_prefix; /**< the base filename of hugetlbfs files */\n-\tconst char *hugepage_dir; /**< specific hugetlbfs directory to use */\n-\n-\tunsigned num_hugepage_sizes; /**< how many sizes on this system */\n-\tstruct hugepage_info hugepage_info[MAX_HUGEPAGE_SIZES];\n-};\n-extern struct internal_config internal_config; /**< Global EAL configuration. */\n-\n-#endif\ndiff --git a/lib/librte_eal/bsdapp/eal/include/eal_thread.h b/lib/librte_eal/bsdapp/eal/include/eal_thread.h\ndeleted file mode 100644\nindex d029ad3..0000000\n--- a/lib/librte_eal/bsdapp/eal/include/eal_thread.h\n+++ /dev/null\n@@ -1,53 +0,0 @@\n-/*-\n- * BSD LICENSE\n- *\n- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n- * All rights reserved.\n- *\n- * Redistribution and use in source and binary forms, with or without\n- * modification, are permitted provided that the following conditions\n- * are met:\n- *\n- * * Redistributions of source code must retain the above copyright\n- * notice, this list of conditions and the following disclaimer.\n- * * Redistributions in binary form must reproduce the above copyright\n- * notice, this list of conditions and the following disclaimer in\n- * the documentation and/or other materials provided with the\n- * distribution.\n- * * Neither the name of Intel Corporation nor the names of its\n- * contributors may be used to endorse or promote products derived\n- * from this software without specific prior written permission.\n- *\n- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n- * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n- */\n-\n-#ifndef _EAL_LINUXAPP_THREAD_H_\n-#define _EAL_LINUXAPP_THREAD_H_\n-\n-/**\n- * basic loop of thread, called for each thread by eal_init().\n- *\n- * @param arg\n- * opaque pointer\n- */\n-__attribute__((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-#endif /* _EAL_LINUXAPP_PRIVATE_H_ */\ndiff --git a/lib/librte_eal/bsdapp/eal/include/exec-env/rte_lcore.h b/lib/librte_eal/bsdapp/eal/include/exec-env/rte_lcore.h\ndeleted file mode 100644\nindex e19ab54..0000000\n--- a/lib/librte_eal/bsdapp/eal/include/exec-env/rte_lcore.h\n+++ /dev/null\n@@ -1,67 +0,0 @@\n-/*-\n- * BSD LICENSE\n- *\n- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n- * All rights reserved.\n- *\n- * Redistribution and use in source and binary forms, with or without\n- * modification, are permitted provided that the following conditions\n- * are met:\n- *\n- * * Redistributions of source code must retain the above copyright\n- * notice, this list of conditions and the following disclaimer.\n- * * Redistributions in binary form must reproduce the above copyright\n- * notice, this list of conditions and the following disclaimer in\n- * the documentation and/or other materials provided with the\n- * distribution.\n- * * Neither the name of Intel Corporation nor the names of its\n- * contributors may be used to endorse or promote products derived\n- * from this software without specific prior written permission.\n- *\n- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n- * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n- */\n-\n-#ifndef _RTE_LCORE_H_\n-#error \"don't include this file directly, please include generic <rte_lcore.h>\"\n-#endif\n-\n-#ifndef _RTE_LINUXAPP_LCORE_H_\n-#define _RTE_LINUXAPP_LCORE_H_\n-\n-/**\n- * @file\n- * API for lcore and socket manipulation in linuxapp environment\n- */\n-\n-/**\n- * structure storing internal configuration (per-lcore)\n- */\n-struct lcore_config {\n-\tunsigned detected; /**< true if lcore was detected */\n-\tpthread_t thread_id; /**< pthread identifier */\n-\tint pipe_master2slave[2]; /**< communication pipe with master */\n-\tint pipe_slave2master[2]; /**< communication pipe with master */\n-\tlcore_function_t * volatile f; /**< function to call */\n-\tvoid * volatile arg; /**< argument of function */\n-\tvolatile int ret; /**< return value of function */\n-\tvolatile enum rte_lcore_state_t state; /**< lcore state */\n-\tunsigned socket_id; /**< physical socket id for this lcore */\n-\tunsigned core_id; /**< core number on socket for this lcore */\n-};\n-\n-/**\n- * internal configuration (per-lcore)\n- */\n-extern struct lcore_config lcore_config[RTE_MAX_LCORE];\n-\n-#endif /* _RTE_LINUXAPP_LCORE_H_ */\ndiff --git a/lib/librte_eal/bsdapp/eal/include/exec-env/rte_per_lcore.h b/lib/librte_eal/bsdapp/eal/include/exec-env/rte_per_lcore.h\ndeleted file mode 100644\nindex db8f274..0000000\n--- a/lib/librte_eal/bsdapp/eal/include/exec-env/rte_per_lcore.h\n+++ /dev/null\n@@ -1,67 +0,0 @@\n-/*-\n- * BSD LICENSE\n- *\n- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n- * All rights reserved.\n- *\n- * Redistribution and use in source and binary forms, with or without\n- * modification, are permitted provided that the following conditions\n- * are met:\n- *\n- * * Redistributions of source code must retain the above copyright\n- * notice, this list of conditions and the following disclaimer.\n- * * Redistributions in binary form must reproduce the above copyright\n- * notice, this list of conditions and the following disclaimer in\n- * the documentation and/or other materials provided with the\n- * distribution.\n- * * Neither the name of Intel Corporation nor the names of its\n- * contributors may be used to endorse or promote products derived\n- * from this software without specific prior written permission.\n- *\n- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n- * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n- */\n-\n-#ifndef _RTE_PER_LCORE_H_\n-#error \"don't include this file directly, please include generic <rte_per_lcore.h>\"\n-#endif\n-\n-#ifndef _RTE_LINUXAPP_PER_LCORE_H_\n-#define _RTE_LINUXAPP_PER_LCORE_H_\n-\n-/**\n- * @file\n- * Per-lcore variables in RTE on linuxapp environment\n- */\n-\n-#include <pthread.h>\n-\n-/**\n- * Macro to define a per lcore variable \"var\" of type \"type\", don't\n- * use keywords like \"static\" or \"volatile\" in type, just prefix the\n- * whole macro.\n- */\n-#define RTE_DEFINE_PER_LCORE(type, name)\t\t\t\\\n-\t__thread __typeof__(type) per_lcore_##name\n-\n-/**\n- * Macro to declare an extern per lcore variable \"var\" of type \"type\"\n- */\n-#define RTE_DECLARE_PER_LCORE(type, name)\t\t\t\\\n-\textern __thread __typeof__(type) per_lcore_##name\n-\n-/**\n- * Read/write the per-lcore variable value\n- */\n-#define RTE_PER_LCORE(name) (per_lcore_##name)\n-\n-#endif /* _RTE_LINUXAPP_PER_LCORE_H_ */\ndiff --git a/lib/librte_eal/linuxapp/eal/include/eal_filesystem.h b/lib/librte_eal/common/eal_filesystem.h\nsimilarity index 100%\nrename from lib/librte_eal/linuxapp/eal/include/eal_filesystem.h\nrename to lib/librte_eal/common/eal_filesystem.h\ndiff --git a/lib/librte_eal/linuxapp/eal/include/eal_hugepages.h b/lib/librte_eal/common/eal_hugepages.h\nsimilarity index 100%\nrename from lib/librte_eal/linuxapp/eal/include/eal_hugepages.h\nrename to lib/librte_eal/common/eal_hugepages.h\ndiff --git a/lib/librte_eal/linuxapp/eal/include/eal_internal_cfg.h b/lib/librte_eal/common/eal_internal_cfg.h\nsimilarity index 100%\nrename from lib/librte_eal/linuxapp/eal/include/eal_internal_cfg.h\nrename to lib/librte_eal/common/eal_internal_cfg.h\ndiff --git a/lib/librte_eal/linuxapp/eal/include/eal_thread.h b/lib/librte_eal/common/eal_thread.h\nsimilarity index 100%\nrename from lib/librte_eal/linuxapp/eal/include/eal_thread.h\nrename to lib/librte_eal/common/eal_thread.h\ndiff --git a/lib/librte_eal/common/include/rte_lcore.h b/lib/librte_eal/common/include/rte_lcore.h\nindex 3802a28..a0b4356 100644\n--- a/lib/librte_eal/common/include/rte_lcore.h\n+++ b/lib/librte_eal/common/include/rte_lcore.h\n@@ -37,8 +37,7 @@\n /**\n * @file\n *\n- * API for lcore and Socket Manipulation. Parts of this are execution\n- * environment specific.\n+ * API for lcore and socket manipulation\n *\n */\n #include <rte_per_lcore.h>\n@@ -51,6 +50,27 @@ extern \"C\" {\n \n #define LCORE_ID_ANY -1 /**< Any lcore. */\n \n+/**\n+ * Structure storing internal configuration (per-lcore)\n+ */\n+struct lcore_config {\n+\tunsigned detected; /**< true if lcore was detected */\n+\tpthread_t thread_id; /**< pthread identifier */\n+\tint pipe_master2slave[2]; /**< communication pipe with master */\n+\tint pipe_slave2master[2]; /**< communication pipe with master */\n+\tlcore_function_t * volatile f; /**< function to call */\n+\tvoid * volatile arg; /**< argument of function */\n+\tvolatile int ret; /**< return value of function */\n+\tvolatile enum rte_lcore_state_t state; /**< lcore state */\n+\tunsigned socket_id; /**< physical socket id for this lcore */\n+\tunsigned core_id; /**< core number on socket for this lcore */\n+};\n+\n+/**\n+ * Internal configuration (per-lcore)\n+ */\n+extern struct lcore_config lcore_config[RTE_MAX_LCORE];\n+\n RTE_DECLARE_PER_LCORE(unsigned, _lcore_id); /**< Per core \"core id\". */\n \n /**\n@@ -89,8 +109,6 @@ rte_lcore_count(void)\n \treturn cfg->lcore_count;\n }\n \n-#include <exec-env/rte_lcore.h>\n-\n /**\n * Return the ID of the physical socket of the logical core we are\n * running on.\ndiff --git a/lib/librte_eal/common/include/rte_per_lcore.h b/lib/librte_eal/common/include/rte_per_lcore.h\nindex 14d3521..5434729 100644\n--- a/lib/librte_eal/common/include/rte_per_lcore.h\n+++ b/lib/librte_eal/common/include/rte_per_lcore.h\n@@ -51,26 +51,26 @@\n extern \"C\" {\n #endif\n \n-#include <exec-env/rte_per_lcore.h>\n+#include <pthread.h>\n \n-#ifdef __DOXYGEN__\n /**\n * Macro to define a per lcore variable \"var\" of type \"type\", don't\n * use keywords like \"static\" or \"volatile\" in type, just prefix the\n * whole macro.\n */\n-#define RTE_DEFINE_PER_LCORE(type, name)\n+#define RTE_DEFINE_PER_LCORE(type, name)\t\t\t\\\n+\t__thread __typeof__(type) per_lcore_##name\n \n /**\n * Macro to declare an extern per lcore variable \"var\" of type \"type\"\n */\n-#define RTE_DECLARE_PER_LCORE(type, name)\n+#define RTE_DECLARE_PER_LCORE(type, name)\t\t\t\\\n+\textern __thread __typeof__(type) per_lcore_##name\n \n /**\n * Read/write the per-lcore variable value\n */\n-#define RTE_PER_LCORE(name)\n-#endif\n+#define RTE_PER_LCORE(name) (per_lcore_##name)\n \n #ifdef __cplusplus\n }\ndiff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile\nindex 2480cb0..702273f 100644\n--- a/lib/librte_eal/linuxapp/eal/Makefile\n+++ b/lib/librte_eal/linuxapp/eal/Makefile\n@@ -100,7 +100,7 @@ ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)\n CFLAGS_eal_thread.o += -Wno-return-type\n endif\n \n-INC := rte_per_lcore.h rte_lcore.h rte_interrupts.h rte_kni_common.h rte_dom0_common.h\n+INC := rte_interrupts.h rte_kni_common.h rte_dom0_common.h\n \n SYMLINK-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP)-include/exec-env := \\\n \t$(addprefix include/exec-env/,$(INC))\ndiff --git a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_lcore.h b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_lcore.h\ndeleted file mode 100644\nindex e19ab54..0000000\n--- a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_lcore.h\n+++ /dev/null\n@@ -1,67 +0,0 @@\n-/*-\n- * BSD LICENSE\n- *\n- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n- * All rights reserved.\n- *\n- * Redistribution and use in source and binary forms, with or without\n- * modification, are permitted provided that the following conditions\n- * are met:\n- *\n- * * Redistributions of source code must retain the above copyright\n- * notice, this list of conditions and the following disclaimer.\n- * * Redistributions in binary form must reproduce the above copyright\n- * notice, this list of conditions and the following disclaimer in\n- * the documentation and/or other materials provided with the\n- * distribution.\n- * * Neither the name of Intel Corporation nor the names of its\n- * contributors may be used to endorse or promote products derived\n- * from this software without specific prior written permission.\n- *\n- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n- * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n- */\n-\n-#ifndef _RTE_LCORE_H_\n-#error \"don't include this file directly, please include generic <rte_lcore.h>\"\n-#endif\n-\n-#ifndef _RTE_LINUXAPP_LCORE_H_\n-#define _RTE_LINUXAPP_LCORE_H_\n-\n-/**\n- * @file\n- * API for lcore and socket manipulation in linuxapp environment\n- */\n-\n-/**\n- * structure storing internal configuration (per-lcore)\n- */\n-struct lcore_config {\n-\tunsigned detected; /**< true if lcore was detected */\n-\tpthread_t thread_id; /**< pthread identifier */\n-\tint pipe_master2slave[2]; /**< communication pipe with master */\n-\tint pipe_slave2master[2]; /**< communication pipe with master */\n-\tlcore_function_t * volatile f; /**< function to call */\n-\tvoid * volatile arg; /**< argument of function */\n-\tvolatile int ret; /**< return value of function */\n-\tvolatile enum rte_lcore_state_t state; /**< lcore state */\n-\tunsigned socket_id; /**< physical socket id for this lcore */\n-\tunsigned core_id; /**< core number on socket for this lcore */\n-};\n-\n-/**\n- * internal configuration (per-lcore)\n- */\n-extern struct lcore_config lcore_config[RTE_MAX_LCORE];\n-\n-#endif /* _RTE_LINUXAPP_LCORE_H_ */\ndiff --git a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_per_lcore.h b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_per_lcore.h\ndeleted file mode 100644\nindex db8f274..0000000\n--- a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_per_lcore.h\n+++ /dev/null\n@@ -1,67 +0,0 @@\n-/*-\n- * BSD LICENSE\n- *\n- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n- * All rights reserved.\n- *\n- * Redistribution and use in source and binary forms, with or without\n- * modification, are permitted provided that the following conditions\n- * are met:\n- *\n- * * Redistributions of source code must retain the above copyright\n- * notice, this list of conditions and the following disclaimer.\n- * * Redistributions in binary form must reproduce the above copyright\n- * notice, this list of conditions and the following disclaimer in\n- * the documentation and/or other materials provided with the\n- * distribution.\n- * * Neither the name of Intel Corporation nor the names of its\n- * contributors may be used to endorse or promote products derived\n- * from this software without specific prior written permission.\n- *\n- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n- * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n- */\n-\n-#ifndef _RTE_PER_LCORE_H_\n-#error \"don't include this file directly, please include generic <rte_per_lcore.h>\"\n-#endif\n-\n-#ifndef _RTE_LINUXAPP_PER_LCORE_H_\n-#define _RTE_LINUXAPP_PER_LCORE_H_\n-\n-/**\n- * @file\n- * Per-lcore variables in RTE on linuxapp environment\n- */\n-\n-#include <pthread.h>\n-\n-/**\n- * Macro to define a per lcore variable \"var\" of type \"type\", don't\n- * use keywords like \"static\" or \"volatile\" in type, just prefix the\n- * whole macro.\n- */\n-#define RTE_DEFINE_PER_LCORE(type, name)\t\t\t\\\n-\t__thread __typeof__(type) per_lcore_##name\n-\n-/**\n- * Macro to declare an extern per lcore variable \"var\" of type \"type\"\n- */\n-#define RTE_DECLARE_PER_LCORE(type, name)\t\t\t\\\n-\textern __thread __typeof__(type) per_lcore_##name\n-\n-/**\n- * Read/write the per-lcore variable value\n- */\n-#define RTE_PER_LCORE(name) (per_lcore_##name)\n-\n-#endif /* _RTE_LINUXAPP_PER_LCORE_H_ */\n", "prefixes": [ "dpdk-dev", "02/10" ] }{ "id": 1451, "url": "