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 BB5E943C12; Fri, 1 Mar 2024 18:24:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EC7E0434F0; Fri, 1 Mar 2024 18:18:37 +0100 (CET) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mails.dpdk.org (Postfix) with ESMTP id E082043443 for ; Fri, 1 Mar 2024 18:18:05 +0100 (CET) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-6e56a5b2812so1573852b3a.1 for ; Fri, 01 Mar 2024 09:18:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709313485; x=1709918285; 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=9MG+vFZ0m+Ugqp5xyv+9jw4Ta8YjvNueglpe3DucYSs=; b=lvoIeESY4dGZusYnSrpD0ijoKjk6ws2bC7YeLe2mjbDvfRM6808kQ2+k8MMhCSuK1x rjQgic98KDwKgC3rXb2QBDiIUUvRQFtPnJveA3y93DXODOOXq+tYnH4UhCr2qa/oOQgq Ae1aJ/ajwvwE5G5xrBpkGxbH0nPZyltJ27QVNtLPZz6Td6KISIvpPEIIodeGUvQEn9r2 1DzQ4VHkxJSVIpP2/HJGAP448qz1wZBZLDLC5Rl3DzPLGCCMjnyvhIWrDCvkrY0wQLXs JvarNorcINQSJhMqc8gFGPhFv1A5nqiETQIpKLiB4vjPN9GqrvNyKMXTCuLmoemxuON4 uPTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709313485; x=1709918285; 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=9MG+vFZ0m+Ugqp5xyv+9jw4Ta8YjvNueglpe3DucYSs=; b=qPewfXlDkHU8CyGXNZcPtR2gliN5kL9xjVl4/JtcCY33/fsraBxGlk9orb9G1x5ua2 xfgdJ+Cj2sioDEvuFXPr8nVfEtyUl4XrGfvUrEWHFHBQrX2VfGLwmlWoGEWHfFjUXPEP uBeprwpiiuXv46o7PzTTjv0CsYFtZWptqOfFzq0JFft62mzhX0zh7E4TLspl81IifNG2 /hdmqH7MuTL0x8WUDTQQ24YSVluNj5akENAR/vDmGMJ/pQ1fggFpQbL9d+rrOuOehcrY 5gOapKByRWGm1xZv9oL0DfZmc+UPObDKCv0vjaQi1/G0xZQUXonQZNJ+z3gY67JTVQZl 3Igg== X-Gm-Message-State: AOJu0YxcuDlESTSiCkAv0SB2yEGemeyweAzaK/SSZpg2n9f1Jr6yNOJz 0lZjUO+B94ThssiADo21Z47IrGmdQipaD8PmgSjDy90WT2Je7weGfGfbwkbPnFvPjZoj6uHkrQs N1O5Rvw== X-Google-Smtp-Source: AGHT+IFM40c1+TbD5Hq6Y+pxxrS6hNVKU/QG0fzgqe694/TK7ub80jc6lYC+X3MGeGtSpbSMjE2pMg== X-Received: by 2002:a05:6a20:428e:b0:1a1:43c1:84f8 with SMTP id o14-20020a056a20428e00b001a143c184f8mr598453pzj.8.1709313485137; Fri, 01 Mar 2024 09:18:05 -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.18.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:18:04 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v2 61/71] net/e1000: replace use of fixed size rte_memcpy Date: Fri, 1 Mar 2024 09:15:57 -0800 Message-ID: <20240301171707.95242-62-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/e1000/em_rxtx.c | 1 - drivers/net/e1000/igb_flow.c | 22 ++++++++++------------ drivers/net/e1000/igb_pf.c | 7 +++---- drivers/net/e1000/igb_rxtx.c | 1 - 4 files changed, 13 insertions(+), 18 deletions(-) diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c index df5fbb782361..3a069ce33ecd 100644 --- a/drivers/net/e1000/em_rxtx.c +++ b/drivers/net/e1000/em_rxtx.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/net/e1000/igb_flow.c b/drivers/net/e1000/igb_flow.c index ea9b290e1cb5..8bca48496035 100644 --- a/drivers/net/e1000/igb_flow.c +++ b/drivers/net/e1000/igb_flow.c @@ -1484,9 +1484,9 @@ igb_flow_create(struct rte_eth_dev *dev, goto out; } - rte_memcpy(&ntuple_filter_ptr->filter_info, - &ntuple_filter, - sizeof(struct rte_eth_ntuple_filter)); + memcpy(&ntuple_filter_ptr->filter_info, + &ntuple_filter, + sizeof(struct rte_eth_ntuple_filter)); TAILQ_INSERT_TAIL(&igb_filter_ntuple_list, ntuple_filter_ptr, entries); flow->rule = ntuple_filter_ptr; @@ -1511,9 +1511,9 @@ igb_flow_create(struct rte_eth_dev *dev, goto out; } - rte_memcpy(ðertype_filter_ptr->filter_info, - ðertype_filter, - sizeof(struct rte_eth_ethertype_filter)); + memcpy(ðertype_filter_ptr->filter_info, + ðertype_filter, + sizeof(struct rte_eth_ethertype_filter)); TAILQ_INSERT_TAIL(&igb_filter_ethertype_list, ethertype_filter_ptr, entries); flow->rule = ethertype_filter_ptr; @@ -1536,9 +1536,8 @@ igb_flow_create(struct rte_eth_dev *dev, goto out; } - rte_memcpy(&syn_filter_ptr->filter_info, - &syn_filter, - sizeof(struct rte_eth_syn_filter)); + memcpy(&syn_filter_ptr->filter_info, &syn_filter, + sizeof(struct rte_eth_syn_filter)); TAILQ_INSERT_TAIL(&igb_filter_syn_list, syn_filter_ptr, entries); @@ -1562,9 +1561,8 @@ igb_flow_create(struct rte_eth_dev *dev, goto out; } - rte_memcpy(&flex_filter_ptr->filter_info, - &flex_filter, - sizeof(struct igb_flex_filter)); + memcpy(&flex_filter_ptr->filter_info, &flex_filter, + sizeof(struct igb_flex_filter)); TAILQ_INSERT_TAIL(&igb_filter_flex_list, flex_filter_ptr, entries); flow->rule = flex_filter_ptr; diff --git a/drivers/net/e1000/igb_pf.c b/drivers/net/e1000/igb_pf.c index c7588ea57eaa..efb806af5692 100644 --- a/drivers/net/e1000/igb_pf.c +++ b/drivers/net/e1000/igb_pf.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -290,7 +289,7 @@ igb_vf_reset(struct rte_eth_dev *dev, uint16_t vf, uint32_t *msgbuf) /* reply to reset with ack and vf mac address */ msgbuf[0] = E1000_VF_RESET | E1000_VT_MSGTYPE_ACK; - rte_memcpy(new_mac, vf_mac, RTE_ETHER_ADDR_LEN); + memcpy(new_mac, vf_mac, RTE_ETHER_ADDR_LEN); e1000_write_mbx(hw, msgbuf, 3, vf); return 0; @@ -308,8 +307,8 @@ igb_vf_set_mac_addr(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf) if (rte_is_unicast_ether_addr((struct rte_ether_addr *)new_mac)) { if (!rte_is_zero_ether_addr((struct rte_ether_addr *)new_mac)) - rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac, - sizeof(vfinfo[vf].vf_mac_addresses)); + memcpy(vfinfo[vf].vf_mac_addresses, new_mac, + sizeof(vfinfo[vf].vf_mac_addresses)); hw->mac.ops.rar_set(hw, new_mac, rar_entry); rah = E1000_READ_REG(hw, E1000_RAH(rar_entry)); rah |= (0x1 << (E1000_RAH_POOLSEL_SHIFT + vf)); diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c index 5cafd6f1ce30..4a41a3cea5fc 100644 --- a/drivers/net/e1000/igb_rxtx.c +++ b/drivers/net/e1000/igb_rxtx.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include -- 2.43.0