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 D10D344093; Wed, 22 May 2024 05:32:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7F23340EA5; Wed, 22 May 2024 05:30:54 +0200 (CEST) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mails.dpdk.org (Postfix) with ESMTP id EE0C940A6C for ; Wed, 22 May 2024 05:30:40 +0200 (CEST) Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-2bd92557274so694197a91.0 for ; Tue, 21 May 2024 20:30:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348640; x=1716953440; 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=wWGruJZndTsR6dy3JQTOVb7AKGrbye4ePcPebgwmfLQ=; b=ssed9Tax6hJjhW/WYgvMQV2Cix/xHLfi1VwrroSPzAvn1SUKDk8Lr2Ls1hqCfVYJC8 2+2fXxQJhp+tWr9wR7KSCZbXyYmtZQijPQzidr51jCVi5RU/Uc7Hxz8nrG9VgVaBwY8T jriN5B22r31VMx8ya3nw3hf0c6qWxwYatiB57kNv6xRJ4e9eeziuLjo+l9XGKr/Di23F v3sS5F6+DxFdtzM9Zd7jau/y65xuYFYnvKFXY7GRd+maDY0uKx9oH4Ak2STGAANPUzwa 9EltG9OT6SyWseKvA3ZkoDviyfd2Dmw9b2310UwE2j8m9nG2543nmGQWOKOzvqyI9J/G m/oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348640; x=1716953440; 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=wWGruJZndTsR6dy3JQTOVb7AKGrbye4ePcPebgwmfLQ=; b=GGm6ZzEKmahhM6+yWwddj8aBPxNKnOZkGmtFsB7/3tpdarpEIO8GBZuib4k2A8N8GF q9AfsV73D5AnqRBYYf6WbGBgytGmDA7NON+5D9/39MDW8Woq24Row18iWZy39uIRZKxi UO+vviGux43LikQ0SVcCUVmT/U2Df3EIMSafFs2eH+/QA1eBxkCgIkrYNbv4aBWgTXEo 7lLhOIzXLiaMdZWs9/4vlGjcfgksYNpMcIScwX0aN7ZUn6QgLmogDBwYWTlrGdidJlfe PvUj6H7CXgV6iLkTKcBm1mkLKEWX/KNL1NN2SKTxAghGm0gTaM7dK/7waMstOVpykxfA Npuw== X-Gm-Message-State: AOJu0YzvmWET6RGK2XbslqYmwCTE938IVJFBA/qTwwUuzP5srn0l3+nr 01Uk0hfmcncr9LbAZv9NpN5SrbXVoZRmCMKlLcl25lZi2pqlMnpbFZblU87UF/2GrPhA5wiRWxr 3YPc= X-Google-Smtp-Source: AGHT+IEpRFPobQJJZvItIG67+bN12A6qLOPtvGurRvueMKRJeR7me+UwIZ+i2fzHxi9YieCb1R8dhQ== X-Received: by 2002:a17:90b:a0b:b0:2bd:ad2f:e43c with SMTP id 98e67ed59e1d1-2bdad2fef41mr262851a91.29.1716348640226; Tue, 21 May 2024 20:30:40 -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.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:39 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jingjing Wu , Kai Ji , Fan Zhang , Ashish Gupta Subject: [PATCH v5 17/32] common: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:44 -0700 Message-ID: <20240522033009.143100-18-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 Also, remove unnecessary includes of rte_memcpy.h Signed-off-by: Stephen Hemminger --- drivers/common/idpf/idpf_common_device.c | 4 ++-- drivers/common/idpf/idpf_common_virtchnl.c | 10 ++++++---- drivers/common/qat/qat_qp.c | 10 ++++------ drivers/compress/qat/qat_comp.c | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/common/idpf/idpf_common_device.c b/drivers/common/idpf/idpf_common_device.c index 8403ed83f9..37c859f830 100644 --- a/drivers/common/idpf/idpf_common_device.c +++ b/drivers/common/idpf/idpf_common_device.c @@ -477,8 +477,8 @@ idpf_vport_init(struct idpf_vport *vport, vport->num_rx_q = vport_info->num_rx_q; vport->num_rx_bufq = vport_info->num_rx_bufq; vport->max_mtu = vport_info->max_mtu; - rte_memcpy(vport->default_mac_addr, - vport_info->default_mac_addr, ETH_ALEN); + memcpy(vport->default_mac_addr, vport_info->default_mac_addr, + ETH_ALEN); vport->rss_algorithm = vport_info->rss_algorithm; vport->rss_key_size = RTE_MIN(IDPF_RSS_KEY_LEN, vport_info->rss_key_size); diff --git a/drivers/common/idpf/idpf_common_virtchnl.c b/drivers/common/idpf/idpf_common_virtchnl.c index c46ed50eb5..baabfeb216 100644 --- a/drivers/common/idpf/idpf_common_virtchnl.c +++ b/drivers/common/idpf/idpf_common_virtchnl.c @@ -290,7 +290,8 @@ idpf_vc_caps_get(struct idpf_adapter *adapter) return err; } - rte_memcpy(&adapter->caps, args.out_buffer, sizeof(struct virtchnl2_get_capabilities)); + memcpy(&adapter->caps, args.out_buffer, + sizeof(struct virtchnl2_get_capabilities)); return 0; } @@ -327,7 +328,8 @@ idpf_vc_vport_create(struct idpf_vport *vport, return err; } - rte_memcpy(&(vport->vport_info.info), args.out_buffer, IDPF_DFLT_MBX_BUF_SIZE); + memcpy(&(vport->vport_info.info), args.out_buffer, + IDPF_DFLT_MBX_BUF_SIZE); return 0; } @@ -383,7 +385,7 @@ idpf_vc_queue_grps_add(struct idpf_vport *vport, return err; } - rte_memcpy(p2p_queue_grps_out, args.out_buffer, IDPF_DFLT_MBX_BUF_SIZE); + memcpy(p2p_queue_grps_out, args.out_buffer, IDPF_DFLT_MBX_BUF_SIZE); return 0; } @@ -922,7 +924,7 @@ idpf_vc_ptype_info_query(struct idpf_adapter *adapter, if (err != 0) DRV_LOG(ERR, "Failed to execute command of VIRTCHNL2_OP_GET_PTYPE_INFO"); - rte_memcpy(recv_ptype_info, args.out_buffer, IDPF_DFLT_MBX_BUF_SIZE); + memcpy(recv_ptype_info, args.out_buffer, IDPF_DFLT_MBX_BUF_SIZE); return err; } diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c index f95dd33375..0c30c4d8c1 100644 --- a/drivers/common/qat/qat_qp.c +++ b/drivers/common/qat/qat_qp.c @@ -871,9 +871,8 @@ qat_cq_get_fw_cipher_crc_cap(struct qat_qp *qp) return -EINVAL; } - rte_memcpy(src_data_addr, - cipher_crc_cap_check_plaintext, - sizeof(cipher_crc_cap_check_plaintext)); + memcpy(src_data_addr, cipher_crc_cap_check_plaintext, + sizeof(cipher_crc_cap_check_plaintext)); phy_src_addr = rte_mem_virt2iova(src_data_addr); if (phy_src_addr == 0 || phy_src_addr == RTE_BAD_IOVA) { @@ -892,9 +891,8 @@ qat_cq_get_fw_cipher_crc_cap(struct qat_qp *qp) auth_param = (void *)((uint8_t *)cipher_param + ICP_QAT_FW_HASH_REQUEST_PARAMETERS_OFFSET); - rte_memcpy(cipher_param->u.cipher_IV_array, - cipher_crc_cap_check_iv, - sizeof(cipher_crc_cap_check_iv)); + memcpy(cipher_param->u.cipher_IV_array, cipher_crc_cap_check_iv, + sizeof(cipher_crc_cap_check_iv)); cipher_param->cipher_offset = cipher_crc_cap_check_cipher_offset; cipher_param->cipher_length = diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c index 559948a46a..5bcbefe395 100644 --- a/drivers/compress/qat/qat_comp.c +++ b/drivers/compress/qat/qat_comp.c @@ -375,7 +375,7 @@ qat_comp_build_multiple_requests(void *in_op, struct qat_qp *qp, QAT_DP_LOG(DEBUG, "op %p, parent_cookie %p", op, parent_cookie); /* copy original op to the local variable for restoring later */ - rte_memcpy(&op_backup, op, sizeof(op_backup)); + memcpy(&op_backup, op, sizeof(op_backup)); parent_cookie->nb_child_responses = 0; parent_cookie->nb_children = 0; @@ -401,7 +401,7 @@ qat_comp_build_multiple_requests(void *in_op, struct qat_qp *qp, } /* prepare local dst mbuf */ - rte_memcpy(&dst_mbuf, op->m_dst, sizeof(dst_mbuf)); + memcpy(&dst_mbuf, op->m_dst, sizeof(dst_mbuf)); rte_pktmbuf_reset(&dst_mbuf); dst_mbuf.buf_len = dst_data_size; dst_mbuf.data_len = dst_data_size; @@ -457,7 +457,7 @@ qat_comp_build_multiple_requests(void *in_op, struct qat_qp *qp, if (ret < 0) { QAT_DP_LOG(WARNING, "Failed to build child descriptor"); /* restore op and clear cookie */ - rte_memcpy(op, &op_backup, sizeof(op_backup)); + memcpy(op, &op_backup, sizeof(op_backup)); parent_cookie->split_op = 0; parent_cookie->nb_children = 0; return ret; @@ -468,7 +468,7 @@ qat_comp_build_multiple_requests(void *in_op, struct qat_qp *qp, } /* restore backed up original op */ - rte_memcpy(op, &op_backup, sizeof(op_backup)); + memcpy(op, &op_backup, sizeof(op_backup)); if (nb_descr != num_descriptors_built) QAT_DP_LOG(ERR, "split op. expected %d, built %d", -- 2.43.0