Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/7201/?format=api
https://patches.dpdk.org/api/patches/7201/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/56069ea4.47ac700a.ca875.43bb@mx.google.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": "<56069ea4.47ac700a.ca875.43bb@mx.google.com>", "list_archive_url": "https://inbox.dpdk.org/dev/56069ea4.47ac700a.ca875.43bb@mx.google.com", "date": "2015-09-26T13:09:41", "name": "[dpdk-dev] eal: fix C++ build (struct member: virtual)", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "9e3932102abc9a34741f4aa26396bf1294a76e95", "submitter": { "id": 336, "url": "https://patches.dpdk.org/api/people/336/?format=api", "name": "Christoph Gysin", "email": "christoph.gysin@gmail.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/56069ea4.47ac700a.ca875.43bb@mx.google.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/7201/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/7201/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 193DC5683;\n\tSat, 26 Sep 2015 15:33:27 +0200 (CEST)", "from mail-la0-f41.google.com (mail-la0-f41.google.com\n\t[209.85.215.41]) by dpdk.org (Postfix) with ESMTP id CA48D567A\n\tfor <dev@dpdk.org>; Sat, 26 Sep 2015 15:33:25 +0200 (CEST)", "by lahh2 with SMTP id h2so121742155lah.0\n\tfor <dev@dpdk.org>; Sat, 26 Sep 2015 06:33:25 -0700 (PDT)", "from localhost (188-67-107-13.bb.dnainternet.fi. [188.67.107.13])\n\tby smtp.gmail.com with ESMTPSA id\n\tba7sm951526lbc.48.2015.09.26.06.33.23 for <dev@dpdk.org>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSat, 26 Sep 2015 06:33:24 -0700 (PDT)", "by localhost (sSMTP sendmail emulation);\n\tSat, 26 Sep 2015 16:33:22 +0300" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\n\th=message-id:from:date:subject:to;\n\tbh=dnfc4npb/2se1XaGZqAEuWHIAfDvPVHD5ZgOhe36Dk4=;\n\tb=Z0mWKR3TfNtQPrCipfp8KravQjQ3bh38/590fdNjw2Cx4HRXHX6s7stKijuPLPTyfp\n\tYEKJ7zim59M+Q58tbUlUtoO5lkJs2SGzHwzZDnxm6dZfnb07oq9zRE1cg0qg+9Lru4kY\n\tNrR5R6F6ZjEIdTJGkVWFBkOtGynLI3uy7e+WnhAgjiELR2+8B7TBUJrwCznlP3yHrSQ7\n\tKuMV+hMVz0I+/aI6Xz0sAxY0ee1ZQIEn3uMv9JO8GhGR3/pVQaZOO2O5lEi1KWtaRi+L\n\tNFlrdkN/eP4+pZagC5fsgmwKfUVMzyy6v4p4XXSVHqkxeu1o5dXwKBeTabDS/kapsiyZ\n\tTIVA==", "X-Received": "by 10.152.37.135 with SMTP id y7mr516460laj.110.1443274405366;\n\tSat, 26 Sep 2015 06:33:25 -0700 (PDT)", "Message-ID": "<56069ea4.47ac700a.ca875.43bb@mx.google.com>", "From": "Christoph Gysin <christoph.gysin@gmail.com>", "Date": "Sat, 26 Sep 2015 16:09:41 +0300", "To": "dev@dpdk.org", "Subject": "[dpdk-dev] [PATCH] eal: fix C++ build (struct member: virtual)", "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": "'virtual' is a keyword and can't be used if the code is to compile with\nC++ compilers.\n\nIf rte_devargs.h was included in C++ code, compilation with clang++\nfailed with an error. g++ did not fail, but only because of a bug\nthat treats it as an anonymous struct with a decl-specifier which it\nignores.\n\nThis simply renames the member to 'virt'.\n---\n lib/librte_eal/common/eal_common_dev.c | 4 ++--\n lib/librte_eal/common/eal_common_devargs.c | 8 ++++----\n lib/librte_eal/common/include/rte_devargs.h | 2 +-\n 3 files changed, 7 insertions(+), 7 deletions(-)", "diff": "diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c\nindex 4089d66..a8a4146 100644\n--- a/lib/librte_eal/common/eal_common_dev.c\n+++ b/lib/librte_eal/common/eal_common_dev.c\n@@ -107,10 +107,10 @@ rte_eal_dev_init(void)\n \t\tif (devargs->type != RTE_DEVTYPE_VIRTUAL)\n \t\t\tcontinue;\n \n-\t\tif (rte_eal_vdev_init(devargs->virtual.drv_name,\n+\t\tif (rte_eal_vdev_init(devargs->virt.drv_name,\n \t\t\t\t\tdevargs->args)) {\n \t\t\tRTE_LOG(ERR, EAL, \"failed to initialize %s device\\n\",\n-\t\t\t\t\tdevargs->virtual.drv_name);\n+\t\t\t\t\tdevargs->virt.drv_name);\n \t\t\treturn -1;\n \t\t}\n \t}\ndiff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c\nindex ec56165..5d075d0 100644\n--- a/lib/librte_eal/common/eal_common_devargs.c\n+++ b/lib/librte_eal/common/eal_common_devargs.c\n@@ -107,9 +107,9 @@ rte_eal_devargs_add(enum rte_devtype devtype, const char *devargs_str)\n \t\tbreak;\n \tcase RTE_DEVTYPE_VIRTUAL:\n \t\t/* save driver name */\n-\t\tret = snprintf(devargs->virtual.drv_name,\n-\t\t\t sizeof(devargs->virtual.drv_name), \"%s\", buf);\n-\t\tif (ret < 0 || ret >= (int)sizeof(devargs->virtual.drv_name))\n+\t\tret = snprintf(devargs->virt.drv_name,\n+\t\t\t sizeof(devargs->virt.drv_name), \"%s\", buf);\n+\t\tif (ret < 0 || ret >= (int)sizeof(devargs->virt.drv_name))\n \t\t\tgoto fail;\n \n \t\tbreak;\n@@ -169,7 +169,7 @@ rte_eal_devargs_dump(FILE *f)\n \t\t\t devargs->args);\n \t\telse if (devargs->type == RTE_DEVTYPE_VIRTUAL)\n \t\t\tfprintf(f, \" VIRTUAL %s %s\\n\",\n-\t\t\t devargs->virtual.drv_name,\n+\t\t\t devargs->virt.drv_name,\n \t\t\t devargs->args);\n \t\telse\n \t\t\tfprintf(f, \" UNKNOWN %s\\n\", devargs->args);\ndiff --git a/lib/librte_eal/common/include/rte_devargs.h b/lib/librte_eal/common/include/rte_devargs.h\nindex 7084ae2..53c59f5 100644\n--- a/lib/librte_eal/common/include/rte_devargs.h\n+++ b/lib/librte_eal/common/include/rte_devargs.h\n@@ -86,7 +86,7 @@ struct rte_devargs {\n \t\tstruct {\n \t\t\t/** Driver name. */\n \t\t\tchar drv_name[32];\n-\t\t} virtual;\n+\t\t} virt;\n \t};\n \t/** Arguments string as given by user or \"\" for no argument. */\n \tchar *args;\n", "prefixes": [ "dpdk-dev" ] }{ "id": 7201, "url": "