Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/7202/?format=api
https://patches.dpdk.org/api/patches/7202/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/5606a0f0.9e18190a.7bb4d.44f4@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": "<5606a0f0.9e18190a.7bb4d.44f4@mx.google.com>", "list_archive_url": "https://inbox.dpdk.org/dev/5606a0f0.9e18190a.7bb4d.44f4@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": "b696d57197ab86590c39984be9ceb1455751ac33", "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/5606a0f0.9e18190a.7bb4d.44f4@mx.google.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/7202/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/7202/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 DBDFA594B;\n\tSat, 26 Sep 2015 15:43:14 +0200 (CEST)", "from mail-la0-f45.google.com (mail-la0-f45.google.com\n\t[209.85.215.45]) by dpdk.org (Postfix) with ESMTP id 8D0D15683\n\tfor <dev@dpdk.org>; Sat, 26 Sep 2015 15:43:13 +0200 (CEST)", "by laclj5 with SMTP id lj5so28018913lac.3\n\tfor <dev@dpdk.org>; Sat, 26 Sep 2015 06:43:13 -0700 (PDT)", "from localhost (188-67-107-13.bb.dnainternet.fi. [188.67.107.13])\n\tby smtp.gmail.com with ESMTPSA id\n\t30sm999395lfy.20.2015.09.26.06.43.11 for <dev@dpdk.org>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSat, 26 Sep 2015 06:43:12 -0700 (PDT)", "by localhost (sSMTP sendmail emulation);\n\tSat, 26 Sep 2015 16:43:10 +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=N+VVy94zCY5L5XAqQXH3huP0oEauPlhlGoF6IR9nR+s=;\n\tb=0RcmcBNBUgDqWhN8qkdNEO+09bsmF0PVo4rpsrgSDkvDmJKVsMC2HOD30ituAphVQx\n\t2wnnerZUIVN1EvG1rYyH4BN2wx/umkDymx79ewv8OI0is+SP5ENuGSNUCwxrfzMTlYXK\n\tGb5lXbwMgrhFQCOKFM8scBp6Iuj/yWdSbYw08N99Vc5Pcjs2k0IdtAYDZmCrSD+zMAbX\n\tu6PDG92HBxEZAF19TxrtZMPiX+u55vsbaa+N4eRbq5NnMNFMTHGk5ewNzx+cFkgTFOwY\n\tDYFJ+WsBRHT0/yTnY03pf3WG9D9tj41QmqpvHZgMetiSIiYQdRqhuOnNxGXaMugwZEvZ\n\tG7og==", "X-Received": "by 10.25.16.35 with SMTP id f35mr1986841lfi.1.1443274993205;\n\tSat, 26 Sep 2015 06:43:13 -0700 (PDT)", "Message-ID": "<5606a0f0.9e18190a.7bb4d.44f4@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 app/test/test_devargs.c | 4 ++--\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 4 files changed, 9 insertions(+), 9 deletions(-)", "diff": "diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c\nindex f7fc59c..049f32d 100644\n--- a/app/test/test_devargs.c\n+++ b/app/test/test_devargs.c\n@@ -91,8 +91,8 @@ test_devargs(void)\n \tif (rte_eal_devargs_add(RTE_DEVTYPE_VIRTUAL, \"eth_ring1,k1=val,k2=val2\") < 0)\n \t\tgoto fail;\n \tdevargs = TAILQ_FIRST(&devargs_list);\n-\tif (strncmp(devargs->virtual.drv_name, \"eth_ring1\",\n-\t\t\tsizeof(devargs->virtual.drv_name)) != 0)\n+\tif (strncmp(devargs->virt.drv_name, \"eth_ring1\",\n+\t\t\tsizeof(devargs->virt.drv_name)) != 0)\n \t\tgoto fail;\n \tif (!devargs->args || strcmp(devargs->args, \"k1=val,k2=val2\") != 0)\n \t\tgoto fail;\ndiff --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": 7202, "url": "