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 38B80A0540 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 32FE4406B4; 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 E3A3F406B4 for ; Thu, 7 Jul 2022 09:58:18 +0200 (CEST) Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.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 184E540027 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=Y+xb82nd+QQv0sQaDbuTOze5SG4IR3jy0/6x7gwZvhw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=u2WtEfKq40alY4LLH9v0oWT0wHQ1EwnTKSrVgtqtxZzGAAz9fIEPQ5CzXO9DdRyNW Dq8yDyGgH2YJqkCrx3i0rzb4gUFC/4nEvQAEHhpQ4Yp0HyRLfGmEg40WPngJ18/4tC 2zCwsbmuLFTYY2vtQ/gnnXImLHMzrI+dvNQhbMHWkrLEoSq/wr/9YIAf3xTu20yxxp b+IzLAmf0jhlZncDnyoVSneuEBaldO7urEU1F0bNDHdscmVkY20uD5ugS08+fGVdYL jqhnRCsUJeY+INrU/sP+TczUe4oWFsHrduwYSIot3abTASs2zC2sUXSYYuvzsgH4HP xr6/pIOwRQUfw== Received: by mail-ej1-f72.google.com with SMTP id sa13-20020a1709076d0d00b0072a8791298aso4409013ejc.7 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=Y+xb82nd+QQv0sQaDbuTOze5SG4IR3jy0/6x7gwZvhw=; b=tR2gWCvmLCzat8DihVkmcDdrNYL0pPSPcRGAP/AgJOEh9o+yACySOsueLBwnEjY52o W9lC+ZHb9GNzx4S4xn4F/l5kOLQV55gSUMzShrz2J1N1mwBo3fUko7F3fcFEno6ahHdy dmYqaMoqbHmi3zuokUn8LAsnvYzBaNunlBG4oaKKDhOfSdxbh/Rt5UAzP1dclvZdHuEX A9EEs927/ktWfgdVVgY40xEqbJjRYTdta2oTZjGz45KnRW1tLMba0+TrbpA7FrLY0Em2 s0SfmbSNRaX3CC5muWQAIzdNHXQIq4AGgvNPHVuk8Uddq9DOqVOer9FEp727q6Y86xIb z0PQ== X-Gm-Message-State: AJIora9rvdgSqlh4FabRMmnAveN/N0Ta+8kydV4fMRWAVMttHBgH0ohy cQynnkIqO4uLPVOyCvAyOaXuwQppjK5a2Qm3iDSlfX/eXREDN5aQ0doDGHCzN1li56O10Cgw5WB calFCrsC/PNXl3AxOPJOXGSNa X-Received: by 2002:a05:6402:26d5:b0:435:aba2:9495 with SMTP id x21-20020a05640226d500b00435aba29495mr60424149edd.133.1657180697718; Thu, 07 Jul 2022 00:58:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tupeHnoZewm4pFg3R54d5T/UD6fmLpmHQdbafVpNJawBKL1DGq7hPxtLTdbv75UYZ+snMIQw== X-Received: by 2002:a05:6402:26d5:b0:435:aba2:9495 with SMTP id x21-20020a05640226d500b00435aba29495mr60424127edd.133.1657180697469; Thu, 07 Jul 2022 00:58:17 -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.16 (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: 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 19.11.13 Date: Thu, 7 Jul 2022 09:54:51 +0200 Message-Id: <20220707075522.194223-56-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/ad09a49f195f405df7308d39298dd8f5c612461b Thanks. Christian Ehrhardt --- >From ad09a49f195f405df7308d39298dd8f5c612461b 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 [ 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 f356e62811..305cb2fa33 100644 --- a/drivers/common/cpt/cpt_mcode_defines.h +++ b/drivers/common/cpt/cpt_mcode_defines.h @@ -348,7 +348,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 union opcode_info { diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h index 4d06625d4c..f634546823 100644 --- a/drivers/common/cpt/cpt_ucode.h +++ b/drivers/common/cpt/cpt_ucode.h @@ -378,27 +378,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.37.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-07 09:54:13.516369142 +0200 +++ 0056-common-cpt-fix-build-with-GCC-12.patch 2022-07-07 09:54:10.949824519 +0200 @@ -1 +1 @@ -From 3aa16821ab3e0a21052880fbf4dcb76801380c31 Mon Sep 17 00:00:00 2001 +From ad09a49f195f405df7308d39298dd8f5c612461b Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 3aa16821ab3e0a21052880fbf4dcb76801380c31 ] + @@ -44 +45,0 @@ -Cc: stable@dpdk.org @@ -56 +57 @@ -index f16ee44297..e6dcb7674c 100644 +index f356e62811..305cb2fa33 100644 @@ -59 +60 @@ -@@ -387,7 +387,7 @@ typedef struct buf_ptr { +@@ -348,7 +348,7 @@ typedef struct buf_ptr { @@ -67 +68 @@ - typedef struct fc_params { + typedef union opcode_info { @@ -69 +70 @@ -index e1f2f6005d..22aabab6ac 100644 +index 4d06625d4c..f634546823 100644 @@ -72 +73 @@ -@@ -394,27 +394,26 @@ fill_sg_comp_from_iov(sg_comp_t *list, +@@ -378,27 +378,26 @@ fill_sg_comp_from_iov(sg_comp_t *list,