[dpdk-stable] patch 'mempool/octeontx2: fix build for gcc O1 optimization' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 19 15:05:04 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.3

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/21/20. 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 c6f6f3d8e13cd78421fd7803599483ec6c59eaac Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit at intel.com>
Date: Mon, 11 May 2020 17:07:23 +0100
Subject: [PATCH] mempool/octeontx2: fix build for gcc O1 optimization
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 0403b233ee4fd4857808fcc811054bc9109feb97 ]

Can be reproduced with "make EXTRA_CFLAGS='-O1'" command using
gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)

Build error:
In file included from .../drivers/mempool/octeontx2/otx2_mempool.h:13,
                from .../drivers/mempool/octeontx2/otx2_mempool_ops.c:8:
.../drivers/mempool/octeontx2/otx2_mempool_ops.c:
	In function ‘otx2_npa_alloc’:
.../drivers/common/octeontx2/otx2_common.h:94:2:
    error: ‘aura_handle’ may be used uninitialized in this function
           [-Werror=maybe-uninitialized]
   94 |  rte_log(RTE_LOG_DEBUG, otx2_logtype_ ## subsystem,  \
      |  ^~~~~~~
.../drivers/mempool/octeontx2/otx2_mempool_ops.c:643:11:
    note: ‘aura_handle’ was declared here
  643 |  uint64_t aura_handle;
      |           ^~~~~~~~~~~

This looks like false positive, assigning an initial value to
'aura_handle' to fix the build error.

Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
Acked-by: Jerin Jacob <jerinj at marvell.com>
---
 drivers/mempool/octeontx2/otx2_mempool_ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mempool/octeontx2/otx2_mempool_ops.c b/drivers/mempool/octeontx2/otx2_mempool_ops.c
index ea4b1c45d2..18bdb0b4c4 100644
--- a/drivers/mempool/octeontx2/otx2_mempool_ops.c
+++ b/drivers/mempool/octeontx2/otx2_mempool_ops.c
@@ -637,10 +637,10 @@ static int
 otx2_npa_alloc(struct rte_mempool *mp)
 {
 	uint32_t block_size, block_count;
+	uint64_t aura_handle = 0;
 	struct otx2_npa_lf *lf;
 	struct npa_aura_s aura;
 	struct npa_pool_s pool;
-	uint64_t aura_handle;
 	int rc;
 
 	lf = otx2_npa_lf_obj_get();
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.400660538 +0100
+++ 0169-mempool-octeontx2-fix-build-for-gcc-O1-optimization.patch	2020-05-19 14:04:44.512653738 +0100
@@ -1,4 +1,4 @@
-From 0403b233ee4fd4857808fcc811054bc9109feb97 Mon Sep 17 00:00:00 2001
+From c6f6f3d8e13cd78421fd7803599483ec6c59eaac Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit at intel.com>
 Date: Mon, 11 May 2020 17:07:23 +0100
 Subject: [PATCH] mempool/octeontx2: fix build for gcc O1 optimization
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 0403b233ee4fd4857808fcc811054bc9109feb97 ]
+
 Can be reproduced with "make EXTRA_CFLAGS='-O1'" command using
 gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)
 
@@ -34,7 +36,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/mempool/octeontx2/otx2_mempool_ops.c b/drivers/mempool/octeontx2/otx2_mempool_ops.c
-index 162b7f01da..a14c9c5e94 100644
+index ea4b1c45d2..18bdb0b4c4 100644
 --- a/drivers/mempool/octeontx2/otx2_mempool_ops.c
 +++ b/drivers/mempool/octeontx2/otx2_mempool_ops.c
 @@ -637,10 +637,10 @@ static int
@@ -46,9 +48,9 @@
  	struct npa_aura_s aura;
  	struct npa_pool_s pool;
 -	uint64_t aura_handle;
- 	size_t padding;
  	int rc;
  
+ 	lf = otx2_npa_lf_obj_get();
 -- 
 2.20.1
 


More information about the stable mailing list