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 AC592A04F3 for ; Thu, 19 Dec 2019 15:35:56 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A0AE6330; Thu, 19 Dec 2019 15:35:56 +0100 (CET) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id B41721BDFD for ; Thu, 19 Dec 2019 15:35:55 +0100 (CET) Received: by mail-wr1-f68.google.com with SMTP id c14so6202738wrn.7 for ; Thu, 19 Dec 2019 06:35:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Cw4XBPghvkMXGy7tZ0g7oDSAIi1cTYJ68Bcd97G9aYM=; b=MJ8Wk/WH43gKT9YHQdkNPlsFPUoO+nE6v8TUQTd9GZ5uaCXHTvq0tY4KyDE/6LNpix XvSkp15vz52CxmSVODKRgAIWNG29LzbzlbkuySsMUTDO2rT7lI9atkRp8Wd55cBbRBN0 CKAXxUxZ1yDZS1xVEoO/q8kXfFJnhdkT9Z+mVfDSLbLN2JLShsMGSmVW1lfR5udcknJS /PKSte4lfPcYIsi7nPk+Lf+V9Oa/LDpk6jmUX1MZ8ntGMe4WNXYfPeXwBIc96QmowAhx Rwsueixqecft+76qTZ/1+vaU1HaHPCoi4kdQOVpRi9ceAAwsSn5uoaHeBLJQ4GXivWhE olUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Cw4XBPghvkMXGy7tZ0g7oDSAIi1cTYJ68Bcd97G9aYM=; b=RGDzC6AmoMMOXmgG4Dg2gfcU1Go0TYWKygYvt0t79K25fRXSPqaaCtW5NVYRL0QYpr m1z7O4ucyvUNn1YK6g3gUJlpJrBLJrhHijmWgXdEI4zWA841+3wPBnWE7pMq9VEPqQqj eR1djx9wh8GKajSRCKq2MNGfumsjigE3xKB5ENqvFCzRtRY18jVJyt4ltfNe9JSQXAmz RyMel99L285p/CZL8K+0YgnxE2nRJSq46FrIODi8ssAstVThYcrCO98qXGuHvR77m+lL /FKzPi4mCLff9htpJ3EDnOS4K3r7Ehd5lvXJlEC8auMzN9cqIncqjBU5j5VuievhhSy4 ggdg== X-Gm-Message-State: APjAAAXOHUnzoUQqSoOP3CPod/HcDy8kWWXmBptco3CqO/J8eAwMcBmg lELmqR/dr3+tnp0VE3GA9cMvliRglE8= X-Google-Smtp-Source: APXvYqx8xhmv/igC4MzFFJm+7oaIOvtX68ALTE+TqQRNgxXyOAxKfOtkjipCcMo1ShlTrg6k9ONN7Q== X-Received: by 2002:a5d:6b88:: with SMTP id n8mr10137691wrx.288.1576766155470; Thu, 19 Dec 2019 06:35:55 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id d8sm6473369wre.13.2019.12.19.06.35.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 06:35:54 -0800 (PST) From: luca.boccassi@gmail.com To: Julien Meunier Cc: Akhil Goyal , dpdk stable Date: Thu, 19 Dec 2019 14:32:49 +0000 Message-Id: <20191219143447.21506-22-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191219143447.21506-1-luca.boccassi@gmail.com> References: <20191219143447.21506-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'cryptodev: fix initialization on multi-process' has been queued to LTS release 17.11.10 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 17.11.10 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/21/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. Thanks. Luca Boccassi --- >From ea9e76487f82560c0f7041fd3997dee01d05523c 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 devices") 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/rte_cryptodev.c index c9f2b6235f..ee3a2447ef 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -603,12 +603,14 @@ rte_cryptodev_pmd_allocate(const char *name, int socket_id) cryptodev->data = cryptodev_data; - snprintf(cryptodev->data->name, RTE_CRYPTODEV_NAME_MAX_LEN, - "%s", name); + if (rte_eal_process_type() == RTE_PROC_PRIMARY) { + snprintf(cryptodev->data->name, RTE_CRYPTODEV_NAME_MAX_LEN, + "%s", name); - cryptodev->data->dev_id = dev_id; - cryptodev->data->socket_id = socket_id; - cryptodev->data->dev_started = 0; + cryptodev->data->dev_id = dev_id; + cryptodev->data->socket_id = socket_id; + cryptodev->data->dev_started = 0; + } /* init user callbacks */ TAILQ_INIT(&(cryptodev->link_intr_cbs)); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-12-19 14:32:27.199392859 +0000 +++ 0022-cryptodev-fix-initialization-on-multi-process.patch 2019-12-19 14:32:25.541286641 +0000 @@ -1,8 +1,10 @@ -From 1a60db7f354a52add0c1ea66e55ba7beba1a9716 Mon Sep 17 00:00:00 2001 +From ea9e76487f82560c0f7041fd3997dee01d05523c 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. @@ -10,7 +12,6 @@ initialization. Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto devices") -Cc: stable@dpdk.org Signed-off-by: Julien Meunier Acked-by: Akhil Goyal @@ -19,18 +20,18 @@ 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c -index 43bc335f58..b16ef7b2c1 100644 +index c9f2b6235f..ee3a2447ef 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c -@@ -725,12 +725,14 @@ rte_cryptodev_pmd_allocate(const char *name, int socket_id) +@@ -603,12 +603,14 @@ rte_cryptodev_pmd_allocate(const char *name, int socket_id) - cryptodev->data = *cryptodev_data; + cryptodev->data = cryptodev_data; -- strlcpy(cryptodev->data->name, name, -- RTE_CRYPTODEV_NAME_MAX_LEN); +- snprintf(cryptodev->data->name, RTE_CRYPTODEV_NAME_MAX_LEN, +- "%s", name); + if (rte_eal_process_type() == RTE_PROC_PRIMARY) { -+ strlcpy(cryptodev->data->name, name, -+ RTE_CRYPTODEV_NAME_MAX_LEN); ++ snprintf(cryptodev->data->name, RTE_CRYPTODEV_NAME_MAX_LEN, ++ "%s", name); - cryptodev->data->dev_id = dev_id; - cryptodev->data->socket_id = socket_id;