patch 'net/i40e: fix build with MinGW GCC 12' has been queued to stable release 21.11.3

Kevin Traynor ktraynor at redhat.com
Tue Oct 25 17:07:25 CEST 2022


Hi,

FYI, your patch has been queued to stable release 21.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 11/01/22. 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/9ba87edbe69cac90bf8aff9714e3724519c633bf

Thanks.

Kevin

---
>From 9ba87edbe69cac90bf8aff9714e3724519c633bf Mon Sep 17 00:00:00 2001
From: Amit Prakash Shukla <amitprakashs at marvell.com>
Date: Wed, 24 Aug 2022 19:33:38 +0530
Subject: [PATCH] net/i40e: fix build with MinGW GCC 12
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit eb440cea1e05245f362ec7fca932f2d977f12359 ]

When compiling with MinGW GCC 12,
the rte_flow_item array is seen as read out of bound:

net/i40e/i40e_hash.c:389:47: error:
    array subscript 50 is above array bounds of ‘const uint64_t[50]’
    {aka ‘const long long unsigned int[50]’} [-Werror=array-bounds]
    389 | item_hdr = pattern_item_header[last_item_type];
        |            ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~

It seems the assert check done above this line has no impact.
A real check is added to make the compiler happy.

Fixes: ef4c16fd9148 ("net/i40e: refactor RSS flow")

Signed-off-by: Amit Prakash Shukla <amitprakashs at marvell.com>
Acked-by: Thomas Monjalon <thomas at monjalon.net>
---
 drivers/net/i40e/i40e_hash.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_hash.c b/drivers/net/i40e/i40e_hash.c
index 8962e9d97a..a1ff85fceb 100644
--- a/drivers/net/i40e/i40e_hash.c
+++ b/drivers/net/i40e/i40e_hash.c
@@ -385,6 +385,8 @@ i40e_hash_get_pattern_type(const struct rte_flow_item pattern[],
 
 		prev_item_type = last_item_type;
-		assert(last_item_type < (enum rte_flow_item_type)
-				RTE_DIM(pattern_item_header));
+		if (last_item_type >= (enum rte_flow_item_type)
+				RTE_DIM(pattern_item_header))
+			goto not_sup;
+
 		item_hdr = pattern_item_header[last_item_type];
 		assert(item_hdr);
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.575625743 +0100
+++ 0090-net-i40e-fix-build-with-MinGW-GCC-12.patch	2022-10-25 14:18:58.532798524 +0100
@@ -1 +1 @@
-From eb440cea1e05245f362ec7fca932f2d977f12359 Mon Sep 17 00:00:00 2001
+From 9ba87edbe69cac90bf8aff9714e3724519c633bf Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit eb440cea1e05245f362ec7fca932f2d977f12359 ]
+
@@ -22 +23,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list