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

[ upstream commit ea153cc853049c6f935693e48d2866782370a3fe ]

Can be reproduced with "make EXTRA_CFLAGS='-O1'" command using
gcc 7.3.0

Build error
In file included from .../drivers/event/octeontx2/ot
x2_evdev.c:15:0:
.../drivers/event/octeontx2/otx2_evdev_stats.h:
    In function ‘otx2_sso_xstats_get’:
.../drivers/event/octeontx2/otx2_evdev_stats.h:124:9:
    error: ‘xstats’ may be used uninitialized in this function
           [-Werror=maybe-uninitialized]
   xstat = &xstats[ids[i] - start_offset];
   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is false positive, 'xstats_mode_count' should be preventing taking
the loop and accessing 'xstats'.
Returning in that case to silence the compiler warning.

Reported-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
Acked-by: Jerin Jacob <jerinj at marvell.com>
---
 drivers/event/octeontx2/otx2_evdev_stats.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/event/octeontx2/otx2_evdev_stats.h b/drivers/event/octeontx2/otx2_evdev_stats.h
index 9d7c694ee6..74fcec8a07 100644
--- a/drivers/event/octeontx2/otx2_evdev_stats.h
+++ b/drivers/event/octeontx2/otx2_evdev_stats.h
@@ -67,7 +67,7 @@ otx2_sso_xstats_get(const struct rte_eventdev *event_dev,
 
 	switch (mode) {
 	case RTE_EVENT_DEV_XSTATS_DEVICE:
-		break;
+		return 0;
 	case RTE_EVENT_DEV_XSTATS_PORT:
 		if (queue_port_id >= (signed int)dev->nb_event_ports)
 			goto invalid_value;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.493924246 +0100
+++ 0171-event-octeontx2-fix-build-for-O1-optimization.patch	2020-05-19 14:04:44.512653738 +0100
@@ -1,4 +1,4 @@
-From ea153cc853049c6f935693e48d2866782370a3fe Mon Sep 17 00:00:00 2001
+From a009c7667f92df63260908faa5891eb862b54cbd Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit at intel.com>
 Date: Mon, 11 May 2020 17:07:25 +0100
 Subject: [PATCH] event/octeontx2: fix build for O1 optimization
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit ea153cc853049c6f935693e48d2866782370a3fe ]
+
 Can be reproduced with "make EXTRA_CFLAGS='-O1'" command using
 gcc 7.3.0
 


More information about the stable mailing list