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 3673743E0C; Fri, 5 Apr 2024 18:58:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3BF4440EE2; Fri, 5 Apr 2024 18:56:03 +0200 (CEST) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mails.dpdk.org (Postfix) with ESMTP id 13E23406B7 for ; Fri, 5 Apr 2024 18:55:59 +0200 (CEST) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-6ed054f282aso476016b3a.0 for ; Fri, 05 Apr 2024 09:55:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1712336158; x=1712940958; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=edN/Zg7fDgytcS8uCee6gHtDpo1M+8StcSD6cawIgwo=; b=SIoMZV2/1gEoYyecRMxKeYy2F7ZGNlwi1YgCn7F7MjCXYGiZDEMZW6j2IqMn8awN11 xoicK/L0xuU98dpLfZrJaR/a1TLaJZG7NqMwDMRCVWKGaZCN4JeDXogxkj8SgxsfnHBx 65TCjROVchDt7/mIVtom3Dgm5AE1mcJoCfO9mdhib+oEaxySmeK6v14Kx4M0JUQKpVz7 H4rQ7MIKhcikehD8iFnR4EQpdDGa6pFY0kPcFWbGCkZQOEq+WI19GBsy0pxojX3HFFoD 0S9DMDTA/AO9u2fPrhCiUvF12qLAK2eUFxqIzOnVntnfhebOPWFWHQA/NWqubmNcVEjI Weyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712336158; x=1712940958; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=edN/Zg7fDgytcS8uCee6gHtDpo1M+8StcSD6cawIgwo=; b=fv5Pbx2MYRphR28cVW/PCbZnTuYOwjQ5p/YeeQZCFA9NbyDLIPYCq49NyOYph9/iVY ak3xZ+PcjdHSQTigQ29Rb+gHu8J2yrznbeNx0potljw963bq84xRYL2tQTCdxMZaUW4G /Xia+YPe+iJZges2NMklltY7uDJwP6eOO4iKQlDbRMQaT7TkOVrsoYIDcfbWbmDu1WsO rrxbhbUHR5mBb1P2KX2V8sJt1Ep3UgZ16fd1IASap9NAXCCHFsyaKonawJmIHSaopCqu 47HqWTB/0BE5ZjczQsIEmbn12AVpSc5ja/WWNfzkVwgVBW/ZT8JjqafKOPMz3Q9suL8F fqmQ== X-Gm-Message-State: AOJu0YxhjZD1FzdCkjT74ksH4UYa/DHn6Ifq+EThB83XC4eJOSg3h20j +SAUhfOpAd8B1ohrDiBDY6zf/rw1MivUumAG5jFXVv7vgLhhCYYHivmP8wrOHoR/CurWluhs879 dGZAeXA== X-Google-Smtp-Source: AGHT+IEwHe2i1Wb5zs/52kR2YmfMrcERVJ6e9e+vGJ6fVpa6zzgHVH1+cF5G6oXpL8mZ7xl4qX/ozg== X-Received: by 2002:a05:6a20:7f8d:b0:1a3:d60c:488a with SMTP id d13-20020a056a207f8d00b001a3d60c488amr2604452pzj.18.1712336158227; Fri, 05 Apr 2024 09:55:58 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id c2-20020aa781c2000000b006e6c0f8ce1bsm1728555pfn.47.2024.04.05.09.55.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 09:55:57 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Nicolas Chautru , Gagandeep Singh , Hemant Agrawal Subject: [PATCH v4 17/30] baseband: replace use of fixed size rte_memcpy Date: Fri, 5 Apr 2024 09:53:28 -0700 Message-ID: <20240405165518.367503-18-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240405165518.367503-1-stephen@networkplumber.org> References: <20240403163432.437275-1-stephen@networkplumber.org> <20240405165518.367503-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- drivers/baseband/acc/rte_acc100_pmd.c | 16 +++++++--------- drivers/baseband/acc/rte_vrb_pmd.c | 21 ++++++++++----------- drivers/baseband/la12xx/bbdev_la12xx.c | 4 ++-- 3 files changed, 19 insertions(+), 22 deletions(-) diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c index 4f666e514b..6e3160bcb8 100644 --- a/drivers/baseband/acc/rte_acc100_pmd.c +++ b/drivers/baseband/acc/rte_acc100_pmd.c @@ -2975,15 +2975,13 @@ enqueue_ldpc_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op, uint8_t *prev_ptr = (uint8_t *) prev_desc; uint8_t *new_ptr = (uint8_t *) desc; /* Copy first 4 words and BDESCs */ - rte_memcpy(new_ptr, prev_ptr, ACC_5GUL_SIZE_0); - rte_memcpy(new_ptr + ACC_5GUL_OFFSET_0, - prev_ptr + ACC_5GUL_OFFSET_0, - ACC_5GUL_SIZE_1); + memcpy(new_ptr, prev_ptr, ACC_5GUL_SIZE_0); + memcpy(new_ptr + ACC_5GUL_OFFSET_0, + prev_ptr + ACC_5GUL_OFFSET_0, ACC_5GUL_SIZE_1); desc->req.op_addr = prev_desc->req.op_addr; /* Copy FCW */ - rte_memcpy(new_ptr + ACC_DESC_FCW_OFFSET, - prev_ptr + ACC_DESC_FCW_OFFSET, - ACC_FCW_LD_BLEN); + memcpy(new_ptr + ACC_DESC_FCW_OFFSET, + prev_ptr + ACC_DESC_FCW_OFFSET, ACC_FCW_LD_BLEN); acc100_dma_desc_ld_update(op, &desc->req, input, h_output, &in_offset, &h_out_offset, &h_out_length, harq_layout); @@ -3130,7 +3128,7 @@ enqueue_ldpc_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op, desc = acc_desc(q, total_enqueued_cbs); desc->req.data_ptrs[0].address = q->ring_addr_iova + fcw_offset; desc->req.data_ptrs[0].blen = ACC_FCW_LD_BLEN; - rte_memcpy(&desc->req.fcw_ld, &desc_first->req.fcw_ld, ACC_FCW_LD_BLEN); + memcpy(&desc->req.fcw_ld, &desc_first->req.fcw_ld, ACC_FCW_LD_BLEN); ret = acc100_dma_desc_ld_fill(op, &desc->req, &input, h_output, &in_offset, &h_out_offset, &h_out_length, @@ -4430,7 +4428,7 @@ acc100_configure(const char *dev_name, struct rte_acc_conf *conf) struct acc_device *d = bbdev->data->dev_private; /* Store configuration */ - rte_memcpy(&d->acc_conf, conf, sizeof(d->acc_conf)); + memcpy(&d->acc_conf, conf, sizeof(d->acc_conf)); value = acc_reg_read(d, HwPfPcieGpexBridgeControl); bool firstCfg = (value != ACC100_CFG_PCI_BRIDGE); diff --git a/drivers/baseband/acc/rte_vrb_pmd.c b/drivers/baseband/acc/rte_vrb_pmd.c index 88b1104fab..3e5376a12e 100644 --- a/drivers/baseband/acc/rte_vrb_pmd.c +++ b/drivers/baseband/acc/rte_vrb_pmd.c @@ -2450,15 +2450,13 @@ vrb_enqueue_ldpc_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op, uint8_t *prev_ptr = (uint8_t *) prev_desc; uint8_t *new_ptr = (uint8_t *) desc; /* Copy first 4 words and BDESCs. */ - rte_memcpy(new_ptr, prev_ptr, ACC_5GUL_SIZE_0); - rte_memcpy(new_ptr + ACC_5GUL_OFFSET_0, - prev_ptr + ACC_5GUL_OFFSET_0, - ACC_5GUL_SIZE_1); + memcpy(new_ptr, prev_ptr, ACC_5GUL_SIZE_0); + memcpy(new_ptr + ACC_5GUL_OFFSET_0, + prev_ptr + ACC_5GUL_OFFSET_0, ACC_5GUL_SIZE_1); desc->req.op_addr = prev_desc->req.op_addr; /* Copy FCW. */ - rte_memcpy(new_ptr + ACC_DESC_FCW_OFFSET, - prev_ptr + ACC_DESC_FCW_OFFSET, - ACC_FCW_LD_BLEN); + memcpy(new_ptr + ACC_DESC_FCW_OFFSET, + prev_ptr + ACC_DESC_FCW_OFFSET, ACC_FCW_LD_BLEN); vrb_dma_desc_ld_update(op, &desc->req, input, h_output, &in_offset, &h_out_offset, &h_out_length, harq_layout); @@ -2566,7 +2564,8 @@ vrb_enqueue_ldpc_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op, fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET; desc->req.data_ptrs[0].address = q->ring_addr_iova + fcw_offset; desc->req.data_ptrs[0].blen = ACC_FCW_LD_BLEN; - rte_memcpy(&desc->req.fcw_ld, &desc_first->req.fcw_ld, ACC_FCW_LD_BLEN); + memcpy(&desc->req.fcw_ld, &desc_first->req.fcw_ld, + ACC_FCW_LD_BLEN); desc->req.fcw_ld.tb_trailer_size = (c - r - 1) * trail_len; ret = vrb_dma_desc_ld_fill(op, &desc->req, &input, h_output, &in_offset, &h_out_offset, @@ -3991,7 +3990,7 @@ enqueue_mldts_split_op(struct acc_queue *q, struct rte_bbdev_mldts_op *op, if (symb == 0) desc->req.cbs_in_tb = num_syms; else - rte_memcpy(&desc->req.fcw_mldts, fcw, ACC_FCW_MLDTS_BLEN); + memcpy(&desc->req.fcw_mldts, fcw, ACC_FCW_MLDTS_BLEN); desc->req.data_ptrs[1].address = rte_pktmbuf_iova_offset(input_q, in_offset); desc->req.data_ptrs[1].blen = q_size; in_offset += q_size; @@ -4337,7 +4336,7 @@ vrb1_configure(const char *dev_name, struct rte_acc_conf *conf) struct acc_device *d = bbdev->data->dev_private; /* Store configuration. */ - rte_memcpy(&d->acc_conf, conf, sizeof(d->acc_conf)); + memcpy(&d->acc_conf, conf, sizeof(d->acc_conf)); /* Check we are already out of PG. */ status = acc_reg_read(d, VRB1_PfHiSectionPowerGatingAck); @@ -4744,7 +4743,7 @@ vrb2_configure(const char *dev_name, struct rte_acc_conf *conf) struct acc_device *d = bbdev->data->dev_private; /* Store configuration. */ - rte_memcpy(&d->acc_conf, conf, sizeof(d->acc_conf)); + memcpy(&d->acc_conf, conf, sizeof(d->acc_conf)); /* Explicitly releasing AXI as this may be stopped after PF FLR/BME. */ address = VRB2_PfDmaAxiControl; diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c index bb754a5395..23e2fdb811 100644 --- a/drivers/baseband/la12xx/bbdev_la12xx.c +++ b/drivers/baseband/la12xx/bbdev_la12xx.c @@ -597,8 +597,8 @@ dequeue_single_op(struct bbdev_la12xx_q_priv *q_priv, void *dst) op = q_priv->bbdev_op[ci]; - rte_memcpy(dst, q_priv->msg_ch_vaddr[ci], - sizeof(struct bbdev_ipc_enqueue_op)); + memcpy(dst, q_priv->msg_ch_vaddr[ci], + sizeof(struct bbdev_ipc_enqueue_op)); /* Move Consumer Index forward */ ci++; -- 2.43.0