From patchwork Thu Aug 4 13:40:53 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: 114613 X-Patchwork-Delegate: gakhil@marvell.com 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 97181A00C4; Thu, 4 Aug 2022 15:41:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8672142BCA; Thu, 4 Aug 2022 15:41:08 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 270174282B for ; Thu, 4 Aug 2022 15:41:07 +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 2747fx7t012701; Thu, 4 Aug 2022 06:41:06 -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=0yfQJnKzpNn82gViBDo8+GLW2aBz0DbpXSVEgpPTjWQ=; b=ijAYZ4qZTQfvzTyHgtEoIAqNegv/OrTHK3jUIkDd/A7QuTkgCq6ZwhDb1380or0ZI9RL gymZKqTp8wwH4jI2YERxy/hxftjLHkvVb5Cbpl7ciDmpg/Ad6hxHnM1F1sOOkPGXpg8s bT1Kar5PPm6sScofoqAsvuhI0k5hg6JdOnqz9oTKYTigYixV9DXQ2JuRkwyuifs1c9dh hFoEYQ7Og+RFe/reZuuWV/9FcyIQdyAPm3DR9SdhttYGoyH8ve9cIAN/pg6ug+qaFa3d Gu8muza8erqaAdOsua50H7sb3zHzp4OXmPat3geSJTHGZDsPLx6+ZnRJmHXyViVzu4H+ vg== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3hqp04nsyu-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 04 Aug 2022 06:41:06 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 4 Aug 2022 06:41:05 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 4 Aug 2022 06:41:05 -0700 Received: from localhost.localdomain (unknown [10.28.36.157]) by maili.marvell.com (Postfix) with ESMTP id 273305B694F; Thu, 4 Aug 2022 06:41:02 -0700 (PDT) From: Amit Prakash Shukla To: Konstantin Ananyev , Bernard Iremonger , Vladimir Medvedkin CC: , , Amit Prakash Shukla Subject: [PATCH 1/3] test/test_ipsec: compilation fix for GCC-12 Date: Thu, 4 Aug 2022 19:10:53 +0530 Message-ID: <20220804134055.1816993-1-amitprakashs@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Proofpoint-GUID: Tj83wwjFPKc-yy-81p8xPFCGewS6PImF X-Proofpoint-ORIG-GUID: Tj83wwjFPKc-yy-81p8xPFCGewS6PImF X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-04_03,2022-08-04_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 following warning: p/test/dpdk-test.p/test_ipsec.c.o -c ../app/test/test_ipsec.c In file included from ../lib/eal/x86/include/rte_atomic.h:15, from ../lib/eal/include/generic/rte_pause.h:19, from ../lib/eal/x86/include/rte_pause.h:12, from ../lib/eal/include/generic/rte_spinlock.h:25, from ../lib/eal/x86/include/rte_spinlock.h:12, from ../lib/mempool/rte_mempool.h:43, from ../lib/mbuf/rte_mbuf.h:38, from ../app/test/test_ipsec.c:9: In function '_mm_loadu_si128', inlined from 'rte_mov16' at ../lib/eal/x86/include/rte_memcpy.h:507:9, inlined from 'rte_mov128' at ../lib/eal/x86/include/rte_memcpy.h:549:2, inlined from 'rte_memcpy_generic' at ../lib/eal/x86/include/rte_memcpy.h:732:4, inlined from 'rte_memcpy' at ../lib/eal/x86/include/rte_memcpy.h:882:10, inlined from 'setup_test_string_tunneled' at ../app/test/test_ipsec.c:617:3: /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include/emmintrin.h:703:10: error: array subscript '__m128i_u[15]' is partly outside array bounds of 'const uint8_t[255]' {aka 'const unsigned char[255]'} [-Werror=array-bounds] 703 | return *__P; | ^~~~ ../app/test/test_ipsec.c: In function 'setup_test_string_tunneled': ../app/test/test_ipsec.c:491:22: note: at offset 240 into object 'esp_pad_bytes' of size 255 491 | static const uint8_t esp_pad_bytes[IPSEC_MAX_PAD_SIZE] = { Restrict copy to minimum size. Signed-off-by: Amit Prakash Shukla Acked-by: Akhil Goyal --- app/test/test_ipsec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c index bc2a3dbc2e..8fad093dee 100644 --- a/app/test/test_ipsec.c +++ b/app/test/test_ipsec.c @@ -614,7 +614,8 @@ setup_test_string_tunneled(struct rte_mempool *mpool, const char *string, rte_memcpy(dst, string, len); dst += len; /* copy pad bytes */ - rte_memcpy(dst, esp_pad_bytes, padlen); + rte_memcpy(dst, esp_pad_bytes, RTE_MIN(padlen, + sizeof(esp_pad_bytes))); dst += padlen; /* copy ESP tail header */ rte_memcpy(dst, &espt, sizeof(espt));