From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D6EEF41D52 for ; Thu, 23 Feb 2023 16:07:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D205E43259; Thu, 23 Feb 2023 16:07:42 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 3519043257 for ; Thu, 23 Feb 2023 16:07:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677164860; 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=H98J7dWN5lgftw+zovd3+xRHHaikmZTtAEyb29aKpVc=; b=BeT9KpwremzRi4GPNCF7fKnbVaEUqimnx+TzhHGamM1cGooEhqzbbyVQcErhsWVSnP+hbV 0eq5ChH0BGo27QV2PeSLFQueSrSpjwxU6rHhiwRvD9tOPq4PufQxfqKP+fjZ+afBl0tmmp eHn2p6DHwjI7As0EqogdXcjl0mmI2so= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-553-R5XFg3uwOwCaExQKVYbd8A-1; Thu, 23 Feb 2023 10:07:39 -0500 X-MC-Unique: R5XFg3uwOwCaExQKVYbd8A-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 91ECD100F919; Thu, 23 Feb 2023 15:07:38 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id DE08A2166B29; Thu, 23 Feb 2023 15:07:37 +0000 (UTC) From: Kevin Traynor To: Chengwen Feng Cc: Rosen Xu , dpdk stable Subject: patch 'raw/ifpga/base: fix init with multi-process' has been queued to stable release 21.11.4 Date: Thu, 23 Feb 2023 15:05:32 +0000 Message-Id: <20230223150631.723699-41-ktraynor@redhat.com> In-Reply-To: <20230223150631.723699-1-ktraynor@redhat.com> References: <20230223150631.723699-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 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 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 Reviewed-by: Rosen Xu --- 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@dpdk.org @@ -19 +20 @@ -index 1117c3e160..6d48d227d6 100644 +index 11c9887c7f..45efe70473 100644