From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id BA51DA05D3 for ; Thu, 25 Apr 2019 17:42:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A10F51B5FD; Thu, 25 Apr 2019 17:42:00 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 1E8B71B602 for ; Thu, 25 Apr 2019 17:41:59 +0200 (CEST) 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 mx1.redhat.com (Postfix) with ESMTPS id 87F5D3199361; Thu, 25 Apr 2019 15:41:58 +0000 (UTC) Received: from rh.redhat.com (unknown [10.36.116.255]) by smtp.corp.redhat.com (Postfix) with ESMTP id A35F35D9C6; Thu, 25 Apr 2019 15:41:57 +0000 (UTC) From: Kevin Traynor To: Shreyansh Jain Cc: dpdk stable Date: Thu, 25 Apr 2019 16:40:24 +0100 Message-Id: <20190425154037.28778-49-ktraynor@redhat.com> In-Reply-To: <20190425154037.28778-1-ktraynor@redhat.com> References: <20190425154037.28778-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Thu, 25 Apr 2019 15:41:58 +0000 (UTC) Subject: [dpdk-stable] patch 'raw/dpaa2_qdma: fix to support multiprocess execution' has been queued to LTS release 18.11.2 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.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/01/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 can be viewed on the 18.11 branch at: https://github.com/kevintraynor/dpdk-stable-queue.git Thanks. Kevin Traynor --- >From 09b9e2c56e7bca445e56eed98271db116a85c3e6 Mon Sep 17 00:00:00 2001 From: Shreyansh Jain Date: Thu, 4 Apr 2019 11:50:21 +0000 Subject: [PATCH] raw/dpaa2_qdma: fix to support multiprocess execution [ upstream commit 428fe6d4cb35f35d61d28bdaa0e87e8104691d87 ] Fixes: c22fab9a6c34 ("raw/dpaa2_qdma: support configuration APIs") Signed-off-by: Shreyansh Jain --- drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c index 60621eb85..f8a1b0c40 100644 --- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c +++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c @@ -1,4 +1,4 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright 2018 NXP + * Copyright 2018-2019 NXP */ @@ -220,4 +220,5 @@ rte_qdma_configure(struct rte_qdma_config *qdma_config) { int ret; + char fle_pool_name[32]; /* RTE_MEMZONE_NAMESIZE = 32 */ DPAA2_QDMA_FUNC_TRACE(); @@ -259,6 +260,10 @@ rte_qdma_configure(struct rte_qdma_config *qdma_config) qdma_dev.max_vqs = qdma_config->max_vqs; - /* Allocate FLE pool */ - qdma_dev.fle_pool = rte_mempool_create("qdma_fle_pool", + /* Allocate FLE pool; just append PID so that in case of + * multiprocess, the pool's don't collide. + */ + snprintf(fle_pool_name, sizeof(fle_pool_name), "qdma_fle_pool%u", + getpid()); + qdma_dev.fle_pool = rte_mempool_create(fle_pool_name, qdma_config->fle_pool_count, QDMA_FLE_POOL_SIZE, QDMA_FLE_CACHE_SIZE(qdma_config->fle_pool_count), 0, @@ -304,4 +309,5 @@ rte_qdma_vq_create(uint32_t lcore_id, uint32_t flags) if (i == qdma_dev.max_vqs) { rte_spinlock_unlock(&qdma_dev.lock); + DPAA2_QDMA_ERR("Unable to get lock on QDMA device"); return -ENODEV; } @@ -794,7 +800,4 @@ dpaa2_dpdmai_dev_uninit(struct rte_rawdev *rawdev) DPAA2_QDMA_FUNC_TRACE(); - if (rte_eal_process_type() != RTE_PROC_PRIMARY) - return 0; - /* Remove HW queues from global list */ remove_hw_queues_from_list(dpdmai_dev); @@ -835,8 +838,4 @@ dpaa2_dpdmai_dev_init(struct rte_rawdev *rawdev, int dpdmai_id) DPAA2_QDMA_FUNC_TRACE(); - /* For secondary processes, the primary has done all the work */ - if (rte_eal_process_type() != RTE_PROC_PRIMARY) - return 0; - /* Open DPDMAI device */ dpdmai_dev->dpdmai_id = dpdmai_id; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-04-25 16:37:48.864421389 +0100 +++ 0049-raw-dpaa2_qdma-fix-to-support-multiprocess-execution.patch 2019-04-25 16:37:46.767294446 +0100 @@ -1 +1 @@ -From 428fe6d4cb35f35d61d28bdaa0e87e8104691d87 Mon Sep 17 00:00:00 2001 +From 09b9e2c56e7bca445e56eed98271db116a85c3e6 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 428fe6d4cb35f35d61d28bdaa0e87e8104691d87 ] + @@ -7 +8,0 @@ -Cc: stable@dpdk.org @@ -15 +16 @@ -index afa5e5a3d..88c11a3d2 100644 +index 60621eb85..f8a1b0c40 100644