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 7F06843BAE; Fri, 1 Mar 2024 00:02:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A638443322; Fri, 1 Mar 2024 00:00:57 +0100 (CET) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by mails.dpdk.org (Postfix) with ESMTP id 365CC402A2 for ; Fri, 1 Mar 2024 00:00:14 +0100 (CET) Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-5d8ddbac4fbso1295558a12.0 for ; Thu, 29 Feb 2024 15:00:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709247614; x=1709852414; 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=BWtdyG5rsTZMIzCe2l7ha4SnqMibQAxbFiLTEf2hi40=; b=YKUhT4NVY8L3kS2LLCuStUvoNw/YuvAyd5RpntO/b83SnC9Xv2ORmruFVJPePLAuka T0H/0XPlW2Xf2611ObI78h65OgsAfSLyMRDpV768YgcWjJ+YpYeTCLiQFtw2hb0x7a9B 9eaEmrx8dyW2jST7Kvxiue7m5luCsqsz/9nWkpi+QMr0JNaS9e9ayO3/fWyEKlEfTOCa GDYgzKn02BMGn/kSIgI68A0Ju4qhydonGO8k8CxWxzgXtbuPvTI+PBiD5aED+wCiZucZ QAIEy7GlaD61HWPZ8495Y9XTRr4WK2fpNtXGwNOroVdP/WIBMvUCBYlu65sj293lRo0y ItOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709247614; x=1709852414; 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=BWtdyG5rsTZMIzCe2l7ha4SnqMibQAxbFiLTEf2hi40=; b=a4lU5Qf8nuGa8yUzAvMwmJjog7yB8fJ/jevC88Qw1gEHuQ5/1xqbYhN2lMZc+bf6hM Zo4erxYlR5A1nSnDbiA11dyGSVcyERPtzJr9M5cdvLhU9/BW76SeQhPKYpp2R+u/gxlA UG1oI5IkuWZMTX7tQ0ASv3suA8jK2xChpipXTOQbtRUTqKEFf7WZ+eELZ5i3tTBceFJB +oGoL7kmSmJXWu8pNTOodlZncKGIM2V4KPMwA+6H4W4sl+qF88Rvu+L+z3nv5iuUpkLa Jpg0ip0IESkTx7jlFboi68iTFjgbFvTzNSa+ADyqcWaJoD5Eh/Y8XIrWNoOK/Q1QXTB5 KAlg== X-Gm-Message-State: AOJu0Yx6KKNRr3Bkr+MZwIGYh4zxdRG2M4OyLwqwVWTRkjsFM8Jo2LV+ /L5TDuh7GDAq9cxvypWahu1DJG6eTqEY1OVQoL2ZlOwR9Yi/uxE7mMp0xEhJmvDLu/dUo2i4WQd y X-Google-Smtp-Source: AGHT+IGIg/YPYgiRbysyPszaaZWRZqh+NzyQL3d5s257SduZ6vqZ0ZGfs7kJCJhWa4M/4APquHDT+w== X-Received: by 2002:a05:6a21:2d08:b0:19e:9a59:20df with SMTP id tw8-20020a056a212d0800b0019e9a5920dfmr4312876pzb.9.1709247613667; Thu, 29 Feb 2024 15:00:13 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id l22-20020a17090b079600b0029a8e5355fcsm1965578pjz.53.2024.02.29.15.00.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 15:00:12 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH 18/71] net/pcap: replace use of fixed size rte_memcpy Date: Thu, 29 Feb 2024 14:58:05 -0800 Message-ID: <20240229225936.483472-19-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240229225936.483472-1-stephen@networkplumber.org> References: <20240229225936.483472-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/pcap/pcap_ethdev.c | 2 +- drivers/net/pcap/pcap_osdep_freebsd.c | 2 +- drivers/net/pcap/pcap_osdep_linux.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c index bfec0850456f..54f0dfffbdd0 100644 --- a/drivers/net/pcap/pcap_ethdev.c +++ b/drivers/net/pcap/pcap_ethdev.c @@ -1270,7 +1270,7 @@ eth_pcap_update_mac(const char *if_name, struct rte_eth_dev *eth_dev, return -1; PMD_LOG(INFO, "Setting phy MAC for %s", if_name); - rte_memcpy(mac_addrs, mac.addr_bytes, RTE_ETHER_ADDR_LEN); + memcpy(mac_addrs, mac.addr_bytes, RTE_ETHER_ADDR_LEN); eth_dev->data->mac_addrs = mac_addrs; return 0; } diff --git a/drivers/net/pcap/pcap_osdep_freebsd.c b/drivers/net/pcap/pcap_osdep_freebsd.c index 20556b3e9215..d395a5957d56 100644 --- a/drivers/net/pcap/pcap_osdep_freebsd.c +++ b/drivers/net/pcap/pcap_osdep_freebsd.c @@ -52,7 +52,7 @@ osdep_iface_mac_get(const char *if_name, struct rte_ether_addr *mac) ifm = (struct if_msghdr *)buf; sdl = (struct sockaddr_dl *)(ifm + 1); - rte_memcpy(mac->addr_bytes, LLADDR(sdl), RTE_ETHER_ADDR_LEN); + memcpy(mac->addr_bytes, LLADDR(sdl), RTE_ETHER_ADDR_LEN); rte_free(buf); return 0; diff --git a/drivers/net/pcap/pcap_osdep_linux.c b/drivers/net/pcap/pcap_osdep_linux.c index 97033f57c5d9..fc79ad6cdf9e 100644 --- a/drivers/net/pcap/pcap_osdep_linux.c +++ b/drivers/net/pcap/pcap_osdep_linux.c @@ -35,7 +35,7 @@ osdep_iface_mac_get(const char *if_name, struct rte_ether_addr *mac) return -1; } - rte_memcpy(mac->addr_bytes, ifr.ifr_hwaddr.sa_data, RTE_ETHER_ADDR_LEN); + memcpy(mac->addr_bytes, ifr.ifr_hwaddr.sa_data, RTE_ETHER_ADDR_LEN); close(if_fd); return 0; -- 2.43.0