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 2A5CAA00C5 for ; Wed, 20 Jul 2022 10:22:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 25A8D40697; Wed, 20 Jul 2022 10:22:42 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2069.outbound.protection.outlook.com [40.107.96.69]) by mails.dpdk.org (Postfix) with ESMTP id 3C5644003C for ; Wed, 20 Jul 2022 10:22:40 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j8wxUszQbkQUR9y1jqPwcVqj8wA2Ob5gSDpygaYfSAaA+TiXw/5UI6M+cpZr5M6JKLV3m5QZqLxBDbNlNj2G48P+a8WM85RLpyIppLIx+lRayEAKvi0+yw2l/yatKFnqSem57gh0cJ/T/IgZWU0qKEcWnBawJ0rIXEupfZ13IPuDHCrWk1RDZl1OW+urycNRnKXd6PL7THsEF8aN9f/KKiza1MuW+D3kaecrVY7wykdRpXfEs4WHejrXOf1QXCv1YS03homKkqSJKDxFiIxe9Echcmqs8Ej1OBgaxHP3XYP8WaxRfP08lLvSgcb5O+hfoAVlnFp5WTMliYgBhdk3JQ== 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=2ofDebkvvNEf/Frx0ouz1fbn+0SaFr47vhPbucbe61U=; b=nu6Cxnp3pXbBXa4Z0xgQmWD0cnt7e08Fbq3Uxnw+cYDwiB6jtyznK8Zbr8Kf7PTPpzxwr2vs0eaOpjTTbXol/TdJkaSs1VNPlFlpeUjg++5GTd1+78pB2XsBlFu8Mcaf/R4A8S0yiH4+9wwT82jt0CUKpvT6Ze5ORvMYJMZcd6idAb227kA/Fzd5uy72bowCvt5VCTsV18taNRNkufuIab7SfwDsa+arr8lZc3e5m5AkxfJK6f9jzZS3OKLXqaa0DRsRALY7K1CM4ayS8pkeYHkuRBVhwHSWkplND5aoGuN6AmMA1mWW8X97MgZStHTn0QFy25ud2AQlcw9HKJrCvg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=redhat.com 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=2ofDebkvvNEf/Frx0ouz1fbn+0SaFr47vhPbucbe61U=; b=N1wquhslmRM4L2vJ0pP9LJy2gybCwQd/4oESpWsr7Iq63Kg2XO0r8rsGfa4o93SdcL987ZUebas14WZUBHENobQkc6p82vB60ODA/+M8n0t+dAVSpEUH0S3jlZChip8t+0q2HvNHPKKWyD7cg/nxFxFRcHKxzsGE1PzdKfTyYpV3LXHLitwMD6rytKW675J6h9gn5x+AYtBg/W0uS5JBBgAIig+lvTG/BLQFGsQWjKx4VSFDEv2CJe155m7jkf7yK+ceNDpX23Ygxn0SFwUeuSh3/PrHippNHfd4jDng66JHtIbk/Cyz7BKbXUOr3SmoirEO4/VPAtVo5K1fs3gqwQ== Received: from BN7PR06CA0055.namprd06.prod.outlook.com (2603:10b6:408:34::32) by DM5PR1201MB0268.namprd12.prod.outlook.com (2603:10b6:4:54::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.14; Wed, 20 Jul 2022 08:22:38 +0000 Received: from BN8NAM11FT063.eop-nam11.prod.protection.outlook.com (2603:10b6:408:34:cafe::59) by BN7PR06CA0055.outlook.office365.com (2603:10b6:408:34::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.18 via Frontend Transport; Wed, 20 Jul 2022 08:22:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) 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.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by BN8NAM11FT063.mail.protection.outlook.com (10.13.177.110) 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:37 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Wed, 20 Jul 2022 08:22:36 +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:34 -0700 From: Xueming Li To: Ankur Dwivedi CC: , Anoob Joseph , Jerin Jacob , David Marchand , dpdk stable Subject: patch 'common/cpt: fix build with GCC 12' has been queued to stable release 20.11.6 Date: Wed, 20 Jul 2022 11:20:37 +0300 Message-ID: <20220720082132.3954126-8-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: 88e2aacf-43a5-414d-f86a-08da6a29018a X-MS-TrafficTypeDiagnostic: DM5PR1201MB0268: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?QUg1NzhzNm1TS2ZGV2pIeGtiTmVrMnlhaFdYUEx6YVVJQjVXVnQ4VlpFM1Uz?= =?utf-8?B?OVpqTTFqVm9NNDZKMklReVg5VlVnSjE5N0FsKzhuNG4xbmdLQzZkdFRXNnB0?= =?utf-8?B?L2YvcG9zTDBRQjFxaENNN3RmeFVSVUJvSi9uMG9PTkU4TzE3TGZLRElRMWc2?= =?utf-8?B?dGt2NEFKMVV3TnNuMnFVTnZsU0xQWXErQ2xoekIrK3laZ2FhaGFWK01wU3lu?= =?utf-8?B?OElsekVOZlRGSElDL0dreHZPRHBVbDBQS0dqOFRTeU9IenppVGZ6eVdPREJp?= =?utf-8?B?amNTTUlhU0VPUEVXSk5wejZPYU9YSFE0d3JRaWJObm02KzEwMUVHaE5DUXU5?= =?utf-8?B?WDR3MmFPSU5NZXgweW55S0tCdnV2S2F5Ky83SWh0Skw5MUVQdUFSN0kycDI5?= =?utf-8?B?MEhqRjF0UGcrdWs5TTFKdjY3aWpTSzFvSmFkVXptRVhsbkdFTmZmMHlYVkFl?= =?utf-8?B?eFNhL3ZkUDFMZnhrRkVkK3NTT0ptVVdXSGxPYUVTK3d2azZIZDQrZnBLWkVk?= =?utf-8?B?SGYwNE12TTNFaFYyL0o2VW9ZS0RZUUd2QmcvcUVRMmhhYnVjQlF2dithY2pp?= =?utf-8?B?cVVObGZoK1psQVByTGs2RFJPRUlGNnI2bnllQkRSak42Qk52MUhWNlY2QXR1?= =?utf-8?B?VEdCaUU5cHUyakpJM2NKVmlaTjI3SWIvNm1YYzdFZXBSaFhEREczVnErT2pn?= =?utf-8?B?KytSNDF4N0tXQVF5eXFUNnBBU3g0WU12V0lEZVhTamJlbEFGV2FWWkV1b1RR?= =?utf-8?B?Y1BBL1B6VHZ5SW1jUEJQL1JhVmVMTjA0Tnl4eUY1NDJISTlJaFJqRERmem1M?= =?utf-8?B?RVNJT1pYazJmcjhLZnRMa1dpMzBLN2NmOTJ6ZUd5Y215L0toeGpCRUkzRUZ4?= =?utf-8?B?cWRFaU1TZllzUUxEQjNEVTZrRVpTbWdVY3JQc0hHTW9wUlRqdWF0TDFjdmN0?= =?utf-8?B?WFFqMTNGdlFWZUxqUUltbVN5M0QvTElkVnVaeHBESXoxSFM0TmpxZ1dtQ2d0?= =?utf-8?B?YnQ1SUN4UUF5NEpOeXYrUTdkYk1uUktSMVR2WEJKTm10UUxrZEluMHFtb1ZV?= =?utf-8?B?WVR4Mm44T3R6VTlNcGMxWTNqNXJMRkc4S3VpcCtscnhuM2JsUVpGM0lhdU90?= =?utf-8?B?SEhiYUtRSUZ1R0NqaXdDTjY0SXlhYWxjVElqVlF0R1prYU90YUtqN1YzV0p6?= =?utf-8?B?MDAvMldjbzBDemp3OTA0N3hTOHVMRXU2WFlLUTBWMUVVYVZVcVNhcER0dUtJ?= =?utf-8?B?a1YwMy9TMWlMb0IzZVRxaXVRTVRyaDVWS3pQdmlrMWd5VW84dz09?= X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(376002)(39860400002)(396003)(136003)(346002)(36840700001)(40470700004)(46966006)(41300700001)(966005)(36860700001)(356005)(336012)(86362001)(7696005)(26005)(53546011)(47076005)(1076003)(82740400003)(186003)(478600001)(2616005)(6286002)(426003)(81166007)(70586007)(83380400001)(16526019)(8936002)(2906002)(4326008)(5660300002)(55016003)(6916009)(82310400005)(316002)(8676002)(70206006)(36756003)(54906003)(40480700001)(40460700003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2022 08:22:37.6559 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 88e2aacf-43a5-414d-f86a-08da6a29018a 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.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT063.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0268 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/5dbe3a6dad424b42e3f5b647940e3244526d38ea Thanks. Xueming Li --- >From 5dbe3a6dad424b42e3f5b647940e3244526d38ea Mon Sep 17 00:00:00 2001 From: Ankur Dwivedi Date: Fri, 17 Jun 2022 19:09:29 +0530 Subject: [PATCH] common/cpt: 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 3aa16821ab3e0a21052880fbf4dcb76801380c31 ] The following warning is observed with GCC 12 compilation: In function ‘fill_sg_comp_from_iov’, inlined from ‘cpt_zuc_snow3g_enc_prep’ at ../drivers/common/cpt/cpt_ucode.h:1672:9, inlined from ‘cpt_fc_enc_hmac_prep’ at ../drivers/common/cpt/cpt_ucode.h:2472:3, inlined from ‘fill_digest_params’ at ../drivers/common/cpt/cpt_ucode.h:3548:14, inlined from ‘otx_cpt_enq_single_sym’ at ../drivers/crypto/octeontx/otx_cryptodev_ops.c:541:9, inlined from ‘otx_cpt_enq_single_sym_sessless’ at ../drivers/crypto/octeontx/otx_cryptodev_ops.c:584:8, inlined from ‘otx_cpt_enq_single’ at ../drivers/crypto/octeontx/otx_cryptodev_ops.c:611:11, inlined from ‘otx_cpt_pkt_enqueue’ at ../drivers/crypto/octeontx/otx_cryptodev_ops.c:643:9, inlined from ‘otx_cpt_enqueue_sym’ at ../drivers/crypto/octeontx/otx_cryptodev_ops.c:668:9: ../drivers/common/cpt/cpt_ucode.h:415:36: warning: array subscript 0 is outside array bounds of ‘buf_ptr_t[0]’ {aka ‘struct buf_ptr[]’} [-Warray-bounds] 415 | e_dma_addr = bufs[j].dma_addr; | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ ../drivers/common/cpt/cpt_ucode.h:416:48: warning: array subscript 0 is outside array bounds of ‘buf_ptr_t[0]’ {aka ‘struct buf_ptr[]’} [-Warray-bounds] 416 | e_len = (size > bufs[j].size) ? | ~~~~~~~^~~~~ This patch resolves the warning. Bugzilla ID: 861 Fixes: 9be415daf469 ("common/cpt: add common defines for microcode") Fixes: b74652f3a91f ("common/cpt: add microcode interface for encryption") Signed-off-by: Ankur Dwivedi Reviewed-by: Anoob Joseph Reviewed-by: Jerin Jacob Tested-by: David Marchand --- drivers/common/cpt/cpt_mcode_defines.h | 2 +- drivers/common/cpt/cpt_ucode.h | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/common/cpt/cpt_mcode_defines.h b/drivers/common/cpt/cpt_mcode_defines.h index 56a745f419..188f9f7511 100644 --- a/drivers/common/cpt/cpt_mcode_defines.h +++ b/drivers/common/cpt/cpt_mcode_defines.h @@ -366,7 +366,7 @@ typedef struct buf_ptr { /* IOV Pointer */ typedef struct{ int buf_cnt; - buf_ptr_t bufs[0]; + buf_ptr_t bufs[]; } iov_ptr_t; typedef struct fc_params { diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h index d9f702fc19..b7e89de964 100644 --- a/drivers/common/cpt/cpt_ucode.h +++ b/drivers/common/cpt/cpt_ucode.h @@ -394,27 +394,26 @@ fill_sg_comp_from_iov(sg_comp_t *list, int32_t j; uint32_t extra_len = extra_buf ? extra_buf->size : 0; uint32_t size = *psize; - buf_ptr_t *bufs; - bufs = from->bufs; for (j = 0; (j < from->buf_cnt) && size; j++) { + phys_addr_t dma_addr = from->bufs[j].dma_addr; + uint32_t buf_sz = from->bufs[j].size; + sg_comp_t *to = &list[i >> 2]; phys_addr_t e_dma_addr; uint32_t e_len; - sg_comp_t *to = &list[i >> 2]; if (unlikely(from_offset)) { - if (from_offset >= bufs[j].size) { - from_offset -= bufs[j].size; + if (from_offset >= buf_sz) { + from_offset -= buf_sz; continue; } - e_dma_addr = bufs[j].dma_addr + from_offset; - e_len = (size > (bufs[j].size - from_offset)) ? - (bufs[j].size - from_offset) : size; + e_dma_addr = dma_addr + from_offset; + e_len = (size > (buf_sz - from_offset)) ? + (buf_sz - from_offset) : size; from_offset = 0; } else { - e_dma_addr = bufs[j].dma_addr; - e_len = (size > bufs[j].size) ? - bufs[j].size : size; + e_dma_addr = dma_addr; + e_len = (size > buf_sz) ? buf_sz : size; } to->u.s.len[i % 4] = rte_cpu_to_be_16(e_len); -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-20 15:00:59.178274352 +0800 +++ 0008-common-cpt-fix-build-with-GCC-12.patch 2022-07-20 15:00:58.657667250 +0800 @@ -1 +1 @@ -From 3aa16821ab3e0a21052880fbf4dcb76801380c31 Mon Sep 17 00:00:00 2001 +From 5dbe3a6dad424b42e3f5b647940e3244526d38ea Mon Sep 17 00:00:00 2001 @@ -7,0 +8,3 @@ +Cc: Xueming Li + +[ upstream commit 3aa16821ab3e0a21052880fbf4dcb76801380c31 ] @@ -44 +46,0 @@ -Cc: stable@dpdk.org @@ -56 +58 @@ -index f16ee44297..e6dcb7674c 100644 +index 56a745f419..188f9f7511 100644 @@ -59 +61 @@ -@@ -387,7 +387,7 @@ typedef struct buf_ptr { +@@ -366,7 +366,7 @@ typedef struct buf_ptr { @@ -69 +71 @@ -index e1f2f6005d..22aabab6ac 100644 +index d9f702fc19..b7e89de964 100644