patch 'raw/ifpga/base: fix init with multi-process' has been queued to stable release 21.11.4

Kevin Traynor ktraynor at redhat.com
Thu Feb 23 16:05:32 CET 2023


Hi,

FYI, your patch has been queued to stable release 21.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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

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

Thanks.

Kevin

---
>From 13bf4f461a14c299c699157de8c8ce331194f3a5 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen at huawei.com>
Date: Mon, 6 Feb 2023 10:53:11 +0000
Subject: [PATCH] raw/ifpga/base: fix init with multi-process

[ upstream commit e6a2804b77c5fbfd97d0fe05ec7f959a0404a380 ]

The MAP_FAILED should be used to determine whether the mapping is
successful.

Fixes: e41856b515ce ("raw/ifpga/base: enhance driver reliability in multi-process")

Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
Reviewed-by: Rosen Xu <rosen.xu at intel.com>
---
 drivers/raw/ifpga/base/opae_hw_api.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/raw/ifpga/base/opae_hw_api.c b/drivers/raw/ifpga/base/opae_hw_api.c
index 11c9887c7f..45efe70473 100644
--- a/drivers/raw/ifpga/base/opae_hw_api.c
+++ b/drivers/raw/ifpga/base/opae_hw_api.c
@@ -381,5 +381,5 @@ static pthread_mutex_t *opae_adapter_mutex_open(struct opae_adapter *adapter)
 				shm_id, 0);
 		adapter->lock = (pthread_mutex_t *)ptr;
-		if (ptr) {
+		if (ptr != MAP_FAILED) {
 			dev_info(NULL,
 					"shared memory %s address is %p\n",
@@ -500,5 +500,5 @@ static void *opae_adapter_shm_alloc(struct opae_adapter *adapter)
 		adapter->shm.ptr = mmap(NULL, size, PROT_READ | PROT_WRITE,
 							MAP_SHARED, shm_id, 0);
-		if (adapter->shm.ptr) {
+		if (adapter->shm.ptr != MAP_FAILED) {
 			dev_info(NULL,
 					"shared memory %s address is %p\n",
-- 
2.39.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-23 14:46:24.816044049 +0000
+++ 0041-raw-ifpga-base-fix-init-with-multi-process.patch	2023-02-23 14:46:23.762235938 +0000
@@ -1 +1 @@
-From e6a2804b77c5fbfd97d0fe05ec7f959a0404a380 Mon Sep 17 00:00:00 2001
+From 13bf4f461a14c299c699157de8c8ce331194f3a5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e6a2804b77c5fbfd97d0fe05ec7f959a0404a380 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 1117c3e160..6d48d227d6 100644
+index 11c9887c7f..45efe70473 100644



More information about the stable mailing list