Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/58661/?format=api
http://patchwork.dpdk.org/api/patches/58661/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20190905145315.19395-7-ferruh.yigit@intel.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20190905145315.19395-7-ferruh.yigit@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190905145315.19395-7-ferruh.yigit@intel.com", "date": "2019-09-05T14:53:11", "name": "[06/10] crypto/virtio: fix global variable multiple definitions", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "c827176553aa80825ce540bddb2c10627ef43cf3", "submitter": { "id": 324, "url": "http://patchwork.dpdk.org/api/people/324/?format=api", "name": "Ferruh Yigit", "email": "ferruh.yigit@intel.com" }, "delegate": { "id": 24651, "url": "http://patchwork.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20190905145315.19395-7-ferruh.yigit@intel.com/mbox/", "series": [ { "id": 6259, "url": "http://patchwork.dpdk.org/api/series/6259/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=6259", "date": "2019-09-05T14:53:05", "name": "fix global variable multiple definitions", "version": 1, "mbox": "http://patchwork.dpdk.org/series/6259/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/58661/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/58661/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 A09C01F015;\n\tThu, 5 Sep 2019 16:53:38 +0200 (CEST)", "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n\tby dpdk.org (Postfix) with ESMTP id E10441EFBD;\n\tThu, 5 Sep 2019 16:53:28 +0200 (CEST)", "from fmsmga008.fm.intel.com ([10.253.24.58])\n\tby fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t05 Sep 2019 07:53:28 -0700", "from silpixa00399752.ir.intel.com (HELO\n\tsilpixa00399752.ger.corp.intel.com) ([10.237.223.78])\n\tby fmsmga008.fm.intel.com with ESMTP; 05 Sep 2019 07:53:27 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.64,470,1559545200\"; d=\"scan'208\";a=\"182846370\"", "From": "Ferruh Yigit <ferruh.yigit@intel.com>", "To": "Jay Zhou <jianjay.zhou@huawei.com>", "Cc": "dev@dpdk.org, stable@dpdk.org,\n\tMaxime Coquelin <maxime.coquelin@redhat.com>", "Date": "Thu, 5 Sep 2019 15:53:11 +0100", "Message-Id": "<20190905145315.19395-7-ferruh.yigit@intel.com>", "X-Mailer": "git-send-email 2.21.0", "In-Reply-To": "<20190905145315.19395-1-ferruh.yigit@intel.com>", "References": "<20190905145315.19395-1-ferruh.yigit@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH 06/10] crypto/virtio: fix global variable\n\tmultiple definitions", "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": "'virtio_hw_internal' global variable is defined in both 'crypto/virtio'\nand 'net/virtio' PMDs. This means they share same storage when\napplication linked with static DPDK library, which is not the intention.\n\nFixing by adding 'crypto_' prefix to the 'crypto/virtio' driver.\n\nIssue has been detected by '-fno-common' gcc flag.\n\nFixes: 25500d4b8076 (\"crypto/virtio: support device init\")\nCc: stable@dpdk.org\n\nSigned-off-by: Ferruh Yigit <ferruh.yigit@intel.com>\n---\nCc: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n drivers/crypto/virtio/virtio_pci.c | 4 ++--\n drivers/crypto/virtio/virtio_pci.h | 6 +++---\n 2 files changed, 5 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/crypto/virtio/virtio_pci.c b/drivers/crypto/virtio/virtio_pci.c\nindex 8137b3c5a..f490f6e28 100644\n--- a/drivers/crypto/virtio/virtio_pci.c\n+++ b/drivers/crypto/virtio/virtio_pci.c\n@@ -31,7 +31,7 @@\n #define VIRTIO_PCI_CONFIG(hw) \\\n \t\t(((hw)->use_msix == VIRTIO_MSIX_ENABLED) ? 24 : 20)\n \n-struct virtio_hw_internal virtio_hw_internal[RTE_MAX_VIRTIO_CRYPTO];\n+struct virtio_hw_internal crypto_virtio_hw_internal[RTE_MAX_VIRTIO_CRYPTO];\n \n static inline int\n check_vq_phys_addr_ok(struct virtqueue *vq)\n@@ -452,7 +452,7 @@ vtpci_cryptodev_init(struct rte_pci_device *dev, struct virtio_crypto_hw *hw)\n \t */\n \tif (virtio_read_caps(dev, hw) == 0) {\n \t\tVIRTIO_CRYPTO_INIT_LOG_INFO(\"modern virtio pci detected.\");\n-\t\tvirtio_hw_internal[hw->dev_id].vtpci_ops =\n+\t\tcrypto_virtio_hw_internal[hw->dev_id].vtpci_ops =\n \t\t\t\t\t&virtio_crypto_modern_ops;\n \t\thw->modern = 1;\n \t\treturn 0;\ndiff --git a/drivers/crypto/virtio/virtio_pci.h b/drivers/crypto/virtio/virtio_pci.h\nindex 604ec3662..d9a214dfd 100644\n--- a/drivers/crypto/virtio/virtio_pci.h\n+++ b/drivers/crypto/virtio/virtio_pci.h\n@@ -201,10 +201,10 @@ struct virtio_hw_internal {\n \tstruct rte_pci_ioport io;\n };\n \n-#define VTPCI_OPS(hw)\t(virtio_hw_internal[(hw)->dev_id].vtpci_ops)\n-#define VTPCI_IO(hw)\t(&virtio_hw_internal[(hw)->dev_id].io)\n+#define VTPCI_OPS(hw)\t(crypto_virtio_hw_internal[(hw)->dev_id].vtpci_ops)\n+#define VTPCI_IO(hw)\t(&crypto_virtio_hw_internal[(hw)->dev_id].io)\n \n-extern struct virtio_hw_internal virtio_hw_internal[RTE_MAX_VIRTIO_CRYPTO];\n+extern struct virtio_hw_internal crypto_virtio_hw_internal[RTE_MAX_VIRTIO_CRYPTO];\n \n /*\n * How many bits to shift physical queue address written to QUEUE_PFN.\n", "prefixes": [ "06/10" ] }{ "id": 58661, "url": "