Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/113008/?format=api
https://patches.dpdk.org/api/patches/113008/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220617133930.5063-2-adwivedi@marvell.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20220617133930.5063-2-adwivedi@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220617133930.5063-2-adwivedi@marvell.com", "date": "2022-06-17T13:39:29", "name": "[v2,1/2] common/cpt: fix compilation with GCC 12", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "daa550bf3aca0e0c60854d4456bec537b447f099", "submitter": { "id": 1561, "url": "https://patches.dpdk.org/api/people/1561/?format=api", "name": "Ankur Dwivedi", "email": "adwivedi@marvell.com" }, "delegate": { "id": 6690, "url": "https://patches.dpdk.org/api/users/6690/?format=api", "username": "akhil", "first_name": "akhil", "last_name": "goyal", "email": "gakhil@marvell.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220617133930.5063-2-adwivedi@marvell.com/mbox/", "series": [ { "id": 23613, "url": "https://patches.dpdk.org/api/series/23613/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=23613", "date": "2022-06-17T13:39:28", "name": "fix compilation with GCC 12", "version": 2, "mbox": "https://patches.dpdk.org/series/23613/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/113008/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/113008/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "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])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 989ABA0093;\n\tFri, 17 Jun 2022 15:40:07 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8B44242823;\n\tFri, 17 Jun 2022 15:40:07 +0200 (CEST)", "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id F35FA40F19;\n Fri, 17 Jun 2022 15:40:05 +0200 (CEST)", "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id\n 25H3jumf020397;\n Fri, 17 Jun 2022 06:40:05 -0700", "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3grj05syjj-2\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Fri, 17 Jun 2022 06:40:05 -0700", "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Fri, 17 Jun 2022 06:40:03 -0700", "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend\n Transport; Fri, 17 Jun 2022 06:40:03 -0700", "from hyd1349.t110.caveonetworks.com.com (unknown [10.29.45.13])\n by maili.marvell.com (Postfix) with ESMTP id 0D7EE3F7055;\n Fri, 17 Jun 2022 06:40:00 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-type : content-transfer-encoding; s=pfpt0220;\n bh=YqBnhaj7PQkmaIJ98ITnjp8enyCsMbAeROWPzmwfWto=;\n b=DFt0O4uY1eUSGb2KZab+hHIGZIU5hA0eOPuQWCuwEo48s89yHrs6wu20CXhWySysK5Ng\n 8JwLzp59c/Oq59FLNGaagbgnDcOEnE8pZLROxrC+3u2Y7CI5O+PAxUlC7GR+geWtJEJX\n DGFfOncTQm3HACLaRhnzTLrz3+LOF7pIU3xtD+huZA9v+JKJExnmRrUMMHFmme1nYvyM\n lPgKe8BTA8CAHRUddM0bK+z7dN8WFG4Vwpilj6Nl1ChgyX9moSQj3eQxYKNY2cytnij3\n OVuPDN1l9gRK41rhYuRcKhUpOHdtmTOW4GVX3NNE+0g6Il8Xwy62Wd2ew2FWUQi7YNN7 mw==", "From": "Ankur Dwivedi <adwivedi@marvell.com>", "To": "<dev@dpdk.org>", "CC": "<anoobj@marvell.com>, <gakhil@marvell.com>, <ktejasree@marvell.com>,\n <jerinj@marvell.com>, <david.marchand@redhat.com>, Ankur Dwivedi\n <adwivedi@marvell.com>, <stable@dpdk.org>", "Subject": "[PATCH v2 1/2] common/cpt: fix compilation with GCC 12", "Date": "Fri, 17 Jun 2022 19:09:29 +0530", "Message-ID": "<20220617133930.5063-2-adwivedi@marvell.com>", "X-Mailer": "git-send-email 2.28.0", "In-Reply-To": "<20220617133930.5063-1-adwivedi@marvell.com>", "References": "<20220617061432.2685-1-adwivedi@marvell.com>\n <20220617133930.5063-1-adwivedi@marvell.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"UTF-8\"", "Content-Transfer-Encoding": "8bit", "X-Proofpoint-GUID": "MpXGGWSnGJ8m6GEmEgnVi9dgrlO9i9he", "X-Proofpoint-ORIG-GUID": "MpXGGWSnGJ8m6GEmEgnVi9dgrlO9i9he", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.64.514\n definitions=2022-06-17_08,2022-06-17_01,2022-02-23_01", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "The following warning is observed with GCC 12 compilation:\n\nIn function ‘fill_sg_comp_from_iov’,\n inlined from ‘cpt_zuc_snow3g_enc_prep’ at\n ../drivers/common/cpt/cpt_ucode.h:1672:9,\n inlined from ‘cpt_fc_enc_hmac_prep’ at\n ../drivers/common/cpt/cpt_ucode.h:2472:3,\n inlined from ‘fill_digest_params’ at\n ../drivers/common/cpt/cpt_ucode.h:3548:14,\n inlined from ‘otx_cpt_enq_single_sym’ at\n ../drivers/crypto/octeontx/otx_cryptodev_ops.c:541:9,\n inlined from ‘otx_cpt_enq_single_sym_sessless’ at\n ../drivers/crypto/octeontx/otx_cryptodev_ops.c:584:8,\n inlined from ‘otx_cpt_enq_single’ at\n ../drivers/crypto/octeontx/otx_cryptodev_ops.c:611:11,\n inlined from ‘otx_cpt_pkt_enqueue’ at\n ../drivers/crypto/octeontx/otx_cryptodev_ops.c:643:9,\n inlined from ‘otx_cpt_enqueue_sym’ at\n ../drivers/crypto/octeontx/otx_cryptodev_ops.c:668:9:\n../drivers/common/cpt/cpt_ucode.h:415:36: warning: array subscript 0 is\noutside array bounds of ‘buf_ptr_t[0]’ {aka ‘struct buf_ptr[]’}\n[-Warray-bounds]\n 415 | e_dma_addr = bufs[j].dma_addr;\n | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~\n../drivers/common/cpt/cpt_ucode.h:416:48: warning: array subscript 0 is\noutside array bounds of ‘buf_ptr_t[0]’ {aka ‘struct buf_ptr[]’}\n[-Warray-bounds]\n 416 | e_len = (size > bufs[j].size) ?\n | ~~~~~~~^~~~~\n\nThis patch resolves the warning.\n\nBugzilla ID: 861\nFixes: 9be415daf469 (\"common/cpt: add common defines for microcode\")\nFixes: b74652f3a91f (\"common/cpt: add microcode interface for encryption\")\nCc: stable@dpdk.org\n\nSigned-off-by: Ankur Dwivedi <adwivedi@marvell.com>\nReviewed-by: Anoob Joseph <anoobj@marvell.com>\nReviewed-by: Jerin Jacob Kollanukkaran <jerinj@marvell.com>\n---\n drivers/common/cpt/cpt_mcode_defines.h | 2 +-\n drivers/common/cpt/cpt_ucode.h | 21 ++++++++++-----------\n 2 files changed, 11 insertions(+), 12 deletions(-)", "diff": "diff --git a/drivers/common/cpt/cpt_mcode_defines.h b/drivers/common/cpt/cpt_mcode_defines.h\nindex f16ee44297..e6dcb7674c 100644\n--- a/drivers/common/cpt/cpt_mcode_defines.h\n+++ b/drivers/common/cpt/cpt_mcode_defines.h\n@@ -387,7 +387,7 @@ typedef struct buf_ptr {\n /* IOV Pointer */\n typedef struct{\n \tint buf_cnt;\n-\tbuf_ptr_t bufs[0];\n+\tbuf_ptr_t bufs[];\n } iov_ptr_t;\n \n typedef struct fc_params {\ndiff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h\nindex e1f2f6005d..22aabab6ac 100644\n--- a/drivers/common/cpt/cpt_ucode.h\n+++ b/drivers/common/cpt/cpt_ucode.h\n@@ -394,27 +394,26 @@ fill_sg_comp_from_iov(sg_comp_t *list,\n \tint32_t j;\n \tuint32_t extra_len = extra_buf ? extra_buf->size : 0;\n \tuint32_t size = *psize;\n-\tbuf_ptr_t *bufs;\n \n-\tbufs = from->bufs;\n \tfor (j = 0; (j < from->buf_cnt) && size; j++) {\n+\t\tphys_addr_t dma_addr = from->bufs[j].dma_addr;\n+\t\tuint32_t buf_sz = from->bufs[j].size;\n+\t\tsg_comp_t *to = &list[i >> 2];\n \t\tphys_addr_t e_dma_addr;\n \t\tuint32_t e_len;\n-\t\tsg_comp_t *to = &list[i >> 2];\n \n \t\tif (unlikely(from_offset)) {\n-\t\t\tif (from_offset >= bufs[j].size) {\n-\t\t\t\tfrom_offset -= bufs[j].size;\n+\t\t\tif (from_offset >= buf_sz) {\n+\t\t\t\tfrom_offset -= buf_sz;\n \t\t\t\tcontinue;\n \t\t\t}\n-\t\t\te_dma_addr = bufs[j].dma_addr + from_offset;\n-\t\t\te_len = (size > (bufs[j].size - from_offset)) ?\n-\t\t\t\t(bufs[j].size - from_offset) : size;\n+\t\t\te_dma_addr = dma_addr + from_offset;\n+\t\t\te_len = (size > (buf_sz - from_offset)) ?\n+\t\t\t\t(buf_sz - from_offset) : size;\n \t\t\tfrom_offset = 0;\n \t\t} else {\n-\t\t\te_dma_addr = bufs[j].dma_addr;\n-\t\t\te_len = (size > bufs[j].size) ?\n-\t\t\t\tbufs[j].size : size;\n+\t\t\te_dma_addr = dma_addr;\n+\t\t\te_len = (size > buf_sz) ? buf_sz : size;\n \t\t}\n \n \t\tto->u.s.len[i % 4] = rte_cpu_to_be_16(e_len);\n", "prefixes": [ "v2", "1/2" ] }{ "id": 113008, "url": "