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 B7F9243C12; Fri, 1 Mar 2024 18:20:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 23A684342B; Fri, 1 Mar 2024 18:17:56 +0100 (CET) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mails.dpdk.org (Postfix) with ESMTP id BA4464337F for ; Fri, 1 Mar 2024 18:17:39 +0100 (CET) Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1dc49b00bdbso24001625ad.3 for ; Fri, 01 Mar 2024 09:17:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709313459; x=1709918259; 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=XUHvwBLFAbLslSMTmZSKyZCQSLx2BGir5+OP+Lo8mC8=; b=rSqpm0XCgNVBJglCNgmn8O7YAkrZ0rKmQy7fwcXzuY1UFkE6AXOz7RoFkBRGE4ctdT AAPx+Zn4voixiF3O32aFkR/arWYjoUij7Jm47RJQxTd5IF+r6tRT4jLxDhpAukyq6Hq5 JK0yJoELu/zckXVAZjyN00K3i4joXj1cMxRyDC9URmAPDu2a1TCnZC9mIrISHKsMh5S/ h3Aeqv0jnIC3BGJIyDarXOLbkRvG87fZEdjnqA8LvlUMdCf3GVD7ER0lSGGbpGq24ema mm6aM9TGb1zPq1mGMJolQ7YCy6YheHVtkLFBK9ORXAdrSMPJCVHXYR6y4aDF56kxCiXI J1UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709313459; x=1709918259; 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=XUHvwBLFAbLslSMTmZSKyZCQSLx2BGir5+OP+Lo8mC8=; b=G4/jGIomptWRn20zE6ObCITjzRY6QH5eudXddEUdWnkIlLFi8tRuL5TAeeRuxApWYo m+zKwEL9UVQsVYYxOJHQLIwXDMyMv3AlnQwuU8ltMM1nutcqKPVkUghdR607SFj1VHvB 3nJyFXki81t7izSb7ULlRw6/LT7OdCDyLjp2TVVp3m/XS+Qv6o8qYaUSA86Hzk0GUH5E /oEOKjNhBUVq0ZiGAKykYwvQiMAWfo0yjrEvvy217UfbNnXRXkvpOs5obEYzVVpPEred LYqrW2EcbBmSun2xjsksdYW4r0hC9F4OtxrIk1IK6Z35W4So+OO/LkIOAlfPTckazbym iSDQ== X-Gm-Message-State: AOJu0Yzxjx6Uekt2ni9Ba7AQfty/B/melHOcFFSpjMDVJYYeWXW5zwWT 5HRYXMLFWSKoo7lgYtwW05mXlNiDZNDTozyewbdNeZG/B4PicmSg2IgB1zne1bB5JNWRHXqlU77 fY6rVGg== X-Google-Smtp-Source: AGHT+IGrVZbOEIbWxodtekKSCL7x/N6iaWdlK4YhE1hdDdhPs5oci+cGMDoIdur6MoXJL+nMuCJS7g== X-Received: by 2002:a17:902:8c93:b0:1dc:b3a3:ca73 with SMTP id t19-20020a1709028c9300b001dcb3a3ca73mr2025763plo.38.1709313458972; Fri, 01 Mar 2024 09:17:38 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id j14-20020a170902da8e00b001dc8d6a9d40sm3695764plx.144.2024.03.01.09.17.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:17:38 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jingjing Wu Subject: [PATCH v2 28/71] net/idpf: replace use of fixed size rte_memcpy Date: Fri, 1 Mar 2024 09:15:24 -0800 Message-ID: <20240301171707.95242-29-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240301171707.95242-1-stephen@networkplumber.org> References: <20240229225936.483472-1-stephen@networkplumber.org> <20240301171707.95242-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/net/idpf/idpf_ethdev.c | 7 ++++--- drivers/net/idpf/idpf_rxtx.c | 10 ++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c index 86151c9ec9fa..9cf33c4b7058 100644 --- a/drivers/net/idpf/idpf_ethdev.c +++ b/drivers/net/idpf/idpf_ethdev.c @@ -1088,8 +1088,8 @@ idpf_handle_virtchnl_msg(struct idpf_adapter_ext *adapter_ex) return; } - rte_memcpy(adapter->mbx_resp, ctlq_msg.ctx.indirect.payload->va, - IDPF_DFLT_MBX_BUF_SIZE); + memcpy(adapter->mbx_resp, ctlq_msg.ctx.indirect.payload->va, + IDPF_DFLT_MBX_BUF_SIZE); mbx_op = rte_le_to_cpu_16(ctlq_msg.opcode); vc_op = rte_le_to_cpu_32(ctlq_msg.cookie.mbx.chnl_opcode); @@ -1202,7 +1202,8 @@ idpf_adapter_ext_init(struct rte_pci_device *pci_dev, struct idpf_adapter_ext *a strncpy(adapter->name, pci_dev->device.name, PCI_PRI_STR_SIZE); - rte_memcpy(&base->caps, &req_caps, sizeof(struct virtchnl2_get_capabilities)); + memcpy(&base->caps, &req_caps, + sizeof(struct virtchnl2_get_capabilities)); ret = idpf_adapter_init(base); if (ret != 0) { diff --git a/drivers/net/idpf/idpf_rxtx.c b/drivers/net/idpf/idpf_rxtx.c index 64f22355804e..da659e16531c 100644 --- a/drivers/net/idpf/idpf_rxtx.c +++ b/drivers/net/idpf/idpf_rxtx.c @@ -76,7 +76,7 @@ idpf_dma_zone_reserve(struct rte_eth_dev *dev, uint16_t queue_idx, else ring_size = RTE_ALIGN(len * sizeof(struct idpf_base_tx_desc), IDPF_DMA_MEM_ALIGN); - rte_memcpy(ring_name, "idpf Tx ring", sizeof("idpf Tx ring")); + memcpy(ring_name, "idpf Tx ring", sizeof("idpf Tx ring")); break; case VIRTCHNL2_QUEUE_TYPE_RX: if (splitq) @@ -85,17 +85,19 @@ idpf_dma_zone_reserve(struct rte_eth_dev *dev, uint16_t queue_idx, else ring_size = RTE_ALIGN(len * sizeof(struct virtchnl2_singleq_rx_buf_desc), IDPF_DMA_MEM_ALIGN); - rte_memcpy(ring_name, "idpf Rx ring", sizeof("idpf Rx ring")); + memcpy(ring_name, "idpf Rx ring", sizeof("idpf Rx ring")); break; case VIRTCHNL2_QUEUE_TYPE_TX_COMPLETION: ring_size = RTE_ALIGN(len * sizeof(struct idpf_splitq_tx_compl_desc), IDPF_DMA_MEM_ALIGN); - rte_memcpy(ring_name, "idpf Tx compl ring", sizeof("idpf Tx compl ring")); + memcpy(ring_name, "idpf Tx compl ring", + sizeof("idpf Tx compl ring")); break; case VIRTCHNL2_QUEUE_TYPE_RX_BUFFER: ring_size = RTE_ALIGN(len * sizeof(struct virtchnl2_splitq_rx_buf_desc), IDPF_DMA_MEM_ALIGN); - rte_memcpy(ring_name, "idpf Rx buf ring", sizeof("idpf Rx buf ring")); + memcpy(ring_name, "idpf Rx buf ring", + sizeof("idpf Rx buf ring")); break; default: PMD_INIT_LOG(ERR, "Invalid queue type"); -- 2.43.0