Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/49134/?format=api
https://patches.dpdk.org/api/patches/49134/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/c2c6fd2f39043a7e4f35bc2f9438ed3c075730cf.1545236474.git.rahul.lakkireddy@chelsio.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": "<c2c6fd2f39043a7e4f35bc2f9438ed3c075730cf.1545236474.git.rahul.lakkireddy@chelsio.com>", "list_archive_url": "https://inbox.dpdk.org/dev/c2c6fd2f39043a7e4f35bc2f9438ed3c075730cf.1545236474.git.rahul.lakkireddy@chelsio.com", "date": "2018-12-19T16:28:25", "name": "[v2,3/4] net/cxgbe: only define symbols when not available", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "00089c72a7cac34e9cc23c94e354ce4ddc5968c6", "submitter": { "id": 241, "url": "https://patches.dpdk.org/api/people/241/?format=api", "name": "Rahul Lakkireddy", "email": "rahul.lakkireddy@chelsio.com" }, "delegate": { "id": 319, "url": "https://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/c2c6fd2f39043a7e4f35bc2f9438ed3c075730cf.1545236474.git.rahul.lakkireddy@chelsio.com/mbox/", "series": [ { "id": 2875, "url": "https://patches.dpdk.org/api/series/2875/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=2875", "date": "2018-12-19T16:28:22", "name": "net/cxgbe: fix build for Microsoft Windows OS support", "version": 2, "mbox": "https://patches.dpdk.org/series/2875/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/49134/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/49134/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 8588A1B993;\n\tWed, 19 Dec 2018 17:30:28 +0100 (CET)", "from stargate.chelsio.com (stargate.chelsio.com [12.32.117.8])\n\tby dpdk.org (Postfix) with ESMTP id EE8601B900\n\tfor <dev@dpdk.org>; Wed, 19 Dec 2018 17:30:26 +0100 (CET)", "from localhost (scalar.blr.asicdesigners.com [10.193.185.94])\n\tby stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id wBJGUNGs024432; \n\tWed, 19 Dec 2018 08:30:24 -0800" ], "From": "Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>", "To": "dev@dpdk.org", "Cc": "satishr@chelsio.com, indranil@chelsio.com", "Date": "Wed, 19 Dec 2018 21:58:25 +0530", "Message-Id": "<c2c6fd2f39043a7e4f35bc2f9438ed3c075730cf.1545236474.git.rahul.lakkireddy@chelsio.com>", "X-Mailer": "git-send-email 2.5.3", "In-Reply-To": [ "<cover.1545236474.git.rahul.lakkireddy@chelsio.com>", "<cover.1545236474.git.rahul.lakkireddy@chelsio.com>" ], "References": [ "<cover.1545236474.git.rahul.lakkireddy@chelsio.com>", "<cover.1545236474.git.rahul.lakkireddy@chelsio.com>" ], "Subject": "[dpdk-dev] [PATCH v2 3/4] net/cxgbe: only define symbols when not\n\tavailable", "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": "Define symbols only when they are not available.\n\nThis fixes following types of issues reported by Intel C++ compiler\nin Windows build.\n\nC:\\> cxgbe_compat.h(154): warning #47: incompatible redefinition of\nmacro \"min\"\n #define min(a, b) RTE_MIN(a, b)\n ^\n\nC:\\> t4_hw.c(338): warning #266: function \"bzero\" declared implicitly\n bzero(p, 0, size);\n ^\n\nC:\\> t4_hw.c(5337): warning #266: function \"htonl\" declared implicitly\n rvc.op_to_viid = htonl(V_FW_CMD_OP(FW_RSS_VI_CONFIG_CMD) |\n ^\n\nC:\\> sge.c(361): error : expected an expression\n struct sge_eth_rxq *rxq = container_of(q, struct sge_eth_rxq, fl);\n ^\n\nC:\\> sge.c(1350): error : identifier \"caddr_t\" is undefined\n static void inline_tx_mbuf(const struct sge_txq *q, caddr_t from,\n ^\n[...]\n\nBuild Environment:\n1. Target OS: Microsoft Windows Server 2016\n2. Compiler: Intel C++ Compiler from Intel Parallel Studio XE 2019 [1]\n3. Development Tools:\n 3.1 Microsoft Visual Studio 2017 Professional\n 3.2 Windows Software Development Kit (SDK) v10.0.17763\n 3.3 Windows Driver Kit (WDK) v10.0.17763\n\n[1] https://software.intel.com/en-us/parallel-studio-xe\n\nSigned-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>\n---\nv2:\n- Add more info in commit message regarding Windows build.\n\n drivers/net/cxgbe/base/t4_hw.c | 4 ++--\n drivers/net/cxgbe/base/t4vf_hw.c | 2 +-\n drivers/net/cxgbe/cxgbe_compat.h | 29 ++++++++++++++++++++++++++++-\n 3 files changed, 31 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c\nindex 701e0b1fe..796e2f7f8 100644\n--- a/drivers/net/cxgbe/base/t4_hw.c\n+++ b/drivers/net/cxgbe/base/t4_hw.c\n@@ -246,7 +246,7 @@ static void get_mbox_rpl(struct adapter *adap, __be64 *rpl, int nflit,\n \t\t\t u32 mbox_addr)\n {\n \tfor ( ; nflit; nflit--, mbox_addr += 8)\n-\t\t*rpl++ = htobe64(t4_read_reg64(adap, mbox_addr));\n+\t\t*rpl++ = cpu_to_be64(t4_read_reg64(adap, mbox_addr));\n }\n \n /*\n@@ -335,7 +335,7 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,\n \t\treturn -EINVAL;\n \t}\n \n-\tbzero(p, size);\n+\tmemset(p, 0, size);\n \tmemcpy(p, (const __be64 *)cmd, size);\n \n \t/*\ndiff --git a/drivers/net/cxgbe/base/t4vf_hw.c b/drivers/net/cxgbe/base/t4vf_hw.c\nindex d96456bbe..649bacfb2 100644\n--- a/drivers/net/cxgbe/base/t4vf_hw.c\n+++ b/drivers/net/cxgbe/base/t4vf_hw.c\n@@ -44,7 +44,7 @@ static void get_mbox_rpl(struct adapter *adap, __be64 *rpl, int nflit,\n \t\t\t u32 mbox_addr)\n {\n \tfor ( ; nflit; nflit--, mbox_addr += 8)\n-\t\t*rpl++ = htobe64(t4_read_reg64(adap, mbox_addr));\n+\t\t*rpl++ = cpu_to_be64(t4_read_reg64(adap, mbox_addr));\n }\n \n /**\ndiff --git a/drivers/net/cxgbe/cxgbe_compat.h b/drivers/net/cxgbe/cxgbe_compat.h\nindex ce4662d54..686ca6e0a 100644\n--- a/drivers/net/cxgbe/cxgbe_compat.h\n+++ b/drivers/net/cxgbe/cxgbe_compat.h\n@@ -18,6 +18,7 @@\n #include <rte_spinlock.h>\n #include <rte_log.h>\n #include <rte_io.h>\n+#include <rte_net.h>\n \n #define dev_printf(level, fmt, ...) \\\n \tRTE_LOG(level, PMD, \"rte_cxgbe_pmd: \" fmt, ##__VA_ARGS__)\n@@ -149,18 +150,24 @@ typedef uint64_t dma_addr_t;\n #define false\t0\n #define true\t1\n \n+#ifndef min\n #define min(a, b) RTE_MIN(a, b)\n+#endif\n+\n+#ifndef max\n #define max(a, b) RTE_MAX(a, b)\n+#endif\n \n /*\n * round up val _p to a power of 2 size _s\n */\n #define cxgbe_roundup(_p, _s) (((unsigned long)(_p) + (_s - 1)) & ~(_s - 1))\n \n-#undef container_of\n+#ifndef container_of\n #define container_of(ptr, type, member) ({ \\\n \t\ttypeof(((type *)0)->member)(*__mptr) = (ptr); \\\n \t\t(type *)((char *)__mptr - offsetof(type, member)); })\n+#endif\n \n #define ARRAY_SIZE(arr) RTE_DIM(arr)\n \n@@ -173,6 +180,26 @@ typedef uint64_t dma_addr_t;\n #define be64_to_cpu(o) rte_be_to_cpu_64(o)\n #define le32_to_cpu(o) rte_le_to_cpu_32(o)\n \n+#ifndef ntohs\n+#define ntohs(o) be16_to_cpu(o)\n+#endif\n+\n+#ifndef ntohl\n+#define ntohl(o) be32_to_cpu(o)\n+#endif\n+\n+#ifndef htons\n+#define htons(o) cpu_to_be16(o)\n+#endif\n+\n+#ifndef htonl\n+#define htonl(o) cpu_to_be32(o)\n+#endif\n+\n+#ifndef caddr_t\n+typedef char *caddr_t;\n+#endif\n+\n #define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))\n #define DELAY(x) rte_delay_us(x)\n #define udelay(x) DELAY(x)\n", "prefixes": [ "v2", "3/4" ] }{ "id": 49134, "url": "