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 D1FF643BAE; Fri, 1 Mar 2024 00:02:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 116474334C; Fri, 1 Mar 2024 00:01:02 +0100 (CET) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mails.dpdk.org (Postfix) with ESMTP id 9094342FD1 for ; Fri, 1 Mar 2024 00:00:17 +0100 (CET) Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-6e59bbdd8c7so970721b3a.3 for ; Thu, 29 Feb 2024 15:00:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709247617; x=1709852417; 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=ADwliB5YG1I5rnLwuOE9AHiZ+t1JRTJrOeqRGTG73M4=; b=JVTGvrsra35WUn8tb4YlNlOTdUNP4oE+55lFxEWtM7Wwq3sgKXPCaOPeweFbagm40G Tc5+ur23COIdndc17daG9/c+L/a9tIPNv2u588LJo7EDU0v1HafC762RS7viw/LLUpxt 12YQxF20g5T6BsQJSwXOOjAEib5+dUh+3rSODviUofLB6DijwAYkx4kLYyBKpbYmR6Jm D99PmicfttribX1a5B48E8aTtX2wnI9+tWHuJ+23sRhjyM9jJj1qyrxR0vFQT70rA0qx vi/iVarXNAPxZ5mbpRyUCkN+hqEz4XOLdotItj03euDg5ZEknoH4uQlvN82eRwtpJVrT Qt0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709247617; x=1709852417; 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=ADwliB5YG1I5rnLwuOE9AHiZ+t1JRTJrOeqRGTG73M4=; b=Pf0kFwtAKn986Je0JLtNg7HxoRUHH3R77RIPo7XrIsmXDXDepKjifz1lAwtRnnFXbn 8qCafXX9P5MG6J1c9jxNRwBkBOpncpA+EK1RsKDPaymuxjhZbd5rMRJHpSOoMEC/ByGF okexL3vv07BqTAZ9LEmQUPHZAimuEbOHM5N02tn1larsM13SPysh7hkZkljsn9NOzRXk X9BupTDiSi75l5PFBarEl/HRtB1ztkBe7altbF5x1ImQOd0008ezXghdpqXwqV9HMtqT fyHwo1SHQLKaSb6c8IYluYnCy3++78viW6ocLfAOawNjRQdvRX7uH9EWanvLItCdnmNf PAEA== X-Gm-Message-State: AOJu0YwYP2nkdArQ90CKvx7V35KkXSxFTLIhJgvMKD3ZoEGCRCs7PgtQ 26KwTJ/UEzMdlRCo33zgJhTnoontvrpa9QD3/x2lcfvUFV0NpXMFWnZAXa4S+TpZXR3njhehzj2 X X-Google-Smtp-Source: AGHT+IHie2txYkPqc7N9J+Jt97nj/iJJU8/Rzb1vnd2KcqmK4QrlmvOEB0OMK5OtiHiiqRYegy4B+w== X-Received: by 2002:a05:6a20:93a0:b0:1a0:e463:fcad with SMTP id x32-20020a056a2093a000b001a0e463fcadmr5737032pzh.2.1709247615611; Thu, 29 Feb 2024 15:00:15 -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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 15:00:15 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH 20/71] net/tap: replace use of fixed size rte_memcpy Date: Thu, 29 Feb 2024 14:58:07 -0800 Message-ID: <20240229225936.483472-21-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/tap/rte_eth_tap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 69d9da695bed..518619c53b4a 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -1404,11 +1404,11 @@ tap_mac_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr) mac_addr)) mode = LOCAL_AND_REMOTE; ifr.ifr_hwaddr.sa_family = AF_LOCAL; - rte_memcpy(ifr.ifr_hwaddr.sa_data, mac_addr, RTE_ETHER_ADDR_LEN); + memcpy(ifr.ifr_hwaddr.sa_data, mac_addr, RTE_ETHER_ADDR_LEN); ret = tap_ioctl(pmd, SIOCSIFHWADDR, &ifr, 1, mode); if (ret < 0) return ret; - rte_memcpy(&pmd->eth_addr, mac_addr, RTE_ETHER_ADDR_LEN); + memcpy(&pmd->eth_addr, mac_addr, RTE_ETHER_ADDR_LEN); if (pmd->remote_if_index && !pmd->flow_isolate) { /* Replace MAC redirection rule after a MAC change */ ret = tap_flow_implicit_destroy(pmd, TAP_REMOTE_LOCAL_MAC); @@ -2010,7 +2010,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name, if (rte_is_zero_ether_addr(mac_addr)) rte_eth_random_addr((uint8_t *)&pmd->eth_addr); else - rte_memcpy(&pmd->eth_addr, mac_addr, sizeof(*mac_addr)); + memcpy(&pmd->eth_addr, mac_addr, sizeof(*mac_addr)); } /* @@ -2033,8 +2033,8 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name, if (pmd->type == ETH_TUNTAP_TYPE_TAP) { memset(&ifr, 0, sizeof(struct ifreq)); ifr.ifr_hwaddr.sa_family = AF_LOCAL; - rte_memcpy(ifr.ifr_hwaddr.sa_data, &pmd->eth_addr, - RTE_ETHER_ADDR_LEN); + memcpy(ifr.ifr_hwaddr.sa_data, &pmd->eth_addr, + RTE_ETHER_ADDR_LEN); if (tap_ioctl(pmd, SIOCSIFHWADDR, &ifr, 0, LOCAL_ONLY) < 0) goto error_exit; } @@ -2091,8 +2091,8 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name, pmd->name, pmd->remote_iface); goto error_remote; } - rte_memcpy(&pmd->eth_addr, ifr.ifr_hwaddr.sa_data, - RTE_ETHER_ADDR_LEN); + memcpy(&pmd->eth_addr, ifr.ifr_hwaddr.sa_data, + RTE_ETHER_ADDR_LEN); /* The desired MAC is already in ifreq after SIOCGIFHWADDR. */ if (tap_ioctl(pmd, SIOCSIFHWADDR, &ifr, 0, LOCAL_ONLY) < 0) { TAP_LOG(ERR, "%s: failed to get %s MAC address.", -- 2.43.0