Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/51876/?format=api
http://patches.dpdk.org/api/patches/51876/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190328232451.16988-6-anand.rawat@intel.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": "<20190328232451.16988-6-anand.rawat@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190328232451.16988-6-anand.rawat@intel.com", "date": "2019-03-28T23:24:48", "name": "[v7,5/8] eal: add headers for compatibility with windows", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "3fe62996fe25870557dbf71c1a11fdc8d7dbdab7", "submitter": { "id": 1231, "url": "http://patches.dpdk.org/api/people/1231/?format=api", "name": "Anand Rawat", "email": "anand.rawat@intel.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190328232451.16988-6-anand.rawat@intel.com/mbox/", "series": [ { "id": 3980, "url": "http://patches.dpdk.org/api/series/3980/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=3980", "date": "2019-03-28T23:24:43", "name": "HelloWorld example for windows", "version": 7, "mbox": "http://patches.dpdk.org/series/3980/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/51876/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/51876/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 559284C9C;\n\tFri, 29 Mar 2019 00:25:18 +0100 (CET)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 2FF392C19\n\tfor <dev@dpdk.org>; Fri, 29 Mar 2019 00:24:56 +0100 (CET)", "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t28 Mar 2019 16:24:53 -0700", "from anandraw-devbx.amr.corp.intel.com ([10.19.242.57])\n\tby orsmga005.jf.intel.com with ESMTP; 28 Mar 2019 16:24:53 -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,282,1549958400\"; d=\"scan'208\";a=\"311303603\"", "From": "Anand Rawat <anand.rawat@intel.com>", "To": "dev@dpdk.org", "Cc": "anand.rawat@intel.com, pallavi.kadam@intel.com, ranjit.menon@intel.com, \n\tjeffrey.b.shaw@intel.com, bruce.richardson@intel.com, thomas@monjalon.net", "Date": "Thu, 28 Mar 2019 16:24:48 -0700", "Message-Id": "<20190328232451.16988-6-anand.rawat@intel.com>", "X-Mailer": "git-send-email 2.17.1.windows.2", "In-Reply-To": "<20190328232451.16988-1-anand.rawat@intel.com>", "References": "<20190306041634.12976-1-anand.rawat@intel.com>\n\t<20190328232451.16988-1-anand.rawat@intel.com>", "Subject": "[dpdk-dev] [PATCH v7 5/8] eal: add headers for compatibility with\n\twindows", "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 headers to support windows environment for common source.\nThese headers will have windows specific implementions of the\nsystem library apis provided in linux and freebsd.\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 .../windows/eal/include/exec-env/fnmatch.h | 48 ++++++++++\n .../windows/eal/include/exec-env/pthread.h | 27 ++++++\n .../windows/eal/include/exec-env/regex.h | 88 +++++++++++++++++++\n .../windows/eal/include/exec-env/sched.h | 46 ++++++++++\n .../windows/eal/include/exec-env/unistd.h | 12 +++\n 5 files changed, 221 insertions(+)\n create mode 100644 lib/librte_eal/windows/eal/include/exec-env/fnmatch.h\n create mode 100644 lib/librte_eal/windows/eal/include/exec-env/pthread.h\n create mode 100644 lib/librte_eal/windows/eal/include/exec-env/regex.h\n create mode 100644 lib/librte_eal/windows/eal/include/exec-env/sched.h\n create mode 100644 lib/librte_eal/windows/eal/include/exec-env/unistd.h", "diff": "diff --git a/lib/librte_eal/windows/eal/include/exec-env/fnmatch.h b/lib/librte_eal/windows/eal/include/exec-env/fnmatch.h\nnew file mode 100644\nindex 000000000..0a70c4c26\n--- /dev/null\n+++ b/lib/librte_eal/windows/eal/include/exec-env/fnmatch.h\n@@ -0,0 +1,48 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2019 Intel Corporation\n+ */\n+\n+#ifndef _FNMATCH_H_\n+#define _FNMATCH_H_\n+\n+/**\n+ * This file is required to support the common code in eal_common_log.c\n+ * as windows C lib does not contain fnmatch.h. This may be removed in\n+ * future releases.\n+ */\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+#define FNM_NOMATCH 1\n+\n+/**\n+ * This function is used for searhing a given string source\n+ * with the given regular expression pattern.\n+ *\n+ * @param pattern\n+ *\tregular expression notation decribing the pattern to match\n+ *\n+ * @param string\n+ *\tsource string to searcg for the pattern\n+ *\n+ * @param flag\n+ *\tcontaining information about the pattern\n+ *\n+ * @return\n+ *\tif the pattern is found then return 0 or else FNM_NOMATCH\n+ */\n+static inline int fnmatch(__rte_unused const char *pattern,\n+\t\t__rte_unused const char *string,\n+\t\t__rte_unused int flags)\n+{\n+\t/* TODO */\n+\t/* This is a stub, not the expected result */\n+\treturn FNM_NOMATCH;\n+}\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif /* _FNMATCH_H_ */\ndiff --git a/lib/librte_eal/windows/eal/include/exec-env/pthread.h b/lib/librte_eal/windows/eal/include/exec-env/pthread.h\nnew file mode 100644\nindex 000000000..63054ffb2\n--- /dev/null\n+++ b/lib/librte_eal/windows/eal/include/exec-env/pthread.h\n@@ -0,0 +1,27 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2019 Intel Corporation\n+ */\n+\n+#ifndef _PTHREAD_H_\n+#define _PTHREAD_H_\n+\n+/**\n+ * This file is required to support the common code in eal_common_proc.c,\n+ * eal_common_thread.c and common\\include\\rte_per_lcore.h as windows C lib\n+ * does not contain pthread.h. This may be removed in future releases.\n+ */\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+/* defining pthread_t type on windows */\n+typedef uintptr_t pthread_t;\n+\n+/* defining pthread_attr_t type on windows */\n+typedef void *pthread_attr_t;\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif /* _PTHREAD_H_ */\ndiff --git a/lib/librte_eal/windows/eal/include/exec-env/regex.h b/lib/librte_eal/windows/eal/include/exec-env/regex.h\nnew file mode 100644\nindex 000000000..df05af56f\n--- /dev/null\n+++ b/lib/librte_eal/windows/eal/include/exec-env/regex.h\n@@ -0,0 +1,88 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2019 Intel Corporation\n+ */\n+\n+#ifndef _REGEX_H_\n+#define _REGEX_H_\n+\n+/**\n+ * This file is required to support the common code in eal_common_log.c\n+ * as windows C lib does not contain regex.h. This may be removed in\n+ * future releases.\n+ */\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+#define REG_NOMATCH 1\n+#define REG_ESPACE 12\n+\n+/* defining regex_t for windows */\n+typedef void *regex_t;\n+/* defining regmatch_t for windows */\n+typedef void *regmatch_t;\n+\n+/**\n+ * The regcomp() function will compile the regular expression\n+ * contained in the string pointed to by the pattern argument\n+ * and place the results in the structure pointed to by preg.\n+ * The cflags argument is the bitwise inclusive OR of zero or\n+ * more of the flags\n+ */\n+static inline int regcomp(__rte_unused regex_t *preg,\n+\t\t__rte_unused const char *regex, __rte_unused int cflags)\n+{\n+\t/* TODO */\n+\t/* This is a stub, not the expected result */\n+\treturn REG_ESPACE;\n+}\n+\n+/**\n+ * The regexec() function compares the null-terminated string\n+ * specified by string with the compiled regular expression\n+ * preg initialised by a previous call to regcomp(). If it finds\n+ * a match, regexec() returns 0; otherwise it returns non-zero\n+ * indicating either no match or an error. The eflags argument\n+ * is the bitwise inclusive OR of zero or more of the flags.\n+ */\n+static inline int regexec(__rte_unused const regex_t *preg,\n+\t\t__rte_unused const char *string, __rte_unused size_t nmatch,\n+\t\t__rte_unused regmatch_t pmatch[], __rte_unused int eflags)\n+{\n+\t/* TODO */\n+\t/* This is a stub, not the expected result */\n+\treturn REG_NOMATCH;\n+}\n+\n+/**\n+ * The regerror() function provides a mapping from error codes\n+ * returned by regcomp() and regexec() to unspecified printable strings.\n+ */\n+static inline size_t regerror(__rte_unused int errcode,\n+\t\t__rte_unused const regex_t *preg, char *errbuf,\n+\t\t__rte_unused size_t errbuf_size)\n+{\n+\t/* TODO */\n+\t/* This is a stub, not the expected result */\n+\tif (errbuf) {\n+\t\t*errbuf = '\\0';\n+\t\treturn 1;\n+\t}\n+\treturn 0;\n+}\n+\n+/**\n+ * The regfree() function frees any memory allocated by regcomp()\n+ * associated with preg.\n+ */\n+static inline void regfree(__rte_unused regex_t *preg)\n+{\n+\t/* TODO */\n+\t/* This is a stub, not the expected result */\n+}\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif /* _REGEX_H_ */\ndiff --git a/lib/librte_eal/windows/eal/include/exec-env/sched.h b/lib/librte_eal/windows/eal/include/exec-env/sched.h\nnew file mode 100644\nindex 000000000..1851857cf\n--- /dev/null\n+++ b/lib/librte_eal/windows/eal/include/exec-env/sched.h\n@@ -0,0 +1,46 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2019 Intel Corporation\n+ */\n+\n+#ifndef _SCHED_H_\n+#define _SCHED_H_\n+\n+/**\n+ * This file is added to support the common code in eal_common_thread.c\n+ * as windows C lib does not contain sched.h. This may be removed\n+ * in future releases.\n+ */\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+#ifndef CPU_SET_SIZE\n+#define CPU_SET_SIZE RTE_MAX_LCORE\n+#endif\n+\n+#define _BITS_PER_SET (sizeof(long long) * 8)\n+#define _BIT_SET_MASK (_BITS_PER_SET - 1)\n+\n+#define _NUM_SETS(b) (((b) + _BIT_SET_MASK) / _BITS_PER_SET)\n+#define _WHICH_SET(b) ((b) / _BITS_PER_SET)\n+#define _WHICH_BIT(b) ((b) & (_BITS_PER_SET - 1))\n+\n+typedef struct _rte_cpuset_s {\n+\tlong long _bits[_NUM_SETS(CPU_SET_SIZE)];\n+} rte_cpuset_t;\n+\n+#define CPU_SET(b, s) ((s)->_bits[_WHICH_SET(b)] |= (1LL << _WHICH_BIT(b)))\n+\n+#define CPU_ZERO(s)\t\t\t\t\t\t\t\\\n+\tdo {\t\t\t\t\t\t\t\t\\\n+\t\tunsigned int _i;\t\t\t\t\t\\\n+\t\t\t\t\t\t\t\t\t\\\n+\t\tfor (_i = 0; _i < _NUM_SETS(CPU_SET_SIZE); _i++)\t\\\n+\t\t\t(s)->_bits[_i] = 0LL;\t\t\t\t\\\n+\t} while (0)\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif /* _SCHED_H_ */\ndiff --git a/lib/librte_eal/windows/eal/include/exec-env/unistd.h b/lib/librte_eal/windows/eal/include/exec-env/unistd.h\nnew file mode 100644\nindex 000000000..546e70b56\n--- /dev/null\n+++ b/lib/librte_eal/windows/eal/include/exec-env/unistd.h\n@@ -0,0 +1,12 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2019 Intel Corporation\n+ */\n+\n+#ifndef _UNISTD_H_\n+#define _UNISTD_H_\n+/**\n+ * This file is added to support common code in eal_common_lcore.c\n+ * as windows C lib does not contain unistd.h. This may be removed\n+ * in future releases.\n+ */\n+#endif /* _UNISTD_H_ */\n", "prefixes": [ "v7", "5/8" ] }{ "id": 51876, "url": "