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 0BBF1A04C3 for ; Fri, 22 Nov 2019 15:42:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F1E8E374; Fri, 22 Nov 2019 15:42:54 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 9E1A31BE84 for ; Fri, 22 Nov 2019 15:42:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574433773; 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=jM806KAo8tg5SfBbR2qx23MiJj0N0kIjSg1/1gZQFuc=; b=QgU6sQofCpmG4HEoGFSLNmiWEDnss6KvUJd3TKyvGxQMc2f4KIdsJdsGhrjpnJeiRBODvL NdQQ4vgmNXTfhIeAuFNQFqEs2CrHvzX9PqiuDcn2NoE+UVvOBbnUFaHu1Hd0lXco3wcgwD XMHS1+g6HKDk/djy8UTSYHEQqHC/fpA= 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-1-lc4hX9QmMa2B_vs_Zufe5w-1; Fri, 22 Nov 2019 09:42:50 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C904F184CAB0; Fri, 22 Nov 2019 14:42:48 +0000 (UTC) Received: from rh.redhat.com (unknown [10.36.118.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB3D66E713; Fri, 22 Nov 2019 14:42:47 +0000 (UTC) From: Kevin Traynor To: Julien Meunier Cc: Akhil Goyal , dpdk stable Date: Fri, 22 Nov 2019 14:41:21 +0000 Message-Id: <20191122144131.21231-35-ktraynor@redhat.com> In-Reply-To: <20191122144131.21231-1-ktraynor@redhat.com> References: <20191122144131.21231-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: lc4hX9QmMa2B_vs_Zufe5w-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'cryptodev: fix initialization on multi-process' 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 11/29/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/8dec9eab6ac4eca67c= b8df2dcdd5a09eaf86bc8e Thanks. Kevin. --- >From 8dec9eab6ac4eca67cb8df2dcdd5a09eaf86bc8e Mon Sep 17 00:00:00 2001 From: Julien Meunier Date: Wed, 7 Aug 2019 11:39:23 +0300 Subject: [PATCH] cryptodev: fix initialization on multi-process [ upstream commit 1a60db7f354a52add0c1ea66e55ba7beba1a9716 ] Primary process is responsible to initialize the data struct of each crypto devices. Secondary process should not override this data during the initialization. Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto dev= ices") Signed-off-by: Julien Meunier Acked-by: Akhil Goyal --- lib/librte_cryptodev/rte_cryptodev.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rt= e_cryptodev.c index ff8520cf7..9c35e6d9c 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -685,10 +685,12 @@ rte_cryptodev_pmd_allocate(const char *name, int sock= et_id) =09=09cryptodev->data =3D cryptodev_data; =20 -=09=09snprintf(cryptodev->data->name, RTE_CRYPTODEV_NAME_MAX_LEN, -=09=09=09=09"%s", name); +=09=09if (rte_eal_process_type() =3D=3D RTE_PROC_PRIMARY) { +=09=09=09snprintf(cryptodev->data->name, RTE_CRYPTODEV_NAME_MAX_LEN, +=09=09=09=09=09"%s", name); =20 -=09=09cryptodev->data->dev_id =3D dev_id; -=09=09cryptodev->data->socket_id =3D socket_id; -=09=09cryptodev->data->dev_started =3D 0; +=09=09=09cryptodev->data->dev_id =3D dev_id; +=09=09=09cryptodev->data->socket_id =3D socket_id; +=09=09=09cryptodev->data->dev_started =3D 0; +=09=09} =20 =09=09/* init user callbacks */ --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-11-22 14:36:57.075638984 +0000 +++ 0035-cryptodev-fix-initialization-on-multi-process.patch=092019-11-22 1= 4:36:55.204149137 +0000 @@ -1 +1 @@ -From 1a60db7f354a52add0c1ea66e55ba7beba1a9716 Mon Sep 17 00:00:00 2001 +From 8dec9eab6ac4eca67cb8df2dcdd5a09eaf86bc8e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 1a60db7f354a52add0c1ea66e55ba7beba1a9716 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index 43bc335f5..b16ef7b2c 100644 +index ff8520cf7..9c35e6d9c 100644 @@ -25,2 +26,2 @@ -@@ -726,10 +726,12 @@ rte_cryptodev_pmd_allocate(const char *name, int soc= ket_id) - =09=09cryptodev->data =3D *cryptodev_data; +@@ -685,10 +685,12 @@ rte_cryptodev_pmd_allocate(const char *name, int soc= ket_id) + =09=09cryptodev->data =3D cryptodev_data; @@ -28,2 +29,2 @@ --=09=09strlcpy(cryptodev->data->name, name, --=09=09=09RTE_CRYPTODEV_NAME_MAX_LEN); +-=09=09snprintf(cryptodev->data->name, RTE_CRYPTODEV_NAME_MAX_LEN, +-=09=09=09=09"%s", name); @@ -31,2 +32,2 @@ -+=09=09=09strlcpy(cryptodev->data->name, name, -+=09=09=09=09RTE_CRYPTODEV_NAME_MAX_LEN); ++=09=09=09snprintf(cryptodev->data->name, RTE_CRYPTODEV_NAME_MAX_LEN, ++=09=09=09=09=09"%s", name);