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 4FBF344093; Wed, 22 May 2024 05:33:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 615AC41141; Wed, 22 May 2024 05:31:21 +0200 (CEST) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mails.dpdk.org (Postfix) with ESMTP id 43B6840E96 for ; Wed, 22 May 2024 05:30:53 +0200 (CEST) Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1e651a9f3ffso104857605ad.1 for ; Tue, 21 May 2024 20:30:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348652; x=1716953452; 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=d/ajVIzG9e/XFh13Vw+EnQIFgwbTkL1BHgO8gTq5sKY=; b=xZMW/F9zgkzxPs+CNqWoJG/THbCStDhAuwluQa4dIFVAQQeLNa1NcFSo9zzgtdMEM6 ns6oIqs/CUgJ11bYiczDGRaHIWVr1jyYcI1ls7xprvVkZSo3s+PUoNU+WE+ZxZjmqbRT XNwNxhtu8LPogDZ8LbPZAbOCzQYZ9xmdC38AKjaUwLr4/TtN7MxH/Yg+renN6wolm98r Glrmj1TS3ArnZYlF4ybylkJvT4gO7g01Be93ZmHCVT1h1EWvOOPQIzo4+GIaLCyIxQVM +EaO9TB87jvxaBYIcbBhR4LMybByzjrs+YhX/u/U2YRhFkopdBK4UDuBGWRyf/AZxHA6 BZYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348652; x=1716953452; 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=d/ajVIzG9e/XFh13Vw+EnQIFgwbTkL1BHgO8gTq5sKY=; b=N5O1R9o4eRYgnepHTGZKTLIu1wD3sDk8tkg7/woddfTji+JStdUyYEWYKfeMRiNbAm IRgk1jIuykTZYlg925HS0Lw1gKxEavXsBAlfqwP7XYbHh3V4gonr+ArJudg21peQbXpe /pK2oRojxtHhV4EVsSOw/MBDn3tQCNJnnWPFV7N1ZSWQZh2YNUmrO7H7fjsWvLKQusuI /EraVK42WZgC5ojkzfa62i50DAv4y/15qYT/zN7SOjv22Egt24wCmm+gTHq5G3ak5cM5 T94o/l1WV0rKlJz2Ly3X7F0bkzgpXGkpSI87FU1vhF60+AN4eUI1sceIGGUCVLHpgF6j U4hA== X-Gm-Message-State: AOJu0YxydGICrA/KnVTmBD41eMOf7hLle3ZtIJq9fm5RAbJ2lnhqrriw Hp0iaZ6caNUbtdDkx3oiew3PlblThiO1e2mqaBUC5QlLN9w8SQjXleUsSDaOSaX2WCttFa71ljY avjs= X-Google-Smtp-Source: AGHT+IHBC2CB2/ZKp5LhSk4RRIrBleuFfBm0yvvUYW47JjrDskkf7CHmZkGyb2abaBEwqGjN2IJfSw== X-Received: by 2002:a17:902:d48f:b0:1f2:f6ca:fbc1 with SMTP id d9443c01a7336-1f31c94bdd6mr8808865ad.8.1716348652518; Tue, 21 May 2024 20:30:52 -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 30/32] net/tap: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:57 -0700 Message-ID: <20240522033009.143100-31-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/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 69d9da695b..518619c53b 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