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 9D84C44093; Wed, 22 May 2024 05:32:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EBE7B40E78; Wed, 22 May 2024 05:30:52 +0200 (CEST) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mails.dpdk.org (Postfix) with ESMTP id E820E40A4B for ; Wed, 22 May 2024 05:30:39 +0200 (CEST) Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1eecc71311eso6797325ad.3 for ; Tue, 21 May 2024 20:30:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348639; x=1716953439; 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=4sGEJAtI3M/DtmkYO9snYfPDe9KjyJqXHXFqxCjbI44=; b=H5QvMSMCXejEvhm1PQm5rcu0Bhe8FVVAtf2nTRi/QxMu4iutqfeefu/xDrCkuQMqju 88Fg3MaPiVMX41Pl4XzGlLtt7oLsf/qPU4Yax2uPxmtNQ5pG7wyY1ip1gCC0TyH8oaP7 EELt9qLkIDS0sBaoQ/fZQOV5+UZKT9h+RTBEDWEw6VsB6iyUf1hiBOdEOl0jHc6PKUUG F70rMppysahHdXVbHr2a8EWzvnsZ6k0LPTyOg7lyerQ6ZLvv9N2xogCVwANk5pmtacM5 aZrL7piZNkJqY2vuJFcg/NFlOke5o7hztH9d7eZupU64BRxmEB3SYM/nKjgd3YW0bwq8 BBNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348639; x=1716953439; 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=4sGEJAtI3M/DtmkYO9snYfPDe9KjyJqXHXFqxCjbI44=; b=J0cp5TX1Yfzo65mGpmuasXeNu2zKsfNtUfXBYaK8fwy64queUdMNvY6Wh16hw9bU5V +Pc7xACR+ikPi1XeJorfckUvuc/IbN6chB8h0Ilqd/D5erJxsm2bIWdTtCil5L+3Iff6 z2mVsiPY5mhU44P5Nwd6ITJEx+HPkO2CWw0+Sd+gCBqN3k+RZ7Of6Chk4STCiFmU5NbQ tpSwFXzit3ei62aGSjoPwjF0k06ZjBxHU5rIZkzQQS0EwkG0HUXWOCeG2kJreOQfGSOe mX9hIgxq0P41JnS0kGzJThkvMuj1B9lN8Qm3wY9AWRhdWAT9sv8E9hARcV3bhoANUVDz gV4Q== X-Gm-Message-State: AOJu0Yygn5y43jc2GwYOKenaoRGbH7C2c8Ncyq36V6dnRMV91cs0WJs8 KbenI3U9owaByInR9xvxKNBTJYMnVRkTYKhRhMmOqToXCcIUQFquIW0ATsKV7ka7sp7V7GNdBCE 4Zhs= X-Google-Smtp-Source: AGHT+IHWP6kjHqwkp/sorf7iks8957/772hlMEVqpzELnCil9amtYCvITd9dBvjbGL8+8S6vii2G3Q== X-Received: by 2002:a17:902:650e:b0:1ec:3019:c72c with SMTP id d9443c01a7336-1f31ca38468mr9448485ad.68.1716348638994; Tue, 21 May 2024 20:30:38 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f323c70dafsm2264325ad.260.2024.05.21.20.30.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:38 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Nicolas Chautru , Gagandeep Singh , Hemant Agrawal Subject: [PATCH v5 16/32] baseband: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:43 -0700 Message-ID: <20240522033009.143100-17-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240522033009.143100-1-stephen@networkplumber.org> References: <20240403163432.437275-1-stephen@networkplumber.org> <20240522033009.143100-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 ee50b9c60c..4a929d9cfa 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 585dc49bd6..bb11ff887a 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, @@ -4002,7 +4001,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; @@ -4352,7 +4351,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); @@ -4759,7 +4758,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