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 50B9AA0540 for ; Thu, 7 Jul 2022 09:58:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 49B60427F0; Thu, 7 Jul 2022 09:58:20 +0200 (CEST) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id E6E8540A7F for ; Thu, 7 Jul 2022 09:58:18 +0200 (CEST) Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id B551D41016 for ; Thu, 7 Jul 2022 07:58:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1657180698; bh=uM34fXQZWXwOzewMr6n0GYL15dcvk7UOZipoBNE38rA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=oFCk3tQaW9oNqabI07QucZVPfh8+MOGVJSqqMA37jUPphJmoIHusCE3yCS8OoNls8 LWSsgC09yQ84ZDRaD/eA/TbEL9GZn3aMF+jeloGfhKNemDFrgebB8McC/78944CZ/Q dQ5yRCrQGMeKgOKdQH0FpDaC+lsY9ug46Mn4cARquYbY+0dxRYt4fxH7BI7juA3Ix+ jKbRd4w+pt0vTE2t5skZ6HI6NaGgoGhFO2hXGHsw6PbBp4zm0TOmfsAeuHbe7ocFHE VMAPT2+skzlJO3xMQrab826dCAwOkBaSON86B3a8Z9UOz10aX/iKV6zZRliQtHp1JV 2/Cjp2hJUN87w== Received: by mail-ed1-f72.google.com with SMTP id v16-20020a056402349000b00435a1c942a9so13479262edc.15 for ; Thu, 07 Jul 2022 00:58:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uM34fXQZWXwOzewMr6n0GYL15dcvk7UOZipoBNE38rA=; b=TbYt1otWUFipb4uFeGfGr7G5HEzDpsZXnNCApJNDWR6iCMDNvVLKvH1Yv1+WGf8ti/ KlvmaNS7Eh+x4ELK/G0cZuUolssFHDCKq5ZvNketj13MYO0fP9D+2UWEFsGBKSOPIdFt Ggx9hXLleUE/hcq2BEaryqdTHK/UPGhYzHf5KwqbpykbtcXVAs943c+ST8EODqFpu/J4 6ooswCQwNZ9roSyVRtruovXNPtSouscSwdfrcM23sjd3hfaE2OwuRjF+QavA80SNV/RM fJCEq0n4EgD8hL91aOxab8OcP2RKHMOuRGmN/QPTWD6PnoayqNupn5Kx1Vb4UypfNOBo NjaA== X-Gm-Message-State: AJIora9gGTrPXhNxlaiG6z4p4gR6LaaB6U5qxYYn2rmPSRUeAUpqTHqZ P8ifhA678/mMO6qlKkVrd74qswkhzbgrLqkS7xyj1NPFkFBX9LM9PiqvrjZUVEBxf9yLAPceiFr YrPCN27vdfie2xXK48txhQ6m2 X-Received: by 2002:a17:906:8459:b0:72a:ee63:ca58 with SMTP id e25-20020a170906845900b0072aee63ca58mr10751662ejy.487.1657180698327; Thu, 07 Jul 2022 00:58:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tejio0bIBZMrchb0/4elGmHvQhsh29btWimNYzBMlEGxfmrpZH5s+foLf080Venuub3IOC5g== X-Received: by 2002:a17:906:8459:b0:72a:ee63:ca58 with SMTP id e25-20020a170906845900b0072aee63ca58mr10751649ejy.487.1657180698098; Thu, 07 Jul 2022 00:58:18 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2a02:6d40:3a4f:7b00:c19b:938e:7c97:afe2]) by smtp.gmail.com with ESMTPSA id kv10-20020a17090778ca00b006f3ef214ddesm547277ejc.68.2022.07.07.00.58.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 00:58:17 -0700 (PDT) From: christian.ehrhardt@canonical.com To: David Marchand Cc: dpdk stable Subject: patch 'test/ipsec: fix build with GCC 12' has been queued to stable release 19.11.13 Date: Thu, 7 Jul 2022 09:54:52 +0200 Message-Id: <20220707075522.194223-57-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220707075522.194223-1-christian.ehrhardt@canonical.com> References: <20220707075522.194223-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 19.11.13 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/09/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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/0d5d346bef5d2b971c6959738828729850e933e4 Thanks. Christian Ehrhardt --- >From 0d5d346bef5d2b971c6959738828729850e933e4 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 [ 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 aa6d6db308..65924b0572 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); @@ -1354,7 +1356,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 { @@ -1472,7 +1475,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; } @@ -1540,16 +1544,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; } @@ -1649,7 +1654,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; @@ -1727,15 +1733,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; } @@ -1804,7 +1812,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.37.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-07 09:54:13.558870446 +0200 +++ 0057-test-ipsec-fix-build-with-GCC-12.patch 2022-07-07 09:54:10.953824544 +0200 @@ -1 +1 @@ -From 6e108b6a7c0c0699e6304f7b5706736b34d32607 Mon Sep 17 00:00:00 2001 +From 0d5d346bef5d2b971c6959738828729850e933e4 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 6e108b6a7c0c0699e6304f7b5706736b34d32607 ] + @@ -38 +39,0 @@ -Cc: stable@dpdk.org @@ -46 +47 @@ -index 8da025bf66..7047e17960 100644 +index aa6d6db308..65924b0572 100644 @@ -49 +50 @@ -@@ -554,12 +554,14 @@ struct rte_ipv4_hdr ipv4_outer = { +@@ -544,12 +544,14 @@ struct rte_ipv4_hdr ipv4_outer = { @@ -66 +67 @@ -@@ -1365,7 +1367,8 @@ test_ipsec_crypto_outb_burst_null_null(int i) +@@ -1354,7 +1356,8 @@ test_ipsec_crypto_outb_burst_null_null(int i) @@ -76 +77 @@ -@@ -1483,7 +1486,8 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i) +@@ -1472,7 +1475,8 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i) @@ -86 +87 @@ -@@ -1551,16 +1555,17 @@ test_ipsec_inline_proto_inb_burst_null_null(int i) +@@ -1540,16 +1544,17 @@ test_ipsec_inline_proto_inb_burst_null_null(int i) @@ -108 +109 @@ -@@ -1660,7 +1665,8 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i) +@@ -1649,7 +1654,8 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i) @@ -118 +119 @@ -@@ -1738,15 +1744,17 @@ test_ipsec_inline_proto_outb_burst_null_null(int i) +@@ -1727,15 +1733,17 @@ test_ipsec_inline_proto_outb_burst_null_null(int i) @@ -139 +140 @@ -@@ -1815,7 +1823,8 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i) +@@ -1804,7 +1812,8 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i)