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 7A4D944093; Wed, 22 May 2024 05:34:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3DE85427D7; Wed, 22 May 2024 05:31:24 +0200 (CEST) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id 031EB40ED1 for ; Wed, 22 May 2024 05:30:55 +0200 (CEST) Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1ecddf96313so96840955ad.2 for ; Tue, 21 May 2024 20:30:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348655; x=1716953455; 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=4rGr4piL63algCZdB0mHhiNEAEWnec1biLb7c+3SEa0=; b=iCZsDLOdHb0K5ZEz3D3HmcXGCDF6lkgyE000TsIPDsWDWrUA6aNBSB8XG+uKTDmsXG V/ThULDIzoro4fRo7qTLzVdtdT9eUk4TWT7ZCKnYdpKeSRRud4hbuVmAJp3T4SZn+9CX WybIQE+nXcuOHxbMw/m6Lw9NJo6WAwDKjR/gvNTVjJCIqMYSw2tsXREbfLE9KIiu22E+ 0ne/5ZEOeFduTvXSTuLc1jvdqyIwxK7+jtFIBONN0rgkNvkwcjIYZhjuJLKbvCPvI6Rp GHwp3aa92ZJutSP37TXCQ2uKjKX7CiZ3obrKpVCXWkZemSmBPwbQAiD1FMrvEZmBUHcJ KGgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348655; x=1716953455; 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=4rGr4piL63algCZdB0mHhiNEAEWnec1biLb7c+3SEa0=; b=pngChzM9P07+fl4Qjt40QDVL1xkhxUu4+e/3i3gqFotkZ/jfCWKCRY4KHDA2+VsSdg mgo8buljLR5sWgh/esXXBSD+VMzTA9UZje/zsqjnzl30fLRx432Za5OFDCHk4VdNOdjL zJ4y/KhaH/0F0pU9NeNOVYavRM79pv14Hlc8fMks1gZBgTJcFG67oqFyltQV7ME7dZRT uRGbqYKvlnzdQRDx3Prvi6JPjykS7DFJhpwksMQU4BkZVkQ3M2Y3QS8B/4s+ldM8e98O P6yWnEK2U7+b79S/eEJMX3RTa7yiMDe9/Tp+NoI6ti87VE+nNoBAMyJhIRw8/Zk2s1s0 y5ZQ== X-Gm-Message-State: AOJu0Yzt51xE5E2xWjwm55n7OahJD0R1JeAEhky2xfbg42xIihVodd9Q FdlRy9SnpQy4jXig62rf7xATgajMzgY8aXNlBHCGd+9V3i2yjnWhamlJBAApXmR+2bNyi8ozuk2 L5NY= X-Google-Smtp-Source: AGHT+IHlPQ7T0JrJ1rsY+iHOV2Z1mPyxncJxuPXH2D63NV1nGZh48CPC5PglTm9UHNRNRvKDnTEbQg== X-Received: by 2002:a17:902:ce91:b0:1f2:fd49:9fcc with SMTP id d9443c01a7336-1f31c990bbbmr11121855ad.34.1716348653272; Tue, 21 May 2024 20:30:53 -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.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:52 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v5 31/32] net/pcap: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:58 -0700 Message-ID: <20240522033009.143100-32-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/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 bfec085045..54f0dfffbd 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 20556b3e92..d395a5957d 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 97033f57c5..fc79ad6cdf 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