代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/dpdk 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 9ba87edbe69cac90bf8aff9714e3724519c633bf Mon Sep 17 00:00:00 2001
From: Amit Prakash Shukla <amitprakashs@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@marvell.com>
Acked-by: Thomas Monjalon <thomas@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
@@ -384,8 +384,10 @@ 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.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。