[dpdk-stable] patch 'crypto/virtio: fix global variable multiple definitions' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Tue Dec 10 15:58:51 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/16/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/ca40546d47069f5e7edff31c2ecbf5797975fd49

Thanks.

Kevin.

---
>From ca40546d47069f5e7edff31c2ecbf5797975fd49 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit at intel.com>
Date: Thu, 5 Sep 2019 15:53:11 +0100
Subject: [PATCH] crypto/virtio: fix global variable multiple definitions

[ upstream commit 2c4496446168b1c97b148f146af4e8c5856f3364 ]

'virtio_hw_internal' global variable is defined in both 'crypto/virtio'
and 'net/virtio' PMDs. This means they share same storage when
application linked with static DPDK library, which is not the intention.

Fixing by adding 'crypto_' prefix to the 'crypto/virtio' driver.

Issue has been detected by '-fno-common' gcc flag.

Fixes: 25500d4b8076 ("crypto/virtio: support device init")

Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 drivers/crypto/virtio/virtio_pci.c | 4 ++--
 drivers/crypto/virtio/virtio_pci.h | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/crypto/virtio/virtio_pci.c b/drivers/crypto/virtio/virtio_pci.c
index e24ccb607..2e45722f9 100644
--- a/drivers/crypto/virtio/virtio_pci.c
+++ b/drivers/crypto/virtio/virtio_pci.c
@@ -32,5 +32,5 @@
 		(((hw)->use_msix == VIRTIO_MSIX_ENABLED) ? 24 : 20)
 
-struct virtio_hw_internal virtio_hw_internal[RTE_MAX_VIRTIO_CRYPTO];
+struct virtio_hw_internal crypto_virtio_hw_internal[RTE_MAX_VIRTIO_CRYPTO];
 
 static inline int
@@ -453,5 +453,5 @@ vtpci_cryptodev_init(struct rte_pci_device *dev, struct virtio_crypto_hw *hw)
 	if (virtio_read_caps(dev, hw) == 0) {
 		VIRTIO_CRYPTO_INIT_LOG_INFO("modern virtio pci detected.");
-		virtio_hw_internal[hw->dev_id].vtpci_ops =
+		crypto_virtio_hw_internal[hw->dev_id].vtpci_ops =
 					&virtio_crypto_modern_ops;
 		hw->modern = 1;
diff --git a/drivers/crypto/virtio/virtio_pci.h b/drivers/crypto/virtio/virtio_pci.h
index 604ec3662..d9a214dfd 100644
--- a/drivers/crypto/virtio/virtio_pci.h
+++ b/drivers/crypto/virtio/virtio_pci.h
@@ -202,8 +202,8 @@ struct virtio_hw_internal {
 };
 
-#define VTPCI_OPS(hw)	(virtio_hw_internal[(hw)->dev_id].vtpci_ops)
-#define VTPCI_IO(hw)	(&virtio_hw_internal[(hw)->dev_id].io)
+#define VTPCI_OPS(hw)	(crypto_virtio_hw_internal[(hw)->dev_id].vtpci_ops)
+#define VTPCI_IO(hw)	(&crypto_virtio_hw_internal[(hw)->dev_id].io)
 
-extern struct virtio_hw_internal virtio_hw_internal[RTE_MAX_VIRTIO_CRYPTO];
+extern struct virtio_hw_internal crypto_virtio_hw_internal[RTE_MAX_VIRTIO_CRYPTO];
 
 /*
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-10 14:49:40.233685143 +0000
+++ 0017-crypto-virtio-fix-global-variable-multiple-definitio.patch	2019-12-10 14:49:39.006458625 +0000
@@ -1 +1 @@
-From 2c4496446168b1c97b148f146af4e8c5856f3364 Mon Sep 17 00:00:00 2001
+From ca40546d47069f5e7edff31c2ecbf5797975fd49 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2c4496446168b1c97b148f146af4e8c5856f3364 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index 8137b3c5a..f490f6e28 100644
+index e24ccb607..2e45722f9 100644



More information about the stable mailing list