From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 35C25A04F0 for ; Tue, 10 Dec 2019 16:00:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2DF4F1B13C; Tue, 10 Dec 2019 16:00:32 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 4B1771BE9E for ; Tue, 10 Dec 2019 16:00:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575990030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yUT6DvuVvd+bJ1Coch2lLLPEF2DvGpkP4nr+WOk0o3g=; b=HGVPVde63rLSTg8CHbQBTy2f4xarR+kPTKxcaUQ7qTsdtUd10zA85lhZHO+wa4F/Z4/2TJ Ph66b8CK4qkV8DMggYdLXUvnjb3MYKmz3xT2rQDvLOiXSzsrhDLiBCjJqyQi10IeldPT2K 18O5mzYH+wZG2mEpmglPP4KRbaGNl2w= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-94-1_L9A4OPMbSJVLWMVpK8Yw-1; Tue, 10 Dec 2019 10:00:27 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B8D32107ACC4; Tue, 10 Dec 2019 15:00:26 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-64.ams2.redhat.com [10.36.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id C34EA5D9C5; Tue, 10 Dec 2019 15:00:25 +0000 (UTC) From: Kevin Traynor To: Ferruh Yigit Cc: dpdk stable Date: Tue, 10 Dec 2019 14:58:51 +0000 Message-Id: <20191210145937.32755-17-ktraynor@redhat.com> In-Reply-To: <20191210145937.32755-1-ktraynor@redhat.com> References: <20191210145937.32755-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: 1_L9A4OPMbSJVLWMVpK8Yw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'crypto/virtio: fix global variable multiple definitions' has been queued to LTS release 18.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 rebasi= ng (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/ca40546d47069f5e7e= dff31c2ecbf5797975fd49 Thanks. Kevin. --- >From ca40546d47069f5e7edff31c2ecbf5797975fd49 Mon Sep 17 00:00:00 2001 From: Ferruh Yigit 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 --- 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/vir= tio_pci.c index e24ccb607..2e45722f9 100644 --- a/drivers/crypto/virtio/virtio_pci.c +++ b/drivers/crypto/virtio/virtio_pci.c @@ -32,5 +32,5 @@ =09=09(((hw)->use_msix =3D=3D VIRTIO_MSIX_ENABLED) ? 24 : 20) =20 -struct virtio_hw_internal virtio_hw_internal[RTE_MAX_VIRTIO_CRYPTO]; +struct virtio_hw_internal crypto_virtio_hw_internal[RTE_MAX_VIRTIO_CRYPTO]= ; =20 static inline int @@ -453,5 +453,5 @@ vtpci_cryptodev_init(struct rte_pci_device *dev, struct= virtio_crypto_hw *hw) =09if (virtio_read_caps(dev, hw) =3D=3D 0) { =09=09VIRTIO_CRYPTO_INIT_LOG_INFO("modern virtio pci detected."); -=09=09virtio_hw_internal[hw->dev_id].vtpci_ops =3D +=09=09crypto_virtio_hw_internal[hw->dev_id].vtpci_ops =3D =09=09=09=09=09&virtio_crypto_modern_ops; =09=09hw->modern =3D 1; diff --git a/drivers/crypto/virtio/virtio_pci.h b/drivers/crypto/virtio/vir= tio_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 { }; =20 -#define VTPCI_OPS(hw)=09(virtio_hw_internal[(hw)->dev_id].vtpci_ops) -#define VTPCI_IO(hw)=09(&virtio_hw_internal[(hw)->dev_id].io) +#define VTPCI_OPS(hw)=09(crypto_virtio_hw_internal[(hw)->dev_id].vtpci_ops= ) +#define VTPCI_IO(hw)=09(&crypto_virtio_hw_internal[(hw)->dev_id].io) =20 -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]; =20 /* --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-10 14:49:40.233685143 +0000 +++ 0017-crypto-virtio-fix-global-variable-multiple-definitio.patch=092019-= 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@dpdk.org @@ -24 +25 @@ -index 8137b3c5a..f490f6e28 100644 +index e24ccb607..2e45722f9 100644