From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 761B1A00C5 for ; Wed, 20 Jul 2022 10:22:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6FB524280D; Wed, 20 Jul 2022 10:22:43 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2047.outbound.protection.outlook.com [40.107.220.47]) by mails.dpdk.org (Postfix) with ESMTP id 7578C40A7A for ; Wed, 20 Jul 2022 10:22:41 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h8jWbbU8H6a5la2txy52HeE/QLoH7MhJz6wAaA6k8JPyt+m3INDNy5hr4HpGw0tfIV7rXJNS4A02Kk1qqjbGFJuUZsP0d9GtsGNQZrl+G8Dr4EPXDnRj8Zvx4ay24nYQSeZ+kUeFs9M9t1pO4Wn6yF599Aehh9XcFNIYf+P2oepccRLEt19XT/sODno0lT1+7PqNrnhNzz9vAdCF32JpYWUbLVBWcHyT9/vtHvdhp/nhjFNH6j0uVJYYRv8GqF1xuA/FJmdCaPSgrggO6wyEQrbgtZOTsxI+KLhAlMwk4MkdCK+IH7ltBYYZZ8z0pxuF5W7XyaHyU9p/wMTwaSce/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VPGdIhRG7yhT1LKMg767Id04wMbrJIS7YFz/ryJJamQ=; b=Qc1URUKrEp+4X/hFjPIPd+Ng3kLw5ulZVFlmlItO69C34TvP8bydWR+lSLFG7uSbNGZkLQTaib7H3R4wQMoBSVaOpmEszfHb/0gUwt95GsRqozAhcqj/bQwz1W8hKnJAu/XYWHggf8rZEBvHPYPFaVnI+crs1mrYgL24g7LJEQ23qIbIJDJAU4iHxdrAT6NGa91nArFUNMA1obz9vgIG1B2LaSUMAGUKd1V2OmInaqfG+ibqvXAYDxdrDBN9LD1Lp0KAtBiGs2uiov/Ex6/ZKHwrDvXiVldrrHa8TSgfEXY/NaL5E5pj6SxvcIhUGRlrYMMLu8zW8ceyKHA2ZgJ88Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VPGdIhRG7yhT1LKMg767Id04wMbrJIS7YFz/ryJJamQ=; b=S3Bln2ewaF0gwNehPc9PSt59sqglmfscYXTB+yJfSGtOLgUemfT1Yi5yaEZgU4c+AHhWD9nnatmC4Jw0BJB4dHW/cszTJmgCQZBu8pgldmZkLuQPqtB4iAe25b9dem+HB/repEyf5TDvpomUsqhrQDDe16I4zRVJSo7lqmXvWrUoKNfeHVoBzwBbFKUdZbIzsNvZeg8uYQccDaxUfXsMhjB/G3qXdh/zjCm3NU4wwKbVWnHuaKgIQSwkLTfxKlFnhrtU/blrSA/2VCPUE1rYr8t2pnwXCACSfP9YzS4FLe0Lz5NkV3xteAVeqjLSjI2xJBvFTdgNNtAQcsOPXigXhQ== Received: from DS7PR03CA0232.namprd03.prod.outlook.com (2603:10b6:5:3ba::27) by BYAPR12MB3078.namprd12.prod.outlook.com (2603:10b6:a03:a8::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.19; Wed, 20 Jul 2022 08:22:39 +0000 Received: from DM6NAM11FT010.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3ba:cafe::40) by DS7PR03CA0232.outlook.office365.com (2603:10b6:5:3ba::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.21 via Frontend Transport; Wed, 20 Jul 2022 08:22:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.236) by DM6NAM11FT010.mail.protection.outlook.com (10.13.172.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5458.17 via Frontend Transport; Wed, 20 Jul 2022 08:22:38 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Wed, 20 Jul 2022 08:22:38 +0000 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Wed, 20 Jul 2022 01:22:36 -0700 From: Xueming Li To: David Marchand CC: , dpdk stable Subject: patch 'test/ipsec: fix build with GCC 12' has been queued to stable release 20.11.6 Date: Wed, 20 Jul 2022 11:20:38 +0300 Message-ID: <20220720082132.3954126-9-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220720082132.3954126-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> <20220720082132.3954126-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e7ac920d-c6c4-445c-5f30-08da6a29023c X-MS-TrafficTypeDiagnostic: BYAPR12MB3078:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?utf-8?B?bERQQUdQZm5oRFN2eXdJZFhyM3ZyNDM1TnhFa0ZDT0ZKNW5VYXRzSTNJMWdF?= =?utf-8?B?Ui9FU2MwangxeTI0YitZa1gvUDUraU9ubUYyajYzS25pbkw4R1Z3V0RlWHY5?= =?utf-8?B?eXlOSE95VU44NjEzN2VvZngrR0xkeUYrZHZzS2xMVE9ZajQyM29Hb3VHampp?= =?utf-8?B?anZGcStwazF2SWVJaGhXcGkzcWc2c2p0SVlwSXhnNmZzRFkwbGFWVkdEQmpt?= =?utf-8?B?NDV5eXJmOGRHSEVCMFJXb0hZUUJ5TlJpTHN4TVl4REdSMm53UHhPNFA0USt5?= =?utf-8?B?ZWk0cFRQV00wa3dwUjhueS9PbUo2T1VDNElldjI1MjNqMTcrMFl4aCtzbW5J?= =?utf-8?B?SE1KNGFmVVFadW0vbHQxRldvZEIrOWt6UkZwRjVMQzE3SmtyWGwwaEN6SE82?= =?utf-8?B?RlBYTUpRelp5blIxTndQd01LdkF2QUZZaDBWVEo0ZU8xY0dsaVRwbnJvYUF2?= =?utf-8?B?QkZiT3NqWFVWVTFKNk9GdmVNVGJMUy91V2FJYXNra0hHdkJ5K2dZeWdEY0hY?= =?utf-8?B?ZTI1cjdHM0dSZXArNDJjbzNza3BBdEdvN3VNanNRVGRmQlpOa1o4aEFHTTh3?= =?utf-8?B?RnJKMTVKMm5hU2NKcEM5RlpUT29lNDdiQnE5UnlkdWUxalJtMzdsbTFCSVUw?= =?utf-8?B?ZllVcTl1MWhTMm14WHNwZitabWdNWmVsWHdPVHk2NERyWmFobkQ5MlpUbzYx?= =?utf-8?B?TUc5cVd0VVFiNGZCWlhybXhZK215Vno5WTN6UWJ3Z00yRmd3bXBSNUJpcGsr?= =?utf-8?B?STVndmJSVnYwS1dDYVRDLzdSeExnaUJnTk1BeVkrMWc1cG9sbXFFMzk5bkxw?= =?utf-8?B?QytHb3ZoTHpucDhub3BpTXNyN0hpWS8rOU5VdU9renI3T1NLS0g1aDd0YWgv?= =?utf-8?B?Z3FMUjlVZzI0bWdYTGV5VkVmNmZhWjlzbkxNVlNKOWQzN3NhZXU3aWI3OHV5?= =?utf-8?B?QWc3R0dvWEZXNmxJRHZxeGFDR1FveWIwaUN5ZkNWcFUvekV6NzNoSFE2d0VU?= =?utf-8?B?cVhpMmRyOTcwK0hQa29yTFlRbUtIajVhREVMNXdzZUFtTDk2MzB3RlNHTDdn?= =?utf-8?B?b2wrV3Q3ZVBnUTR4U21oSU1PSWRyMUM5MkRwbVR5L3B1VWxQQVZQMzBxQ2Jw?= =?utf-8?B?V1orSXRaZFVmdC9kRWMwZ3hVdElQam4xMld1WWlsMkFYUllLVStTUWNwaHlv?= =?utf-8?B?TC93bGtJZDd0eGZhUkl5VU5mYnJ6ekpYTkV4MlRpbTRIVjI1aXQxL1J6ME1z?= =?utf-8?B?Q3VHNGxYWE02UU1pc0M4RXZTTSt2MkViUWhjT0w0VTZReHVldz09?= X-Forefront-Antispam-Report: CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(136003)(346002)(396003)(376002)(39860400002)(36840700001)(40470700004)(46966006)(1076003)(2906002)(83380400001)(186003)(41300700001)(426003)(336012)(47076005)(2616005)(966005)(478600001)(6286002)(40480700001)(81166007)(26005)(36860700001)(5660300002)(8936002)(70206006)(70586007)(82310400005)(8676002)(86362001)(4326008)(40460700003)(6916009)(54906003)(55016003)(356005)(82740400003)(7696005)(53546011)(316002)(16526019)(36756003)(40140700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2022 08:22:38.8810 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e7ac920d-c6c4-445c-5f30-08da6a29023c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.236]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT010.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3078 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 20.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/22/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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/df7022dae82dc77ba99c5bb3a3e5d29b219aa51b Thanks. Xueming Li --- >From df7022dae82dc77ba99c5bb3a3e5d29b219aa51b Mon Sep 17 00:00:00 2001 From: David Marchand Date: Thu, 16 Jun 2022 11:33:20 +0200 Subject: [PATCH] test/ipsec: fix build with GCC 12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Xueming Li [ upstream commit 6e108b6a7c0c0699e6304f7b5706736b34d32607 ] GCC 12 raises the following warning: In function ‘_mm256_loadu_si256’, inlined from ‘rte_mov32’ at ../lib/eal/x86/include/rte_memcpy.h:319:9, inlined from ‘rte_mov128’ at ../lib/eal/x86/include/rte_memcpy.h:344:2, inlined from ‘rte_memcpy_generic’ at ../lib/eal/x86/include/rte_memcpy.h:438:4, inlined from ‘rte_memcpy’ at ../lib/eal/x86/include/rte_memcpy.h:882:10, inlined from ‘setup_test_string.constprop’ at ../app/test/test_ipsec.c:572:4: /usr/lib/gcc/x86_64-redhat-linux/12/include/avxintrin.h:929:10: error: array subscript ‘__m256i_u[3]’ is partly outside array bounds of ‘const char[108]’ [-Werror=array-bounds] 929 | return *__P; | ^~~~ ../app/test/test_ipsec.c: In function ‘setup_test_string.constprop’: ../app/test/test_ipsec.c:539:12: note: at offset 96 into object ‘null_plain_data’ of size 108 539 | const char null_plain_data[] = | ^~~~~~~~~~~~~~~ Add a hint so that the compiler understands the copied data is within the passed string boundaries. Bugzilla ID: 848 Fixes: 05fe65eb66b2 ("test/ipsec: introduce functional test") Signed-off-by: David Marchand --- app/test/test_ipsec.c | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c index fc77539bc7..39531ff667 100644 --- a/app/test/test_ipsec.c +++ b/app/test/test_ipsec.c @@ -544,12 +544,14 @@ struct rte_ipv4_hdr ipv4_outer = { }; static struct rte_mbuf * -setup_test_string(struct rte_mempool *mpool, - const char *string, size_t len, uint8_t blocksize) +setup_test_string(struct rte_mempool *mpool, const char *string, + size_t string_len, size_t len, uint8_t blocksize) { struct rte_mbuf *m = rte_pktmbuf_alloc(mpool); size_t t_len = len - (blocksize ? (len % blocksize) : 0); + RTE_VERIFY(len <= string_len); + if (m) { memset(m->buf_addr, 0, m->buf_len); char *dst = rte_pktmbuf_append(m, t_len); @@ -1355,7 +1357,8 @@ test_ipsec_crypto_outb_burst_null_null(int i) /* Generate input mbuf data */ for (j = 0; j < num_pkts && rc == 0; j++) { ut_params->ibuf[j] = setup_test_string(ts_params->mbuf_pool, - null_plain_data, test_cfg[i].pkt_sz, 0); + null_plain_data, sizeof(null_plain_data), + test_cfg[i].pkt_sz, 0); if (ut_params->ibuf[j] == NULL) rc = TEST_FAILED; else { @@ -1473,7 +1476,8 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i) /* Generate test mbuf data */ ut_params->obuf[j] = setup_test_string( ts_params->mbuf_pool, - null_plain_data, test_cfg[i].pkt_sz, 0); + null_plain_data, sizeof(null_plain_data), + test_cfg[i].pkt_sz, 0); if (ut_params->obuf[j] == NULL) rc = TEST_FAILED; } @@ -1541,16 +1545,17 @@ test_ipsec_inline_proto_inb_burst_null_null(int i) /* Generate inbound mbuf data */ for (j = 0; j < num_pkts && rc == 0; j++) { - ut_params->ibuf[j] = setup_test_string( - ts_params->mbuf_pool, - null_plain_data, test_cfg[i].pkt_sz, 0); + ut_params->ibuf[j] = setup_test_string(ts_params->mbuf_pool, + null_plain_data, sizeof(null_plain_data), + test_cfg[i].pkt_sz, 0); if (ut_params->ibuf[j] == NULL) rc = TEST_FAILED; else { /* Generate test mbuf data */ ut_params->obuf[j] = setup_test_string( ts_params->mbuf_pool, - null_plain_data, test_cfg[i].pkt_sz, 0); + null_plain_data, sizeof(null_plain_data), + test_cfg[i].pkt_sz, 0); if (ut_params->obuf[j] == NULL) rc = TEST_FAILED; } @@ -1650,7 +1655,8 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i) /* Generate test mbuf data */ for (j = 0; j < num_pkts && rc == 0; j++) { ut_params->ibuf[j] = setup_test_string(ts_params->mbuf_pool, - null_plain_data, test_cfg[i].pkt_sz, 0); + null_plain_data, sizeof(null_plain_data), + test_cfg[i].pkt_sz, 0); if (ut_params->ibuf[0] == NULL) rc = TEST_FAILED; @@ -1728,15 +1734,17 @@ test_ipsec_inline_proto_outb_burst_null_null(int i) /* Generate test mbuf data */ for (j = 0; j < num_pkts && rc == 0; j++) { ut_params->ibuf[j] = setup_test_string(ts_params->mbuf_pool, - null_plain_data, test_cfg[i].pkt_sz, 0); + null_plain_data, sizeof(null_plain_data), + test_cfg[i].pkt_sz, 0); if (ut_params->ibuf[0] == NULL) rc = TEST_FAILED; if (rc == 0) { /* Generate test tunneled mbuf data for comparison */ ut_params->obuf[j] = setup_test_string( - ts_params->mbuf_pool, - null_plain_data, test_cfg[i].pkt_sz, 0); + ts_params->mbuf_pool, null_plain_data, + sizeof(null_plain_data), test_cfg[i].pkt_sz, + 0); if (ut_params->obuf[j] == NULL) rc = TEST_FAILED; } @@ -1805,7 +1813,8 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i) for (j = 0; j < num_pkts && rc == 0; j++) { /* packet with sequence number 0 is invalid */ ut_params->ibuf[j] = setup_test_string(ts_params->mbuf_pool, - null_encrypted_data, test_cfg[i].pkt_sz, 0); + null_encrypted_data, sizeof(null_encrypted_data), + test_cfg[i].pkt_sz, 0); if (ut_params->ibuf[j] == NULL) rc = TEST_FAILED; } -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-20 15:00:59.221975012 +0800 +++ 0009-test-ipsec-fix-build-with-GCC-12.patch 2022-07-20 15:00:58.661000577 +0800 @@ -1 +1 @@ -From 6e108b6a7c0c0699e6304f7b5706736b34d32607 Mon Sep 17 00:00:00 2001 +From df7022dae82dc77ba99c5bb3a3e5d29b219aa51b Mon Sep 17 00:00:00 2001 @@ -7,0 +8,3 @@ +Cc: Xueming Li + +[ upstream commit 6e108b6a7c0c0699e6304f7b5706736b34d32607 ] @@ -38 +40,0 @@ -Cc: stable@dpdk.org @@ -46 +48 @@ -index 8da025bf66..7047e17960 100644 +index fc77539bc7..39531ff667 100644 @@ -49 +51 @@ -@@ -554,12 +554,14 @@ struct rte_ipv4_hdr ipv4_outer = { +@@ -544,12 +544,14 @@ struct rte_ipv4_hdr ipv4_outer = { @@ -66 +68 @@ -@@ -1365,7 +1367,8 @@ test_ipsec_crypto_outb_burst_null_null(int i) +@@ -1355,7 +1357,8 @@ test_ipsec_crypto_outb_burst_null_null(int i) @@ -76 +78 @@ -@@ -1483,7 +1486,8 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i) +@@ -1473,7 +1476,8 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i) @@ -86 +88 @@ -@@ -1551,16 +1555,17 @@ test_ipsec_inline_proto_inb_burst_null_null(int i) +@@ -1541,16 +1545,17 @@ test_ipsec_inline_proto_inb_burst_null_null(int i) @@ -108 +110 @@ -@@ -1660,7 +1665,8 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i) +@@ -1650,7 +1655,8 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i) @@ -118 +120 @@ -@@ -1738,15 +1744,17 @@ test_ipsec_inline_proto_outb_burst_null_null(int i) +@@ -1728,15 +1734,17 @@ test_ipsec_inline_proto_outb_burst_null_null(int i) @@ -139 +141 @@ -@@ -1815,7 +1823,8 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i) +@@ -1805,7 +1813,8 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i)