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 9F7AC43C12; Fri, 1 Mar 2024 18:19:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E21F433D7; Fri, 1 Mar 2024 18:17:44 +0100 (CET) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mails.dpdk.org (Postfix) with ESMTP id A8AB543355 for ; Fri, 1 Mar 2024 18:17:31 +0100 (CET) Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1dcab44747bso21663215ad.1 for ; Fri, 01 Mar 2024 09:17:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709313451; x=1709918251; 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=TUmCVyDXuNMs4d1jULNXaUlXYnRopcpU3B0uss2CZ9kL9JzruoA9+2fmpbl75CMlRp 7sF7wbcmGE7OTsDwvofM8Du9/NJIRC4tmjk15bXPas2zcbN2nZwpZ9QNZCL4dST6AnWU 9ChTRrxeIXVPr/kmT2eSN9NbTNhYjahK6AtpXcQDQFAfpbgTCwWghkx+TI9kyri+viZk dSQvpiIDoHxSWsaBHcb8VhstBP/jXWwOOfU1xDfP/WgFihYesldtUj1SxK+GU3uAV+68 Y/QSh3+R+8nL5VCXXZDoL+np8r65eEhuS4bT3idzQTnpT0ClO5NMi1MVcEd6aGJXjf7g xBWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709313451; x=1709918251; 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=I5VzNfPoNZIFG+Gk7M0CsyZzyxTO64FOdBBT92Vo/lOjpJiNZOu+Bd/y3Jnic+DbFF /SvHza0VSR/xyPfrs+ATPCRW03pTASXjuknKa6G4mMSpqiYqCKTHxZBbiTuKSEbmxVSE z6rtYGU8D3SDMLOf95PQAU1G0gXgNXxEyp/H35MSo6HzuuKL88Pqq9AzthSpRxiL5Mhv Qkd3iBsk5QsLKxUmCBZzA7dmEvcsYQDaYJcdAcWfWf2FpOPUcKuC16Z/s94O2JEoE/PN rS7EbQGP9fVcjXsNNpwr2gIacolcLIRNiO8EL3Q8HhCkPMeMQF/1RueVt7zAlBTv9so1 doFQ== X-Gm-Message-State: AOJu0YypJwEKI5hWeP+3JlMZV+gE816StY0GCeJHN64e9G4UnIhgfphJ z10Dfw8bnhKPF9xcrlL+5C3gIu5lUmyrZT5sceDL+aRKxKW5vvgk/SrLPtsoU3jbgvApUlSNdsZ kpRZHOg== X-Google-Smtp-Source: AGHT+IEuJmKG2k0Av5O5VOHuV4w1ztdNfBARO3rcgGe0Kne/+HAQbxi0ca6EMIpqDPsgRD1BX4HZ7g== X-Received: by 2002:a17:902:c105:b0:1d7:88de:cff1 with SMTP id 5-20020a170902c10500b001d788decff1mr2108780pli.53.1709313450816; Fri, 01 Mar 2024 09:17:30 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:17:30 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v2 18/71] net/pcap: replace use of fixed size rte_memcpy Date: Fri, 1 Mar 2024 09:15:14 -0800 Message-ID: <20240301171707.95242-19-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/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