From patchwork Tue Aug 23 10:57:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Prakash Shukla X-Patchwork-Id: 115358 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 86AADA0093; Tue, 23 Aug 2022 12:57:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 34D21406A2; Tue, 23 Aug 2022 12:57:57 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id A7839400D6; Tue, 23 Aug 2022 12:57:55 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27NAIJcj025034; Tue, 23 Aug 2022 03:57:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=iRhuMeED5SHTTcbJ27qmgUfW5j/td51VslfcG0ZS+kI=; b=Wo7rgh4uNsMbxjNQNuIirvAeghQcX96lb0NwQnk070ilmFll9vtFagUEES7NRAknYqoC T/Aeqc2zxzJwRE2bVYtNwSm8bMYWipyOhnaSlwjFo1RVpNHqRNUu5SDGzs8AlxIj/1mR 5LcjNqjvs8Jt4y50bkyxbqaXmb5FEoeXyVzIAgTesnUo+cxpR9nnZwr5xucyoAaHMCkW 9hLOZeBhI3wG8/iZo5McT7AlaGlInsLkq2mBvPwdHmkqQuPilJBZj8x6NTrMrqBebKyn M4tA7hL6OKjhkCUn68EOe0ixsg68vO3/fYEo3CnTGr08264jm7CCKGPKvRkSIN4njbTW tg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3j4ubj8hm5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 23 Aug 2022 03:57:54 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 23 Aug 2022 03:57:53 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Tue, 23 Aug 2022 03:57:53 -0700 Received: from localhost.localdomain (unknown [10.28.36.157]) by maili.marvell.com (Postfix) with ESMTP id 1184A5B6929; Tue, 23 Aug 2022 03:57:50 -0700 (PDT) From: Amit Prakash Shukla To: Yuying Zhang , Beilei Xing CC: , , Amit Prakash Shukla , Subject: [PATCH 1/3] net/i40e: compilation fix for GCC-12 Date: Tue, 23 Aug 2022 16:27:40 +0530 Message-ID: <20220823105742.2276506-1-amitprakashs@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Proofpoint-GUID: VFj7oaSLdTK2HgNdiJuhKim3Xd3OcOAb X-Proofpoint-ORIG-GUID: VFj7oaSLdTK2HgNdiJuhKim3Xd3OcOAb X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-23_04,2022-08-22_02,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org GCC 12 raises the following warning: meson --werror --buildtype=debugoptimized --cross-file config/x86/cross-mingw -Dexamples=helloworld build ninja -C build In function 'i40e_hash_get_pattern_type', inlined from 'i40e_hash_get_pattern_pctypes' at ../drivers/net/i40e/i40e_hash.c:520:8, inlined from 'i40e_hash_parse_pattern_act' at ../drivers/net/i40e/i40e_hash.c:1147:9, inlined from 'i40e_hash_parse' at ../drivers/net/i40e/i40e_hash.c:1181:9: ../drivers/net/i40e/i40e_hash.c:389:47: error: array subscript 53 is above array bounds of 'const uint64_t[53]' {aka 'const long long unsigned int[53]'} [-Werror=array-bounds] 389 | item_hdr = pattern_item_header[last_item_type]; | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ ../drivers/net/i40e/i40e_hash.c: In function 'i40e_hash_parse': ../drivers/net/i40e/i40e_hash.c:182:23: note: while referencing 'pattern_item_header' 182 | static const uint64_t pattern_item_header[] = { | ^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Fixes: ef4c16fd9148 (net/i40e: refactor RSS flow) Cc: stable@dpdk.org Signed-off-by: Amit Prakash Shukla --- 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); From patchwork Tue Aug 23 10:57:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Prakash Shukla X-Patchwork-Id: 115359 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 58615A0093; Tue, 23 Aug 2022 12:58:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4BB58427F1; Tue, 23 Aug 2022 12:58:14 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id B0E74410DD; Tue, 23 Aug 2022 12:58:12 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27NAI9Ef008729; Tue, 23 Aug 2022 03:58:12 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=4spMDAA0NciYjitWukMDTfWo4co/mzB97oyvGRTWVL0=; b=FaI36vJ58ftzSo236UDH3mkeKZS3FxBRUm7D3/fdh0X+owBZ0dLWaIQtSEAiSEmFs8qm WtwngmAeVyyT0I/r1iSx1KBmjCmZM0dhkFcMynsuav6nQXb+XnbN0HHDJKygQE3rIQMn uhG6bqDUpXKucwD4cki9hRJ0uVgMe4i8rRs4r9cGvrtEMxf7sD0Ua/WgzjNyFOrfDWbs 5v/BcLFNOZzKZQ4alJGz4ICK/UTn9lFVpkGZX8TNwFd1v1DWmI1KQfjNgUFLHDx+K6Qf lqqjV4bg7mRd60e8EVGJdMi05NTVvb6ehXauYE+b4UtfNi/9VHjPhf2uFUAswkwv1atS Gg== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3j2y4k32ur-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 23 Aug 2022 03:58:12 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 23 Aug 2022 03:58:09 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Tue, 23 Aug 2022 03:58:09 -0700 Received: from localhost.localdomain (unknown [10.28.36.157]) by maili.marvell.com (Postfix) with ESMTP id E431C5B692A; Tue, 23 Aug 2022 03:58:07 -0700 (PDT) From: Amit Prakash Shukla To: Rasesh Mody , Devendra Singh Rawat CC: , , Amit Prakash Shukla , Subject: [PATCH 2/3] net/qede/base: compilation fix for GCC-12 Date: Tue, 23 Aug 2022 16:27:41 +0530 Message-ID: <20220823105742.2276506-2-amitprakashs@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220823105742.2276506-1-amitprakashs@marvell.com> References: <20220823105742.2276506-1-amitprakashs@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: v2OBc8FMcWi97oFcufeB8cjI2HHwQNPP X-Proofpoint-ORIG-GUID: v2OBc8FMcWi97oFcufeB8cjI2HHwQNPP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-23_04,2022-08-22_02,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org GCC 12 raises the following warning: ../drivers/net/qede/base/ecore_init_fw_funcs.c: In function 'ecore_dmae_to_grc.constprop.isra': ../drivers/net/qede/base/ecore_init_fw_funcs.c:1418:25: error: array subscript 1 is outside array bounds of 'u32[1]' {aka 'unsigned int[1]'} [-Werror=array-bounds] 1418 | ecore_wr(dev, ptt, ((addr) + (4 * i)), \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1419 | ((u32 *)&(arr))[i]); \ | ~~~~~~~~~~~~~~~~~~~ ../drivers/net/qede/base/ecore_init_fw_funcs.c:1465:17: note: in expansion of macro 'ARR_REG_WR' 1465 | ARR_REG_WR(p_hwfn, p_ptt, addr, pData, len_in_dwords); | ^~~~~~~~~~ ../drivers/net/qede/base/ecore_init_fw_funcs.c:1439:35: note: at offset 4 into object 'pData' of size 4 1439 | u32 *pData, | ~~~~~^~~~~ cc1: all warnings being treated as errors Fixes: 3b307c55f2ac (net/qede/base: update FW to 8.40.25.0) Cc: stable@dpdk.org Signed-off-by: Amit Prakash Shukla --- drivers/net/qede/base/ecore_init_fw_funcs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/qede/base/ecore_init_fw_funcs.c b/drivers/net/qede/base/ecore_init_fw_funcs.c index 6a52f32cc9..4e4d1dc374 100644 --- a/drivers/net/qede/base/ecore_init_fw_funcs.c +++ b/drivers/net/qede/base/ecore_init_fw_funcs.c @@ -1416,7 +1416,7 @@ void ecore_init_brb_ram(struct ecore_hwfn *p_hwfn, u32 i; \ for (i = 0; i < (arr_size); i++) \ ecore_wr(dev, ptt, ((addr) + (4 * i)), \ - ((u32 *)&(arr))[i]); \ + ((u32 *)(arr))[i]); \ } while (0) #ifndef DWORDS_TO_BYTES From patchwork Tue Aug 23 10:57:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Prakash Shukla X-Patchwork-Id: 115360 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 950A3A0093; Tue, 23 Aug 2022 12:58:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8A0D5427F4; Tue, 23 Aug 2022 12:58:35 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 2908540DFD; Tue, 23 Aug 2022 12:58:33 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27NAIWpN025507; Tue, 23 Aug 2022 03:58:29 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=2EVdwCIvRXHULNHqKCu5PKc4Xh6YVZ2CwXFPAhllZMI=; b=Blar+8ZKVdqVmyOX3dErkmKd3DNBJjV2eUUv1r5wkdW99gaYbR5TfJQwcVuo7rcL0lJr VMbl0DQzHLzlLQDdTzbLZJnNXh7+er66xaiNFzjTrH9CCvUHcTsXYQo5tFP9N3/Ax5LO 6jHfxWfsDt6HSaZ/kSw6sQqM99uEzj3rKp/M5POP4GWBOCGwFlvv9J8PXtdQeTWK1qJK MeZBi43qaT7UtzaoZxcY9dW9geV/sq+hsw9he+o4LRPHiW2xgYcincV92vx6YWGZ35zR SAHp/Y9FYgSY1fuVRQS0oguJCjQDMLAsEENPLh33N8ScdsQ/uNpGFnV3UrcGe6WehJSm og== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3j4ubj8hnf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 23 Aug 2022 03:58:29 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 23 Aug 2022 03:58:28 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Tue, 23 Aug 2022 03:58:28 -0700 Received: from localhost.localdomain (unknown [10.28.36.157]) by maili.marvell.com (Postfix) with ESMTP id DC27F5B6929; Tue, 23 Aug 2022 03:58:25 -0700 (PDT) From: Amit Prakash Shukla To: Ruifeng Wang , Radu Nicolau , Akhil Goyal CC: , , Amit Prakash Shukla , Subject: [PATCH 3/3] examples/ipsec-secgw: compilation fix for GCC-12 Date: Tue, 23 Aug 2022 16:27:42 +0530 Message-ID: <20220823105742.2276506-3-amitprakashs@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220823105742.2276506-1-amitprakashs@marvell.com> References: <20220823105742.2276506-1-amitprakashs@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: 3xE0iCpviO4iQmtZmQR3amdRZi40Nw8U X-Proofpoint-ORIG-GUID: 3xE0iCpviO4iQmtZmQR3amdRZi40Nw8U X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-23_04,2022-08-22_02,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org GCC 12 raises the following warning: meson --werror --buildtype=debugoptimized --cross-file config/arm/arm64_armv8_linux_gcc -Ddefault_library=shared -Dexamples=all build ninja -C build In file included from ../examples/ipsec-secgw/ipsec_lpm_neon.h:9, from ../examples/ipsec-secgw/ipsec_worker.c:16: In function 'send_multi_pkts', inlined from 'route6_pkts_neon' at ../examples/ipsec-secgw/ipsec_lpm_neon.h:170:2, inlined from 'ipsec_poll_mode_wrkr_inl_pr' at ../examples/ipsec-secgw/ipsec_worker.c:1257:4: ../examples/ipsec-secgw/ipsec_neon.h:261:21: error: 'dst_port' may be used uninitialized [-Werror=maybe-uninitialized] 261 | dlp = dst_port[i - 1]; | ~~~~^~~~~~~~~~~~~~~~~ In file included from ../examples/ipsec-secgw/ipsec_worker.c:16: ../examples/ipsec-secgw/ipsec_worker.c: In function 'ipsec_poll_mode_wrkr_inl_pr': ../examples/ipsec-secgw/ipsec_lpm_neon.h:118:17: note: 'dst_port' declared here 118 | int32_t dst_port[MAX_PKT_BURST]; | ^~~~~~~~ Fixes: ce23f7ceec6b (examples/ipsec-secgw: add support of NEON with poll mode) Cc: stable@dpdk.org Signed-off-by: Amit Prakash Shukla --- examples/ipsec-secgw/ipsec_lpm_neon.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/examples/ipsec-secgw/ipsec_lpm_neon.h b/examples/ipsec-secgw/ipsec_lpm_neon.h index 959a5a8666..25f0abcaf3 100644 --- a/examples/ipsec-secgw/ipsec_lpm_neon.h +++ b/examples/ipsec-secgw/ipsec_lpm_neon.h @@ -115,7 +115,7 @@ static inline void route6_pkts_neon(struct rt_ctx *rt_ctx, struct rte_mbuf **pkts, int nb_rx) { uint8_t dst_ip6[MAX_PKT_BURST][16]; - int32_t dst_port[MAX_PKT_BURST]; + uint16_t dst_port[MAX_PKT_BURST]; struct rte_ether_hdr *eth_hdr; struct rte_ipv6_hdr *ipv6_hdr; int32_t hop[MAX_PKT_BURST]; @@ -157,17 +157,15 @@ route6_pkts_neon(struct rt_ctx *rt_ctx, struct rte_mbuf **pkts, int nb_rx) pkt = pkts[i]; if (pkt->ol_flags & RTE_MBUF_F_TX_SEC_OFFLOAD) { /* Read hop from the SA */ - dst_port[i] = get_hop_for_offload_pkt(pkt, 1); + dst_port[i] = (uint16_t)get_hop_for_offload_pkt(pkt, 1); } else { /* Need to use hop returned by lookup */ - dst_port[i] = hop[lpm_pkts++]; + dst_port[i] = (uint16_t)hop[lpm_pkts++]; } - if (dst_port[i] == -1) - dst_port[i] = BAD_PORT; } /* Send packets */ - send_multi_pkts(pkts, (uint16_t *)dst_port, nb_rx, 0, 0, false); + send_multi_pkts(pkts, dst_port, nb_rx, 0, 0, false); } /*