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 4F62A43DC8; Tue, 2 Apr 2024 23:57:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CA4F40E54; Tue, 2 Apr 2024 23:56:07 +0200 (CEST) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mails.dpdk.org (Postfix) with ESMTP id 24A8240A6C for ; Tue, 2 Apr 2024 23:55:57 +0200 (CEST) Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-1e0189323b4so40386305ad.1 for ; Tue, 02 Apr 2024 14:55:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1712094956; x=1712699756; 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=NNbnMxV+iy5OYoiFSPUNvlUHcKvQm6Nd4ja4OwD1PGk=; b=jskoE5A19QxfhY92+Tz4xDE9q+EOXWvlONMbgsMoC+6/3CZTer02Qbsfw2hIXzBIXt KtVjCOI5qvtxjFCieJ4wrR89PUGC6fF1Z+bCOS7rSEXQW9XwwrPlNmVohjEDDjI3mzwv JvNeGGHV0u0hHw7JA3hp+edwusxH/KB6AqtrseCH5Zw0toA0eDhXuO498FFnnf3gImUH od8eWf8HTCxsxu30Ymo+XnQwolKVC7geKh6/gPFe3twfYfq9SmAfxoHWEAhhXx+rywOx sgxM50znMEqF9YvbvG6FH9OpQ7NwB4wwNPW56dxn/ElRM1zA6y7rV7Sq2jEJdzEd1aQb c5/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712094956; x=1712699756; 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=NNbnMxV+iy5OYoiFSPUNvlUHcKvQm6Nd4ja4OwD1PGk=; b=dq6+q3GwXF6jPrM3PwkmAsmcCFWT4K/PuY0gh89i0gWHHN9NcQKvradnnQogms8CZe 9JRbtA394nngB//qMgcEncu4hK7CaGENtZ/IVu2oYbjQ+tpQJq+EvR0u3M7R0acmZuci CBes2eNwsOEtf400aonvjX0sYuBquNZk5P7pzE2QUR6KMOLvZekKqgEauF/O0luEBWNr 5EeDoaCfJYOVIdQPENKUwrzV0ovRSBv2PnZ2Yu84YF+1Gk2Z45r1dHDmkxtqqWXs6plH RmMPzmAEJWlw0NUxJ9XcxB2wiQJ0F9O/PMg/ZdwO2xao32j6m+p4mxIDQdKbh73q18jZ XX2Q== X-Gm-Message-State: AOJu0Yzm2XtgVfaqiULUEMDh2uu/VUR1iIuJHePPC7T0qR48UL+V1tWo gfNQLf5FXO7AtfOJlMGCR9CuXQDTBB7nAx9mlDnCPS/V36u072pxv/ISnkXQctM5CKsuQb35hMV Xv7c= X-Google-Smtp-Source: AGHT+IHrACDESlSpWhcWSn+lj+0aC9sOkOQuwlV01T9tkqWU9++9soMkLC0Uw++2k7fTKRjoPbDagg== X-Received: by 2002:a17:902:eb89:b0:1e2:75a3:685a with SMTP id q9-20020a170902eb8900b001e275a3685amr3031401plg.12.1712094956293; Tue, 02 Apr 2024 14:55:56 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id x15-20020a170902820f00b001dddf29b6e8sm11609381pln.299.2024.04.02.14.55.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 14:55:55 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Nicolas Chautru , Gagandeep Singh , Hemant Agrawal Subject: [PATCH v3 17/30] baseband: replace use of fixed size rte_memcpy Date: Tue, 2 Apr 2024 14:50:33 -0700 Message-ID: <20240402215502.278838-18-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240402215502.278838-1-stephen@networkplumber.org> References: <20240229225936.483472-1-stephen@networkplumber.org> <20240402215502.278838-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 | 17 ++++++++--------- drivers/baseband/acc/rte_vrb_pmd.c | 21 ++++++++++----------- drivers/baseband/la12xx/bbdev_la12xx.c | 4 ++-- 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c index 4f666e514b..6a6212f3de 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,8 @@ 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 +4429,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