Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/79063/?format=api
http://patches.dpdk.org/api/patches/79063/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200928215052.23627-6-dmitry.kozliuk@gmail.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": "<20200928215052.23627-6-dmitry.kozliuk@gmail.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200928215052.23627-6-dmitry.kozliuk@gmail.com", "date": "2020-09-28T21:50:50", "name": "[v3,5/7] eal/windows: improve compatibility networking headers", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "4f87513ba641ba7c618ac3c96718480cce7c0fab", "submitter": { "id": 1581, "url": "http://patches.dpdk.org/api/people/1581/?format=api", "name": "Dmitry Kozlyuk", "email": "dmitry.kozliuk@gmail.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/20200928215052.23627-6-dmitry.kozliuk@gmail.com/mbox/", "series": [ { "id": 12564, "url": "http://patches.dpdk.org/api/series/12564/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12564", "date": "2020-09-28T21:50:45", "name": "cmdline: support Windows", "version": 3, "mbox": "http://patches.dpdk.org/series/12564/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/79063/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/79063/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 52A8DA04C0;\n\tMon, 28 Sep 2020 23:53:08 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 2517C1BED1;\n\tMon, 28 Sep 2020 23:51:47 +0200 (CEST)", "from mail-lj1-f195.google.com (mail-lj1-f195.google.com\n [209.85.208.195]) by dpdk.org (Postfix) with ESMTP id 9CD551D6E3\n for <dev@dpdk.org>; Mon, 28 Sep 2020 23:51:38 +0200 (CEST)", "by mail-lj1-f195.google.com with SMTP id s205so2281671lja.7\n for <dev@dpdk.org>; Mon, 28 Sep 2020 14:51:38 -0700 (PDT)", "from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru.\n [37.110.65.23])\n by smtp.gmail.com with ESMTPSA id l11sm2954893lfk.113.2020.09.28.14.51.36\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 28 Sep 2020 14:51:36 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=kqY2ax0QRVQUWIsVEaWJ0WJgbyhvRR00tqHtVbS6VTk=;\n b=T0lT5pFDjaTlusR2iXCsBwA25492pjfzDk9TUUyaxLavSHQJcoOoaCtwyxkl9RlJAU\n gy4bxB48HLHvRAcdDWxazkb79Ug0e3Gn4DK9gMACRoxE/zQYV0CxlK74IJs3kXBsOnFm\n 6RK7+yqsBeJXBM4gns6Z/GWE4U6YaDRlnWVC+hZyOAmVaQcvkSq/1ie79nR/PJUv2j0u\n IyfIH+DxHDXvNg+A7E8ZO8gb+8moxgnKoI+LgyCz3U0lBnehvPAFDfYY9IvnJsHn3Woc\n mYKm1h/ISqDEOHS4ByJ6v2Snd8Tok6hChg3LU06LYHfMvg0mdgmLnlBfxzJtUxHz6928\n EQYg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=kqY2ax0QRVQUWIsVEaWJ0WJgbyhvRR00tqHtVbS6VTk=;\n b=FTE1kApl1EXz0dUF6WWTJR+yYO1zXpc4790Twg5NLEbS5Y7YuXgFlkSpyp5JvD4GAV\n nulAAG88O7aHwEFtzVWKx6bsunu/0r1yQSW/bzKi4ojjmOGIGE9wcaMRtOlsiPy1wC6s\n 5R4nPeroYH4i1JRRpmVmj9MYyymKcJyAaxGzvDX2O6Aomvl+ncm9WfPsTdBje7OqQ377\n kgJ1aRy0JDaC2qWs19j+6qOaDdEI2YjesoAy1GTHl07cmolp33GR5iSS1pFiw8ow3whA\n Olp2otMdBnd5sRT4iTRtYPXlyeN6/g+mL5fgFWJL9S27Z+e1MRFy8sPsl4CtVUTlP7Qt\n Mz3Q==", "X-Gm-Message-State": "AOAM532Xjd+98KyofiQfvO8Kc9fRSZD8HQ1HtbmtRzeAD09Eg/2qo+BU\n 395UAaSMsBwfJcSiGsunSF86KDzyfKcc06Zf", "X-Google-Smtp-Source": "\n ABdhPJybV0ssUy7FRBjWDWX1Py+bta88T4leEKO/FjkqMT6tem7ScpvdWUl8be0PNwPSdjsj+wOuDw==", "X-Received": "by 2002:a2e:9784:: with SMTP id y4mr172052lji.247.1601329896887;\n Mon, 28 Sep 2020 14:51:36 -0700 (PDT)", "From": "Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>", "To": "dev@dpdk.org", "Cc": "\"Kinsella, Ray\" <mdr@ashroe.eu>, Khoa To <khot@microsoft.com>,\n Stephen Hemminger <stephen@networkplumber.org>,\n Ferruh Yigit <ferruh.yigit@intel.com>,\n Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,\n Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>,\n Dmitry Malloy <dmitrym@microsoft.com>,\n Pallavi Kadam <pallavi.kadam@intel.com>", "Date": "Tue, 29 Sep 2020 00:50:50 +0300", "Message-Id": "<20200928215052.23627-6-dmitry.kozliuk@gmail.com>", "X-Mailer": "git-send-email 2.28.0", "In-Reply-To": "<20200928215052.23627-1-dmitry.kozliuk@gmail.com>", "References": "<20200730210652.14568-1-dmitry.kozliuk@gmail.com>\n <20200928215052.23627-1-dmitry.kozliuk@gmail.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v3 5/7] eal/windows: improve compatibility\n\tnetworking headers", "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Extend compatibility header system to support librte_cmdline.\n\npthread.h has to include windows.h, which exposes struct in_addr, etc.\nconflicting with compatibility headers. WIN32_LEAN_AND_MEAN macro\nis required to disable this behavior. Use rte_windows.h to define\nWIN32_LEAN_AND_MEAN for pthread library.\n\nSigned-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>\n---\n lib/librte_eal/windows/include/arpa/inet.h | 30 +++++++++++++++++++++\n lib/librte_eal/windows/include/netinet/in.h | 12 +++++++++\n lib/librte_eal/windows/include/sys/socket.h | 24 +++++++++++++++++\n 3 files changed, 66 insertions(+)\n create mode 100644 lib/librte_eal/windows/include/arpa/inet.h\n create mode 100644 lib/librte_eal/windows/include/sys/socket.h", "diff": "diff --git a/lib/librte_eal/windows/include/arpa/inet.h b/lib/librte_eal/windows/include/arpa/inet.h\nnew file mode 100644\nindex 000000000..96b698438\n--- /dev/null\n+++ b/lib/librte_eal/windows/include/arpa/inet.h\n@@ -0,0 +1,30 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (c) 2020 Dmitry Kozlyuk\n+ */\n+\n+#ifndef _ARPA_INET_H_\n+#define _ARPA_INET_H_\n+\n+/**\n+ * @file\n+ *\n+ * Compatibility header\n+ *\n+ * Although symbols declared here are present on Windows,\n+ * including <winsock2.h> would expose too much macros breaking common code.\n+ */\n+\n+#include <netinet/in.h>\n+#include <sys/socket.h>\n+\n+/* defined in ws2_32.dll */\n+__attribute__((stdcall))\n+int\n+inet_pton(int af, const char *src, void *dst);\n+\n+/* defined in ws2_32.dll */\n+__attribute__((stdcall))\n+const char *\n+inet_ntop(int af, const void *src, char *dst, socklen_t size);\n+\n+#endif /* _ARPA_INET_H_ */\ndiff --git a/lib/librte_eal/windows/include/netinet/in.h b/lib/librte_eal/windows/include/netinet/in.h\nindex 534a2d99a..be1469ec1 100644\n--- a/lib/librte_eal/windows/include/netinet/in.h\n+++ b/lib/librte_eal/windows/include/netinet/in.h\n@@ -5,6 +5,8 @@\n #ifndef _IN_H_\n #define _IN_H_\n \n+#include <sys/socket.h>\n+\n #define IPPROTO_IP 0\n #define IPPROTO_HOPOPTS 0\n #define IPPROTO_ICMP 1\n@@ -22,4 +24,14 @@\n #define IPPROTO_DSTOPTS 60\n #define IPPROTO_SCTP 132\n \n+#define INET6_ADDRSTRLEN 46\n+\n+struct in_addr {\n+\tuint32_t s_addr;\n+};\n+\n+struct in6_addr {\n+\tuint8_t s6_addr[16];\n+};\n+\n #endif\ndiff --git a/lib/librte_eal/windows/include/sys/socket.h b/lib/librte_eal/windows/include/sys/socket.h\nnew file mode 100644\nindex 000000000..9536cf8e6\n--- /dev/null\n+++ b/lib/librte_eal/windows/include/sys/socket.h\n@@ -0,0 +1,24 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (c) 2020 Dmitry Kozlyuk\n+ */\n+\n+#ifndef _SYS_SOCKET_H_\n+#define _SYS_SOCKET_H_\n+\n+/**\n+ * @file\n+ *\n+ * Compatibility header\n+ *\n+ * Although symbols declared here are present on Windows,\n+ * including <winsock2.h> would expose too much macros breaking common code.\n+ */\n+\n+#include <stddef.h>\n+\n+#define AF_INET 2\n+#define AF_INET6 23\n+\n+typedef size_t socklen_t;\n+\n+#endif /* _SYS_SOCKET_H_ */\n", "prefixes": [ "v3", "5/7" ] }{ "id": 79063, "url": "