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 781E743C12; Fri, 1 Mar 2024 18:19:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA41B433E4; Fri, 1 Mar 2024 18:17:46 +0100 (CET) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id 55D7843365 for ; Fri, 1 Mar 2024 18:17:33 +0100 (CET) Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1d7232dcb3eso18700375ad.2 for ; Fri, 01 Mar 2024 09:17:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709313452; x=1709918252; 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=QMm8f9OItygIVIpCQPBNdTWZi96TgcrDTY0SFFfhB0Y+2Ho1dleHhtVYqHB/aU6tEW JsTqVz4ZUlRQpdKpK4J91ggio4Wbo05mCFsFZ3DU9M4pUUlvWFaVD+ZsXx/tKYX+dguJ 1sSeSH33RMY8zv58qnIdjXrAdtLnlLxuPXQG85V+0kmeve0pNXqmjOGChuFvEwFDPla/ wV2bX2B0p6ZeK3bTuosF0VNfzUFn7oZ6uugQhTKt8JLl/cyfurXjvxi1oiUBn51ix6I7 TK4WGF6KT9EKMhqZQSwKRDuBJuVvM/Dhxiu8JY6eho9qlaCgEDwLIopSxCmxM439AcnB kxJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709313452; x=1709918252; 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=muLoXjcbmTB4xqKSG3S3gtXig/BQcLfnt+AfbxsKoU783y6nSFvA/Y0jnPvCEHk37e l844iyyLQ7wdDBfi9IC7CuNAOOAtQvD0lKfp+Q6DxzBJJE6WupPqOlstOcCpve/f0wDk PxFFHIxUQf2iMR+coGzPohY3ilnsgh7v8+TpdVQY/Sppfu2bhMlWAdW6A5+3mVlZ+pHR +waR47x4K60eHhKzs6MKwFFIc+4UFXn8Wg+z1bcpUYjqwsd+/zmBrh4aWIs3D8f17vAO ghPQfdqSA3t9OAVaMhNtqq5QAnIUxMgW/U+67+qVn+jkTShY2wBS8iJhmBdmskUzEFUj kBig== X-Gm-Message-State: AOJu0YzSeWcwO5OdVt+HHwckQjr67PDHiWfVx692h4EBXoAnRHPDpSLL RpNTDYUwkjCDKiW/YP0sbiN7D/zuelKEPadcmKmLI33lt7P/Xt0kkmL65gOKGpc4pwllXg2Lh7I Zr37yqQ== X-Google-Smtp-Source: AGHT+IGOmVlNvJtsnP2Pcn6dtId28ZSuEhHcEKw3sZOdPIUqxNuXlwuD1jgZuWLBgB0rPimhgtbpIg== X-Received: by 2002:a17:902:d488:b0:1dc:c17d:6edd with SMTP id c8-20020a170902d48800b001dcc17d6eddmr2704640plg.20.1709313452591; Fri, 01 Mar 2024 09:17:32 -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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:17:32 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v2 20/71] net/tap: replace use of fixed size rte_memcpy Date: Fri, 1 Mar 2024 09:15:16 -0800 Message-ID: <20240301171707.95242-21-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/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