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 06ADD43DC8; Tue, 2 Apr 2024 23:58:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B2ED640E5E; Tue, 2 Apr 2024 23:56:08 +0200 (CEST) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mails.dpdk.org (Postfix) with ESMTP id D574640A7D for ; Tue, 2 Apr 2024 23:55:57 +0200 (CEST) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1e0bfc42783so47919695ad.0 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=1712094957; x=1712699757; 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=XLzy0zvtWiuJ4FsDQbrn4nh0GYt6lqFH/V8BgQO8VtPMv1O0TG78yIrIoE2InArrEp 34sqsgk9sYqgP/9Qc6zXNx+VVjS8q4IhdCdsIgxu1AIZ+UHgqMKLVFKnmBrGSkPITKav 4Eok3z2/ta0AKjk3rSUmtWjrcI5xE6xedRsIMEHhGbWnWdX3xNDFDlj/9OrP6dJTPmc9 7XTlX7YQEXF13S0zMyUgMfMMJ69VJRIDWvi9xE4ymGS9MFFgtxJSJI9h0PZrF7fmp527 zEHCIie20U+eM0Fh0EJvHMvKhIIfJ3VKaywm7pnBms9y49qd+358AO/LSY8bzF2hnXHM YRMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712094957; x=1712699757; 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=hx/FVZRtKRmXS+WnECfCS5uuXW61OTP2dACCS9+SfWi0ze73lrCtuQYTm+NNXUYpD5 EqaxQ7hXeD/Mo2RsU/gAS1wnczfhEEq4mE0U4UScrdd8XfvFxe2dZTJHeRRfTf0RIKFI 8kMcKOghpI9SKRhH64MjvRiWQSFPUWM0m2up17ZqH/K7Fo5hFUivMIuCVVY98esPcIcq bV9VUwAiTJJpcXdOo7C5GAOQNdKXH2bcQhlMtPzo9sm5XO2ZQGqRVg1OIi+gUSSr9rvI wGrmXMHYeyvQXSBKSjXX8eoBZKRgshfvvDZ2wnmaCaO1Km1i9KHLlrRHOFkZJjmk2WNE MOhw== X-Gm-Message-State: AOJu0YypIKwAlENzVfn92tKnWSmHFz8oD8oI3JStjDm6oAXgv0JaQFpM bELLR4AY1wuvbxUwESyGx3Jcktk3EN/Hzwa5k+64LuJtGw066kM6Zbd2tcDRX9Mobh49o9DPoxa iOko= X-Google-Smtp-Source: AGHT+IFIq8uw5JE5jBCATYMWHVRgB9Mu+XIhcdFhRRHy1rwtqUfEbyEuwtEExO8wYmRk1KvYqwuZtQ== X-Received: by 2002:a17:902:e888:b0:1e0:b5d4:9fa3 with SMTP id w8-20020a170902e88800b001e0b5d49fa3mr17415740plg.2.1712094957132; Tue, 02 Apr 2024 14:55:57 -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.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 14:55:56 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jingjing Wu , Kai Ji , Fan Zhang , Ashish Gupta Subject: [PATCH v3 18/30] common: replace use of fixed size rte_memcpy Date: Tue, 2 Apr 2024 14:50:34 -0700 Message-ID: <20240402215502.278838-19-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 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