get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/50845/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 50845,
    "url": "https://patches.dpdk.org/api/patches/50845/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190306041634.12976-2-anand.rawat@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": "<20190306041634.12976-2-anand.rawat@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190306041634.12976-2-anand.rawat@intel.com",
    "date": "2019-03-06T04:16:29",
    "name": "[v2,1/6] eal: eal stub to add windows support",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "fb15fe47558cdf3da15d0d0eea8dee5791b39eae",
    "submitter": {
        "id": 1231,
        "url": "https://patches.dpdk.org/api/people/1231/?format=api",
        "name": "Anand Rawat",
        "email": "anand.rawat@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20190306041634.12976-2-anand.rawat@intel.com/mbox/",
    "series": [
        {
            "id": 3639,
            "url": "https://patches.dpdk.org/api/series/3639/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=3639",
            "date": "2019-03-06T04:16:28",
            "name": "HelloWorld example for windows",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/3639/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/50845/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/50845/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 489154CA7;\n\tWed,  6 Mar 2019 05:16:41 +0100 (CET)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby dpdk.org (Postfix) with ESMTP id D34E12C17\n\tfor <dev@dpdk.org>; Wed,  6 Mar 2019 05:16:36 +0100 (CET)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t05 Mar 2019 20:16:34 -0800",
            "from anandraw-devbx.amr.corp.intel.com ([10.19.242.57])\n\tby orsmga005.jf.intel.com with ESMTP; 05 Mar 2019 20:16:34 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.58,446,1544515200\"; d=\"scan'208\";a=\"304752065\"",
        "From": "Anand Rawat <anand.rawat@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "pallavi.kadam@intel.com, ranjit.menon@intel.com, jeffrey.b.shaw@intel.com,\n\tthomas@monjalon.net",
        "Date": "Tue,  5 Mar 2019 20:16:29 -0800",
        "Message-Id": "<20190306041634.12976-2-anand.rawat@intel.com>",
        "X-Mailer": "git-send-email 2.17.1.windows.2",
        "In-Reply-To": "<20190306041634.12976-1-anand.rawat@intel.com>",
        "References": "<20190306041634.12976-1-anand.rawat@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 1/6] eal: eal stub to add windows support",
        "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": "Added initial stub source files for windows support and meson\nchanges to build them.\n\nSigned-off-by: Anand Rawat <anand.rawat@intel.com>\nSigned-off-by: Pallavi Kadam <pallavi.kadam@intel.com>\nReviewed-by: Jeff Shaw <jeffrey.b.shaw@intel.com>\nReviewed-by: Ranjit Menon <ranjit.menon@intel.com>\n---\n config/meson.build                      | 22 ++++---\n config/x86/meson.build                  | 14 +++--\n lib/librte_eal/common/meson.build       | 84 ++++++++++++++-----------\n lib/librte_eal/meson.build              | 10 ++-\n lib/librte_eal/windows/eal/eal.c        | 11 ++++\n lib/librte_eal/windows/eal/eal_debug.c  | 12 ++++\n lib/librte_eal/windows/eal/eal_lcore.c  | 26 ++++++++\n lib/librte_eal/windows/eal/eal_thread.c | 15 +++++\n lib/librte_eal/windows/eal/meson.build  | 10 +++\n lib/meson.build                         |  6 +-\n meson.build                             | 34 +++++-----\n 11 files changed, 176 insertions(+), 68 deletions(-)\n create mode 100644 lib/librte_eal/windows/eal/eal.c\n create mode 100644 lib/librte_eal/windows/eal/eal_debug.c\n create mode 100644 lib/librte_eal/windows/eal/eal_lcore.c\n create mode 100644 lib/librte_eal/windows/eal/eal_thread.c\n create mode 100644 lib/librte_eal/windows/eal/meson.build",
    "diff": "diff --git a/config/meson.build b/config/meson.build\nindex 0419607d3..37adf5b03 100644\n--- a/config/meson.build\n+++ b/config/meson.build\n@@ -1,5 +1,5 @@\n # SPDX-License-Identifier: BSD-3-Clause\n-# Copyright(c) 2017 Intel Corporation\n+# Copyright(c) 2017-2019 Intel Corporation\n \n # set the machine type and cflags for it\n if meson.is_cross_build()\n@@ -52,18 +52,26 @@ dpdk_extra_ldflags += '-Wl,--no-as-needed'\n add_project_link_arguments('-pthread', language: 'c')\n dpdk_extra_ldflags += '-pthread'\n \n-# some libs depend on maths lib\n-add_project_link_arguments('-lm', language: 'c')\n-dpdk_extra_ldflags += '-lm'\n+if cc.find_library('lm', required : false).found()\n+\t# some libs depend on maths lib\n+\tadd_project_link_arguments('-lm', language: 'c')\n+\tdpdk_extra_ldflags += '-lm'\n+endif\n \n # for linux link against dl, for bsd execinfo\n if host_machine.system() == 'linux'\n \tlink_lib = 'dl'\n-else\n+elif host_machine.system() == 'freebsd'\n \tlink_lib = 'execinfo'\n+else\n+\tlink_lib = ''\n+endif\n+\n+# if link_lib is empty, do not add it to project properties\n+if link_lib != ''\n+\tadd_project_link_arguments('-l' + link_lib, language: 'c')\n+\tdpdk_extra_ldflags += '-l' + link_lib\n endif\n-add_project_link_arguments('-l' + link_lib, language: 'c')\n-dpdk_extra_ldflags += '-l' + link_lib\n \n # check for libraries used in multiple places in DPDK\n has_libnuma = 0\ndiff --git a/config/x86/meson.build b/config/x86/meson.build\nindex 7504cb9e5..558edfda9 100644\n--- a/config/x86/meson.build\n+++ b/config/x86/meson.build\n@@ -1,15 +1,17 @@\n # SPDX-License-Identifier: BSD-3-Clause\n-# Copyright(c) 2017 Intel Corporation\n+# Copyright(c) 2017-2019 Intel Corporation\n \n # for checking defines we need to use the correct compiler flags\n march_opt = ['-march=@0@'.format(machine)]\n \n # get binutils version for the workaround of Bug 97\n-ldver = run_command('ld', '-v').stdout().strip()\n-if ldver.contains('2.30')\n-\tif cc.has_argument('-mno-avx512f')\n-\t\tmarch_opt += '-mno-avx512f'\n-\t\tmessage('Binutils 2.30 detected, disabling AVX512 support as workaround for bug #97')\n+if host_machine.system() != 'windows'\n+\tldver = run_command('ld', '-v').stdout().strip()\n+\tif ldver.contains('2.30')\n+\t\tif cc.has_argument('-mno-avx512f')\n+\t\t\tmarch_opt += '-mno-avx512f'\n+\t\t\tmessage('Binutils 2.30 detected, disabling AVX512 support as workaround for bug #97')\n+\t\tendif\n \tendif\n endif\n \ndiff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build\nindex 5ecae0b1f..c010e8737 100644\n--- a/lib/librte_eal/common/meson.build\n+++ b/lib/librte_eal/common/meson.build\n@@ -1,58 +1,65 @@\n # SPDX-License-Identifier: BSD-3-Clause\n-# Copyright(c) 2017 Intel Corporation\n+# Copyright(c) 2017-2019 Intel Corporation\n \n eal_inc += include_directories('.', 'include',\n \t\tjoin_paths('include/arch', arch_subdir))\n \n common_objs = []\n-common_sources = files(\n-\t'eal_common_bus.c',\n-\t'eal_common_cpuflags.c',\n-\t'eal_common_class.c',\n-\t'eal_common_devargs.c',\n-\t'eal_common_dev.c',\n-\t'eal_common_errno.c',\n-\t'eal_common_fbarray.c',\n-\t'eal_common_hexdump.c',\n-\t'eal_common_hypervisor.c',\n-\t'eal_common_launch.c',\n-\t'eal_common_lcore.c',\n-\t'eal_common_log.c',\n-\t'eal_common_memalloc.c',\n-\t'eal_common_memory.c',\n-\t'eal_common_memzone.c',\n-\t'eal_common_options.c',\n-\t'eal_common_proc.c',\n-\t'eal_common_string_fns.c',\n-\t'eal_common_tailqs.c',\n-\t'eal_common_thread.c',\n-\t'eal_common_timer.c',\n-\t'eal_common_uuid.c',\n-\t'hotplug_mp.c',\n-\t'malloc_elem.c',\n-\t'malloc_heap.c',\n-\t'malloc_mp.c',\n-\t'rte_keepalive.c',\n-\t'rte_malloc.c',\n-\t'rte_option.c',\n-\t'rte_reciprocal.c',\n-\t'rte_service.c'\n-)\n+common_sources = []\n+common_headers = []\n+if host_machine.system() != 'windows'\n+\tcommon_sources = files(\n+\t\t'eal_common_bus.c',\n+\t\t'eal_common_cpuflags.c',\n+\t\t'eal_common_class.c',\n+\t\t'eal_common_devargs.c',\n+\t\t'eal_common_dev.c',\n+\t\t'eal_common_errno.c',\n+\t\t'eal_common_fbarray.c',\n+\t\t'eal_common_hexdump.c',\n+\t\t'eal_common_hypervisor.c',\n+\t\t'eal_common_launch.c',\n+\t\t'eal_common_lcore.c',\n+\t\t'eal_common_log.c',\n+\t\t'eal_common_memalloc.c',\n+\t\t'eal_common_memory.c',\n+\t\t'eal_common_memzone.c',\n+\t\t'eal_common_options.c',\n+\t\t'eal_common_proc.c',\n+\t\t'eal_common_string_fns.c',\n+\t\t'eal_common_tailqs.c',\n+\t\t'eal_common_thread.c',\n+\t\t'eal_common_timer.c',\n+\t\t'eal_common_uuid.c',\n+\t\t'hotplug_mp.c',\n+\t\t'malloc_elem.c',\n+\t\t'malloc_heap.c',\n+\t\t'malloc_mp.c',\n+\t\t'rte_keepalive.c',\n+\t\t'rte_malloc.c',\n+\t\t'rte_option.c',\n+\t\t'rte_reciprocal.c',\n+\t\t'rte_service.c'\n+\t)\n+endif\n \n # get architecture specific sources and objs\n eal_common_arch_sources = []\n eal_common_arch_objs = []\n-subdir(join_paths('arch', arch_subdir))\n+\n+common_headers += files('include/rte_common.h')\n+if host_machine.system() != 'windows'\n+\tsubdir(join_paths('arch', arch_subdir))\n+endif\n common_sources += eal_common_arch_sources\n common_objs += eal_common_arch_objs\n \n-common_headers = files(\n+common_headers += files(\n \t'include/rte_alarm.h',\n \t'include/rte_branch_prediction.h',\n \t'include/rte_bus.h',\n \t'include/rte_bitmap.h',\n \t'include/rte_class.h',\n-\t'include/rte_common.h',\n \t'include/rte_compat.h',\n \t'include/rte_debug.h',\n \t'include/rte_devargs.h',\n@@ -85,7 +92,8 @@ common_headers = files(\n \t'include/rte_tailq.h',\n \t'include/rte_time.h',\n \t'include/rte_uuid.h',\n-\t'include/rte_version.h')\n+\t'include/rte_version.h'\n+)\n \n # special case install the generic headers, since they go in a subdir\n generic_headers = files(\ndiff --git a/lib/librte_eal/meson.build b/lib/librte_eal/meson.build\nindex 98c1d1f31..61b654557 100644\n--- a/lib/librte_eal/meson.build\n+++ b/lib/librte_eal/meson.build\n@@ -1,5 +1,5 @@\n # SPDX-License-Identifier: BSD-3-Clause\n-# Copyright(c) 2017 Intel Corporation\n+# Copyright(c) 2017-2019 Intel Corporation\n \n # Custom EAL processing. EAL is complicated enough that it can't just\n # have a straight list of headers and source files.\n@@ -17,13 +17,19 @@ elif host_machine.system() == 'freebsd'\n \tdpdk_conf.set('RTE_EXEC_ENV_BSDAPP', 1)\n \tsubdir('bsdapp/eal')\n \n+elif host_machine.system() == 'windows'\n+\tdpdk_conf.set('RTE_EXEC_ENV_WINDOWS', 1)\n+\tsubdir('windows/eal')\n+\n else\n \terror('unsupported system type \"@0@\"'.format(host_machine.system()))\n endif\n \n version = 9  # the version of the EAL API\n allow_experimental_apis = true\n-deps += 'kvargs'\n+if host_machine.system() != 'windows'\n+\tdeps += 'kvargs'\n+endif\n if dpdk_conf.has('RTE_USE_LIBBSD')\n \text_deps += libbsd\n endif\ndiff --git a/lib/librte_eal/windows/eal/eal.c b/lib/librte_eal/windows/eal/eal.c\nnew file mode 100644\nindex 000000000..134452a77\n--- /dev/null\n+++ b/lib/librte_eal/windows/eal/eal.c\n@@ -0,0 +1,11 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2019 Intel Corporation\n+ */\n+\n+#include \"rte_common.h\"\n+\n+int\n+rte_eal_init(int argc __rte_unused, char **argv __rte_unused)\n+{\n+\treturn 0;\n+}\ndiff --git a/lib/librte_eal/windows/eal/eal_debug.c b/lib/librte_eal/windows/eal/eal_debug.c\nnew file mode 100644\nindex 000000000..012eeccfa\n--- /dev/null\n+++ b/lib/librte_eal/windows/eal/eal_debug.c\n@@ -0,0 +1,12 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2019 Intel Corporation\n+ */\n+\n+#include \"rte_common.h\"\n+\n+void\n+__rte_panic(const char *funcname __rte_unused,\n+\t\tconst char *format __rte_unused, ...)\n+{\n+\tabort();\n+}\ndiff --git a/lib/librte_eal/windows/eal/eal_lcore.c b/lib/librte_eal/windows/eal/eal_lcore.c\nnew file mode 100644\nindex 000000000..be7adeb18\n--- /dev/null\n+++ b/lib/librte_eal/windows/eal/eal_lcore.c\n@@ -0,0 +1,26 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2019 Intel Corporation\n+ */\n+\n+#include \"rte_common.h\"\n+\n+ /* Get the cpu core id value */\n+unsigned int\n+eal_cpu_core_id(unsigned int lcore_id)\n+{\n+\treturn lcore_id;\n+}\n+\n+/* Check if a cpu is present by the presence of the cpu information for it */\n+int\n+eal_cpu_detected(unsigned int lcore_id __rte_unused)\n+{\n+\treturn 1;\n+}\n+\n+/* Get CPU socket id (NUMA node) for a logical core */\n+unsigned int\n+eal_cpu_socket_id(unsigned int cpu_id __rte_unused)\n+{\n+\treturn 0;\n+}\ndiff --git a/lib/librte_eal/windows/eal/eal_thread.c b/lib/librte_eal/windows/eal/eal_thread.c\nnew file mode 100644\nindex 000000000..222bd8f4d\n--- /dev/null\n+++ b/lib/librte_eal/windows/eal/eal_thread.c\n@@ -0,0 +1,15 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2018 Intel Corporation\n+ */\n+\n+#include <windows.h>\n+\n+#include \"rte_common.h\"\n+\n+typedef uintptr_t eal_thread_t;\n+\n+int\n+eal_thread_create(eal_thread_t *thread __rte_unused)\n+{\n+\treturn 0;\n+}\ndiff --git a/lib/librte_eal/windows/eal/meson.build b/lib/librte_eal/windows/eal/meson.build\nnew file mode 100644\nindex 000000000..8b1735623\n--- /dev/null\n+++ b/lib/librte_eal/windows/eal/meson.build\n@@ -0,0 +1,10 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2019 Intel Corporation\n+\n+env_objs = []\n+env_headers = []\n+env_sources = files('eal.c',\n+\t'eal_debug.c',\n+\t'eal_lcore.c',\n+\t'eal_thread.c',\n+)\ndiff --git a/lib/meson.build b/lib/meson.build\nindex 99957ba7d..995c0e1ac 100644\n--- a/lib/meson.build\n+++ b/lib/meson.build\n@@ -1,5 +1,5 @@\n # SPDX-License-Identifier: BSD-3-Clause\n-# Copyright(c) 2017 Intel Corporation\n+# Copyright(c) 2017-2019 Intel Corporation\n \n \n # process all libraries equally, as far as possible\n@@ -30,6 +30,10 @@ libraries = [\n \t# flow_classify lib depends on pkt framework table lib\n \t'flow_classify', 'bpf', 'telemetry']\n \n+if host_machine.system() == 'windows'\n+\tlibraries = ['eal'] # override libraries for windows\n+endif\n+\n default_cflags = machine_args\n if cc.has_argument('-Wno-format-truncation')\n \tdefault_cflags += '-Wno-format-truncation'\ndiff --git a/meson.build b/meson.build\nindex 69833de82..856e94c37 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -1,5 +1,5 @@\n # SPDX-License-Identifier: BSD-3-Clause\n-# Copyright(c) 2017 Intel Corporation\n+# Copyright(c) 2017-2019 Intel Corporation\n \n project('DPDK', 'C',\n \tversion: '19.05.0-rc0',\n@@ -13,6 +13,7 @@ cc = meson.get_compiler('c')\n dpdk_conf = configuration_data()\n dpdk_libraries = []\n dpdk_static_libraries = []\n+driver_classes = []\n dpdk_drivers = []\n dpdk_extra_ldflags = []\n dpdk_app_link_libraries = []\n@@ -35,28 +36,33 @@ eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)\n global_inc = include_directories('.', 'config', 'lib/librte_eal/common/include')\n subdir('config')\n \n-# build libs and drivers\n+# build libs\n subdir('lib')\n-subdir('buildtools')\n-subdir('drivers')\n \n-# build binaries and installable tools\n-subdir('usertools')\n-subdir('app')\n+if host_machine.system() != 'windows'\n+\t# build buildtools and drivers\n+\tsubdir('buildtools')\n+\tsubdir('drivers')\n \n-# build docs\n-subdir('doc')\n+\t# build binaries and installable tools\n+\tsubdir('usertools')\n+\tsubdir('app')\n+\tsubdir('test')\n+\n+\t# build kernel modules if enabled\n+\tif get_option('enable_kmods')\n+\t\tsubdir('kernel')\n+\tendif\n+\n+\t# build docs\n+\tsubdir('doc')\n+endif\n \n # build any examples explicitly requested - useful for developers\n if get_option('examples') != ''\n \tsubdir('examples')\n endif\n \n-# build kernel modules if enabled\n-if get_option('enable_kmods')\n-\tsubdir('kernel')\n-endif\n-\n # write the build config\n build_cfg = 'rte_build_config.h'\n configure_file(output: build_cfg,\n",
    "prefixes": [
        "v2",
        "1/6"
    ]
}