From patchwork Wed May 22 03:27:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140238 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AFAB644093; Wed, 22 May 2024 05:30:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0BF91402C8; Wed, 22 May 2024 05:30:30 +0200 (CEST) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id 4C13F4025C for ; Wed, 22 May 2024 05:30:27 +0200 (CEST) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1edfc57ac0cso6547275ad.3 for ; Tue, 21 May 2024 20:30:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348626; x=1716953426; 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=HmSOgtgWS/Zv6CMX3f5yCgcQDSHnZlsPruUu8U5+zn4=; b=Z5joMTBxR2BcmOMFo6tl61teT7+/EmAoZA5hkrILcdTXB/gGLPgEhKAK9U4oq9bkmM 13UiklKPGhm0I46T82pjNQXxghFCCpgJclF5IhPdLRoJiAcakZWVUPeyGbY02xxHfdLB oBiCfoKv3A0xqmLMIuKyQQ8wBmWD07HTm2+C2UqKFnhr7q7fC1B5reGPvkqTE65DsgFl MLzD7b3iPRpaSWEe5X6n7XQ9vevNJH5ewlfgxKSzjYAL7PTkT5hp6tqdVrRQCipZzZGY TPFEt/6zJCoWjQJZsfsJoawjDfjZvR/73Gvq+LiI7f460sEPj6DMOd23nRJAXSzggyAh s+Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348626; x=1716953426; 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=HmSOgtgWS/Zv6CMX3f5yCgcQDSHnZlsPruUu8U5+zn4=; b=PfbvzdjGYY4yd+Dr7DNj4x2KMFYTgvmB+vgbXuotbx/9Rvoa+8uYib57t7j2BUsFgn kanEz7sEpvNOzgbDPNIvFGZxj6TqqU+Mfctvq68bkbZtJaIF7PjeG3RVouE4IjQR0Lhg eMTXONz9rwzuLCEC60/SyOLQGOVnY1XsVaw/7ACCtZCpn5sXEv/w+fN5YS3WLi79IK0i yiAtRyAc/baoaN4N4kncRz2kD15jODoOplss/jcAoKMQx+uC4LinfJtVufcVcl99WVEc kH2mbCg72PIuTtS/VfH8MvBhc6gjkoeiLQEDN0dmb/OrKqCZGfZhzVg2f55ST2gN5byu qeRQ== X-Gm-Message-State: AOJu0Yz28U5A2tVd7g+rXT8k9D70xJuO3SeMHC2aY15GBVvMl+V4qav3 0TUdz8OWc+qgBpOmmHWM0mlAZkEQx4cEqQ/M4TIwdTvA40cSK4XnH8CIb1APbeE7tDlTD4hSiC7 8L1A= X-Google-Smtp-Source: AGHT+IEVI26Wg6+XrdDm55usmkD9GuWMcSDvJIkX0l3IWjmwPTRbHo8uCVNG3ajzeFX6HMrERu/xuw== X-Received: by 2002:a17:902:eccc:b0:1f2:f8b7:60d1 with SMTP id d9443c01a7336-1f31c9a100dmr9317175ad.26.1716348626373; Tue, 21 May 2024 20:30:26 -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.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:26 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v5 01/32] cocci/rte_memcpy: add script to eliminate fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:28 -0700 Message-ID: <20240522033009.143100-2-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 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 Rte_memcpy need not be used for the simple case of copying a fix size structure because it is not faster and will hide problems from code analysis tools. Coverity, Fortify and other analyzers special case memcpy() and can find issues that rte_memcpy() will hide. Many platforms use memcpy instead of rte_memcpy already. The only reason rte_memcpy() was added in original DPDK was that the older Gcc was doing slower on x86 than the special rte_memcpy() when handling larger size copies. Signed-off-by: Stephen Hemminger --- devtools/cocci/rte_memcpy.cocci | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 devtools/cocci/rte_memcpy.cocci diff --git a/devtools/cocci/rte_memcpy.cocci b/devtools/cocci/rte_memcpy.cocci new file mode 100644 index 0000000000..fa1038fc06 --- /dev/null +++ b/devtools/cocci/rte_memcpy.cocci @@ -0,0 +1,11 @@ +// +// rte_memcpy should not be used for simple fixed size structure +// because compiler's are smart enough to inline these. +// +@@ +expression src, dst; constant size; +@@ +( +- rte_memcpy(dst, src, size) ++ memcpy(dst, src, size) +) From patchwork Wed May 22 03:27:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140239 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C519E44093; Wed, 22 May 2024 05:30:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 870A64025C; Wed, 22 May 2024 05:30:31 +0200 (CEST) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id F14904025C for ; Wed, 22 May 2024 05:30:27 +0200 (CEST) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1eecc71311eso6796475ad.3 for ; Tue, 21 May 2024 20:30:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348627; x=1716953427; 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=Y7jqDq9itjOlJ+//msrHAnc/VdUKNM16cIApE4/K90U=; b=EVTSV3+8zQk1uP9j/hjm6aNOIVu5EgAcUJjAo8KUvWcv3afBOJyJ10jveO7QPknNls bJcXFVOWFT9hBbUZ9DogzjifBw5CEhbQ36KEz4iHZ8Cri6Zifjz75EMbpKFmwTaIerov wF0jpQ/S9hYd5/FHZbTkV1u1nUeIMBo9T4Lhr/Qennh/bvVgpGIiRrpCoobLx5IK3sTh 6gxDvkEOkiJiyM+tBrW7TqJ/9Bao141q0KLUvDtLwekxkkV7T9EZirld9seAXb+EQFWw xtgcoyqQ+E1Lh3KRmjo5PwW5E+swweJMyXghA1brgbMCGjkZZ089UJll/+xbR7CLRWsK oJ9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348627; x=1716953427; 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=Y7jqDq9itjOlJ+//msrHAnc/VdUKNM16cIApE4/K90U=; b=WNQiH6oqpSIc46TvUEyNG4JtqsokluieOfTJneV5WXNJjYc5q9wyWZ4zvb7oeY/VXe uv4BxczhYwGK8ovuEFulYusFkFAQUzqwt9glQercqhjCxxPTicBT3ct7SWdY5iO8Mx/i vpbyYWQNdAaSWwdoZGLJGoz0L4Rhx+3wnDVcIOEcX8abAyxwHQFsNHfM3Z4VV5zmhfh5 dNopFZWyex17HooTmJHOgyNxbipaBgXodqqzBd0gStuLabSyTLZK5+8ypnUdKa4d3qG4 lrEOHRt72cQIBm583umqhu2Uf9phdlBskavDHpGmdaX/dM3/zxdkOdu/SuxQj7HaTSeQ o3sQ== X-Gm-Message-State: AOJu0Yz1WJ0t5Nx6yucrHAgdWQtFHNncJ/7natfv2vEO34qW+BtViQko jXNPF2/jIZR5KxCManRTjFvSSJ6CuMnmiFGo6dS37IDlrp9Ky3zpxO6XchBU+k+Hp+Rcu0rHGGq kZaQ= X-Google-Smtp-Source: AGHT+IF6QL2NBB5R52e16cf7QGn5YbXvxc8w2lyYjAdEXDLfrXIbcyYDGrReaaNiQtpaDESmQigrig== X-Received: by 2002:a17:902:ce91:b0:1f2:fd49:9fcc with SMTP id d9443c01a7336-1f31c990bbbmr11111465ad.34.1716348627116; Tue, 21 May 2024 20:30:27 -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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:26 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tyler Retzlaff Subject: [PATCH v5 02/32] eal: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:29 -0700 Message-ID: <20240522033009.143100-3-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 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 --- lib/eal/common/eal_common_options.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c index e541f07939..07bfaffdac 100644 --- a/lib/eal/common/eal_common_options.c +++ b/lib/eal/common/eal_common_options.c @@ -30,7 +30,6 @@ #include #include #include -#include #ifndef RTE_EXEC_ENV_WINDOWS #include #endif @@ -1253,7 +1252,7 @@ eal_parse_lcores(const char *lcores) /* without '@', by default using lcore_set as cpuset */ if (*lcores != '@') - rte_memcpy(&cpuset, &lcore_set, sizeof(cpuset)); + memcpy(&cpuset, &lcore_set, sizeof(cpuset)); set_count = CPU_COUNT(&lcore_set); /* start to update lcore_set */ @@ -1275,8 +1274,8 @@ eal_parse_lcores(const char *lcores) if (check_cpuset(&cpuset) < 0) goto err; - rte_memcpy(&lcore_config[idx].cpuset, &cpuset, - sizeof(rte_cpuset_t)); + memcpy(&lcore_config[idx].cpuset, &cpuset, + sizeof(rte_cpuset_t)); } /* some cores from the lcore_set can't be handled by EAL */ From patchwork Wed May 22 03:27:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140240 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1AA3D44093; Wed, 22 May 2024 05:30:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C42D40685; Wed, 22 May 2024 05:30:33 +0200 (CEST) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id F31164028B for ; Wed, 22 May 2024 05:30:28 +0200 (CEST) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1ee12baa01cso6745365ad.0 for ; Tue, 21 May 2024 20:30:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348628; x=1716953428; 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=xunUODDUTHEH8MqFIV+5R9tfv8wlmNo4clzAhy6RGAs=; b=FsCfeOAL0OUkrcqzjOfBRtr3bQBsu00rAkkFKUlOpr3hBBzIscGwSe4vW2W2WzEXb4 +n9iItqgzBzGBfjDNJgmMLmKGVG8rLyYkse1cvNHMmFEkO2hkNPJCCFr1217daKJzvm8 lwEqxrI+YJXECqrKStPuK9pCnhDc0OZBvroErgpYbXSnv6G/IPxgeJGnv2QuNl0copSx wDJNI0ku6CtI95a2S6+aXUS/nl7kdiqu8lA92OFnyi0LqdQlESaE8CrZOzhV8YxrnEu9 A6MdFY5BIKx4uzLk2cjTqw/DjnYKgWkbw+WV8uNh6bYFeeCuKqkaiFa26Zdn5fq7M6ic pMng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348628; x=1716953428; 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=xunUODDUTHEH8MqFIV+5R9tfv8wlmNo4clzAhy6RGAs=; b=RVF3XhlXL4HRC6cu/zPs3ZFS0D0ROkvHegZ8yFCUSk8Z0Ckwir+M+b+VooWh+ECTAc vdtw49xN49pmdDL5OdHNpfZ4pTkCCC2FTsi5bAd+mZvSKPu4ERO/W0vtdal5IuUnl0ui 8YsxApxLebd+cVLpbFPuHk7/oMyYGAdMQV8S1x70CJCHTiNT4TBfe8Ft0FjGQQP27L6i AQHildeNdLOYxQC3F7SyalZ79WzUZ8mlvmTHxJP2TF+Fqy+uknrXi7ysaajdjqGOH4Db JVtRhbUdleJ2sUcyhktKDC4wusZjXn5zYW5vJDPa4k+4Kw5rCEz44Xq7h5XbFAFST4dX 2f6A== X-Gm-Message-State: AOJu0YwOOSg+aNRf64eUfqA7X+lpUbggy+umNyYedhslnskv9KEQz782 v4sSk19kLsNt/6/PsYrZEwNMWIec4p+rtG926TXlFGDhsOpbsBtFtyMmzoJwo4iXGLAjrXyPRsS rgiU= X-Google-Smtp-Source: AGHT+IHLuZ2Kj4K7/37XEfo1bMp/qKEei2GQ35s6oT1YGsm7sm3cpfRqtVhZkVS7k/c6gZR0UoSzLQ== X-Received: by 2002:a17:902:ec86:b0:1f2:f983:b844 with SMTP id d9443c01a7336-1f31ca4b6b7mr9704205ad.65.1716348627912; Tue, 21 May 2024 20:30:27 -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.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:27 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Ori Kam Subject: [PATCH v5 03/32] ethdev: replace uses of rte_memcpy Date: Tue, 21 May 2024 20:27:30 -0700 Message-ID: <20240522033009.143100-4-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 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 Replace use of rte_memcpy in ethdev. Most of these were fixed size, and the others were not in the fast path. Where possible replace memcpy() with structure assignment which has same effect is type safe. Signed-off-by: Stephen Hemminger ethdev: struct assign --- lib/ethdev/rte_ethdev.c | 12 ++--- lib/ethdev/rte_flow.c | 101 +++++++++++++++++++--------------------- 2 files changed, 53 insertions(+), 60 deletions(-) diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index f1c658f49e..27d2416466 100644 --- a/lib/ethdev/rte_ethdev.c +++ b/lib/ethdev/rte_ethdev.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -618,7 +617,7 @@ rte_eth_dev_owner_get(const uint16_t port_id, struct rte_eth_dev_owner *owner) rte_spinlock_lock(rte_mcfg_ethdev_get_lock()); if (eth_dev_shared_data_prepare() != NULL) { - rte_memcpy(owner, ðdev->data->owner, sizeof(*owner)); + *owner = ethdev->data->owner; ret = 0; } else { ret = -ENOMEM; @@ -1316,15 +1315,14 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, dev->data->dev_configured = 0; /* Store original config, as rollback required on failure */ - memcpy(&orig_conf, &dev->data->dev_conf, sizeof(dev->data->dev_conf)); + orig_conf = dev->data->dev_conf; /* * Copy the dev_conf parameter into the dev structure. * rte_eth_dev_info_get() requires dev_conf, copy it before dev_info get */ if (dev_conf != &dev->data->dev_conf) - memcpy(&dev->data->dev_conf, dev_conf, - sizeof(dev->data->dev_conf)); + dev->data->dev_conf = *dev_conf; /* Backup mtu for rollback */ old_mtu = dev->data->mtu; @@ -1601,7 +1599,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, eth_dev_rx_queue_config(dev, 0); eth_dev_tx_queue_config(dev, 0); rollback: - memcpy(&dev->data->dev_conf, &orig_conf, sizeof(dev->data->dev_conf)); + dev->data->dev_conf = orig_conf; if (old_mtu != dev->data->mtu) dev->data->mtu = old_mtu; @@ -3843,7 +3841,7 @@ rte_eth_dev_conf_get(uint16_t port_id, struct rte_eth_conf *dev_conf) return -EINVAL; } - memcpy(dev_conf, &dev->data->dev_conf, sizeof(struct rte_eth_conf)); + *dev_conf = dev->data->dev_conf; rte_ethdev_trace_conf_get(port_id, dev_conf); diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c index 7ab1100ea0..776352b984 100644 --- a/lib/ethdev/rte_flow.c +++ b/lib/ethdev/rte_flow.c @@ -62,7 +62,8 @@ rte_flow_conv_copy(void *buf, const void *data, const size_t size, size_t sz = rte_type ? desc[type].size : sizeof(void *); if (buf == NULL || data == NULL) return 0; - rte_memcpy(buf, data, (size > sz ? sz : size)); + + memcpy(buf, data, (size > sz ? sz : size)); if (rte_type && desc[type].desc_fn) sz += desc[type].desc_fn(size > 0 ? buf : NULL, data); return sz; @@ -73,11 +74,10 @@ rte_flow_item_flex_conv(void *buf, const void *data) { struct rte_flow_item_flex *dst = buf; const struct rte_flow_item_flex *src = data; - if (buf) { - dst->pattern = rte_memcpy - ((void *)((uintptr_t)(dst + 1)), src->pattern, - src->length); - } + + if (buf) + dst->pattern = memcpy((void *)((uintptr_t)(dst + 1)), + src->pattern, src->length); return src->length; } @@ -643,16 +643,18 @@ rte_flow_conv_item_spec(void *buf, const size_t size, mask.raw = item->mask ? item->mask : &rte_flow_item_raw_mask; src.raw = data; dst.raw = buf; - rte_memcpy(dst.raw, - (&(struct rte_flow_item_raw){ - .relative = src.raw->relative, - .search = src.raw->search, - .reserved = src.raw->reserved, - .offset = src.raw->offset, - .limit = src.raw->limit, - .length = src.raw->length, - }), - size > sizeof(*dst.raw) ? sizeof(*dst.raw) : size); + + memcpy(dst.raw, + (&(struct rte_flow_item_raw){ + .relative = src.raw->relative, + .search = src.raw->search, + .reserved = src.raw->reserved, + .offset = src.raw->offset, + .limit = src.raw->limit, + .length = src.raw->length, + }), + size > sizeof(*dst.raw) ? sizeof(*dst.raw) : size); + off = sizeof(*dst.raw); if (type == RTE_FLOW_CONV_ITEM_SPEC || (type == RTE_FLOW_CONV_ITEM_MASK && @@ -664,9 +666,8 @@ rte_flow_conv_item_spec(void *buf, const size_t size, if (tmp) { off = RTE_ALIGN_CEIL(off, sizeof(*dst.raw->pattern)); if (size >= off + tmp) - dst.raw->pattern = rte_memcpy - ((void *)((uintptr_t)dst.raw + off), - src.raw->pattern, tmp); + dst.raw->pattern = memcpy((void *)((uintptr_t)dst.raw + off), + src.raw->pattern, tmp); off += tmp; } break; @@ -716,32 +717,31 @@ rte_flow_conv_action_conf(void *buf, const size_t size, case RTE_FLOW_ACTION_TYPE_RSS: src.rss = action->conf; dst.rss = buf; - rte_memcpy(dst.rss, - (&(struct rte_flow_action_rss){ - .func = src.rss->func, - .level = src.rss->level, - .types = src.rss->types, - .key_len = src.rss->key_len, - .queue_num = src.rss->queue_num, - }), - size > sizeof(*dst.rss) ? sizeof(*dst.rss) : size); + memcpy(dst.rss, + (&(struct rte_flow_action_rss){ + .func = src.rss->func, + .level = src.rss->level, + .types = src.rss->types, + .key_len = src.rss->key_len, + .queue_num = src.rss->queue_num, + }), + size > sizeof(*dst.rss) ? sizeof(*dst.rss) : size); + off = sizeof(*dst.rss); if (src.rss->key_len && src.rss->key) { off = RTE_ALIGN_CEIL(off, sizeof(*dst.rss->key)); tmp = sizeof(*src.rss->key) * src.rss->key_len; if (size >= (uint64_t)off + (uint64_t)tmp) - dst.rss->key = rte_memcpy - ((void *)((uintptr_t)dst.rss + off), - src.rss->key, tmp); + dst.rss->key = memcpy((void *)((uintptr_t)dst.rss + off), + src.rss->key, tmp); off += tmp; } if (src.rss->queue_num) { off = RTE_ALIGN_CEIL(off, sizeof(*dst.rss->queue)); tmp = sizeof(*src.rss->queue) * src.rss->queue_num; if (size >= (uint64_t)off + (uint64_t)tmp) - dst.rss->queue = rte_memcpy - ((void *)((uintptr_t)dst.rss + off), - src.rss->queue, tmp); + dst.rss->queue = memcpy((void *)((uintptr_t)dst.rss + off), + src.rss->queue, tmp); off += tmp; } break; @@ -983,20 +983,15 @@ rte_flow_conv_rule(struct rte_flow_conv_rule *dst, size_t off; int ret; - rte_memcpy(dst, - (&(struct rte_flow_conv_rule){ - .attr = NULL, - .pattern = NULL, - .actions = NULL, - }), - size > sizeof(*dst) ? sizeof(*dst) : size); + memcpy(dst, &(struct rte_flow_conv_rule) { }, + size > sizeof(*dst) ? sizeof(*dst) : size); + off = sizeof(*dst); if (src->attr_ro) { off = RTE_ALIGN_CEIL(off, sizeof(double)); if (size && size >= off + sizeof(*dst->attr)) - dst->attr = rte_memcpy - ((void *)((uintptr_t)dst + off), - src->attr_ro, sizeof(*dst->attr)); + dst->attr = memcpy((void *)((uintptr_t)dst + off), + src->attr_ro, sizeof(*dst->attr)); off += sizeof(*dst->attr); } if (src->pattern_ro) { @@ -1098,7 +1093,7 @@ rte_flow_conv(enum rte_flow_conv_op op, attr = src; if (size > sizeof(*attr)) size = sizeof(*attr); - rte_memcpy(dst, attr, size); + memcpy(dst, attr, size); ret = sizeof(*attr); break; case RTE_FLOW_CONV_OP_ITEM: @@ -1180,14 +1175,14 @@ rte_flow_copy(struct rte_flow_desc *desc, size_t len, if (ret < 0) return 0; ret += sizeof(*desc) - sizeof(*dst); - rte_memcpy(desc, - (&(struct rte_flow_desc){ - .size = ret, - .attr = *attr, - .items = dst_size ? dst->pattern : NULL, - .actions = dst_size ? dst->actions : NULL, - }), - len > sizeof(*desc) ? sizeof(*desc) : len); + memcpy(desc, + (&(struct rte_flow_desc){ + .size = ret, + .attr = *attr, + .items = dst_size ? dst->pattern : NULL, + .actions = dst_size ? dst->actions : NULL, + }), + len > sizeof(*desc) ? sizeof(*desc) : len); rte_flow_trace_copy(desc, len, attr, items, actions, ret); From patchwork Wed May 22 03:27:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140241 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F09B944093; Wed, 22 May 2024 05:30:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 90D3040691; Wed, 22 May 2024 05:30:34 +0200 (CEST) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mails.dpdk.org (Postfix) with ESMTP id B9E39402C8 for ; Wed, 22 May 2024 05:30:29 +0200 (CEST) Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-1ecd9a81966so3311255ad.0 for ; Tue, 21 May 2024 20:30:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348629; x=1716953429; 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=QEPChqlAXAK/b7g7FPQYA8ebH1KJBtDb4kFA7ezjfys=; b=Q9Dt8m5Uy/0KOMxDZJhV9+7zuf+BeqEuXqTSUM2OQjf3EakEJTXhNpcNogm2sas/ge ErgRFSM28e3JEz0lutEsFEXh5W7qzHE1EAZ9Iy2PU7wPSwEaNiIItz2Cxt8Hty+YhQAQ Qy97U9a70L1jxAjIvSr0VP5iceNPDpfsLtOOP5ZGSM1/UehNkx90MZRWruWQ5Cb3gQ3r 4OslUWRKpCph7Mdcq1NTfrhvcBCVzBe1rKUUprumC4/PpNHxBHPf9We/KqNA+arEh5tx glQZpy3GQbcmyGOPDAUG7DTC7LGLhMeHUbiXBOQyjApGIecPqO351XiCBhJS9OpnhFyf wp2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348629; x=1716953429; 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=QEPChqlAXAK/b7g7FPQYA8ebH1KJBtDb4kFA7ezjfys=; b=ou23tbDPTiIz0h1lYaEzUwlS0sYOwVVa4fS70KK7VjRk2wrKvxzUZqahW8OxyU5Ui3 AUGjNqLHhCAkBDEESm1JWH6/6xu2vq11yNFvpMjMu29FR4i/ttPHJElPo8Sg26r3Pabp BlLdMOi2WExotgSVpT0FDlqnQEK34cQxJe+lEOeUNyT40vi9ZMUb/h4jvcCk9uw2+Or7 CwRkc6C3c/YX/5LXTeblgMFkCV+8a/chc0khM9i7cmy/zfq0VmsBW2dOBAqTSMLJY/AN +TWk3ARPUqZu7p/5sJpXT0STwQ31KkjDg++XsI87k7e0atroLREXM0gNz0tC11SH6HpA x5zQ== X-Gm-Message-State: AOJu0YxuUXvIsx3zB6CKI5cszMNY6vA4WesUGlS+1kLPZd3UbSbZd26t isyLae1l1+V6bismHJ8+n+JTadS1t1XQMM82nbbTGDUMCI5/ZBHVGFbCn+/iUy8nSKo9xCGkHiI zKZQ= X-Google-Smtp-Source: AGHT+IHMhYUfeenFf5lXT7MkoR8wL4Cl+y/Go8Yk5ZksEZqHDwO26fo8aeHcNcnTsXev9dymDQnlgw== X-Received: by 2002:a17:902:c403:b0:1eb:309b:6712 with SMTP id d9443c01a7336-1f2ed3678ebmr117021145ad.29.1716348628763; Tue, 21 May 2024 20:30:28 -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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:28 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Abhinandan Gujjar , Jerin Jacob , Amit Prakash Shukla , Erik Gabriel Carrillo Subject: [PATCH v5 04/32] eventdev: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:31 -0700 Message-ID: <20240522033009.143100-5-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 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 --- lib/eventdev/rte_event_crypto_adapter.c | 2 +- lib/eventdev/rte_event_dma_adapter.c | 4 ++-- lib/eventdev/rte_event_timer_adapter.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c index db1c7f3906..e2fff2ecc9 100644 --- a/lib/eventdev/rte_event_crypto_adapter.c +++ b/lib/eventdev/rte_event_crypto_adapter.c @@ -655,7 +655,7 @@ eca_ops_enqueue_burst(struct event_crypto_adapter *adapter, continue; } - rte_memcpy(ev, &m_data->response_info, sizeof(*ev)); + memcpy(ev, &m_data->response_info, sizeof(*ev)); ev->event_ptr = ops[i]; ev->event_type = RTE_EVENT_TYPE_CRYPTODEV; if (adapter->implicit_release_disabled) diff --git a/lib/eventdev/rte_event_dma_adapter.c b/lib/eventdev/rte_event_dma_adapter.c index 24dff556db..6784c562b0 100644 --- a/lib/eventdev/rte_event_dma_adapter.c +++ b/lib/eventdev/rte_event_dma_adapter.c @@ -447,7 +447,7 @@ rte_event_dma_adapter_create(uint8_t id, uint8_t evdev_id, struct rte_event_port if (pc == NULL) return -ENOMEM; - rte_memcpy(pc, port_config, sizeof(struct rte_event_port_conf)); + memcpy(pc, port_config, sizeof(struct rte_event_port_conf)); ret = rte_event_dma_adapter_create_ext(id, evdev_id, edma_default_config_cb, mode, pc); if (ret != 0) rte_free(pc); @@ -668,7 +668,7 @@ edma_ops_enqueue_burst(struct event_dma_adapter *adapter, struct rte_event_dma_a continue; } - rte_memcpy(ev, response_info, sizeof(struct rte_event)); + memcpy(ev, response_info, sizeof(struct rte_event)); ev->event_ptr = ops[i]; ev->event_type = RTE_EVENT_TYPE_DMADEV; if (adapter->implicit_release_disabled) diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c index 5886965d14..9ca52cc6de 100644 --- a/lib/eventdev/rte_event_timer_adapter.c +++ b/lib/eventdev/rte_event_timer_adapter.c @@ -549,7 +549,7 @@ event_buffer_add(struct event_buffer *bufp, struct rte_event *eventp) /* Instead of modulus, bitwise AND with mask to get head_idx. */ head_idx = bufp->head & EVENT_BUFFER_MASK; buf_eventp = &bufp->events[head_idx]; - rte_memcpy(buf_eventp, eventp, sizeof(struct rte_event)); + memcpy(buf_eventp, eventp, sizeof(struct rte_event)); /* Wrap automatically when overflow occurs. */ bufp->head++; From patchwork Wed May 22 03:27:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140242 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 35F3F44093; Wed, 22 May 2024 05:31:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D561A40696; Wed, 22 May 2024 05:30:35 +0200 (CEST) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id 51A87402E2 for ; Wed, 22 May 2024 05:30:30 +0200 (CEST) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1ed0abbf706so41626625ad.2 for ; Tue, 21 May 2024 20:30:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348629; x=1716953429; 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=vdd/LdHNOZv0OgU/yOEL8RT/34+Pa/gXTM+9pBDnNFs=; b=AEZfg0PTC83q7QtanbYE5tPbYShC8C5ssmh85aChEMhdUyRzmNXKzlwt+F6x0RnAH5 svDXR3pZeqZD3/3W1ZoMBcK+bjRMbjFyKc0OH40MWsu4i4odCh0EdTI7l+8JdHcDy2S4 X3Xj7WspB7WSMaX+n1MBGrtdt27e+6XP4vS73p3OPTIQZguWRbqf86O2TUT/bFKXDU4P sIcHp7GeY9cET4zC/XHaiUdqAAJsXlhmW5BvqCHAnrgQ/Ks0ToSkAL6rcIlFnJ2IYzW6 yBwlx71wJtnbv3B7ADbE6WfidiLdiNm0ZuIAxYxD/orP3Q4Xw7KPKRwru1n8oRUa4thw KxDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348629; x=1716953429; 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=vdd/LdHNOZv0OgU/yOEL8RT/34+Pa/gXTM+9pBDnNFs=; b=Dmjtv1tYNLjMoD/eEp3emRXgXC+VlkR0BVzXRUBxJWDMwFEXKJgB2AsMXWNY+MY6ML GESojuRKjwI6OqGN1Aq3qVzaA7CIlkls+nlL3ljztSFHENhm6o3CX/wTN9H0msEUb0EP q2r9M73fT1PsUrlQIBgHexQOKkjgnMluvQWbwg2ktbDTQTaRLxGUHblF/JG8Z8hivoSA EXnln8zbFjTMirTmSLBeszylA0EAwcgF79zQ3nzbmugUnAlBMEhn81gl+EOK3g6nCCGb 1LTlD8LBrUGuL90NMKPmsb3LZfxkdpeS7lFnsVDtDCSp5JEF82Grvqf66mJW5kcc+umr phlA== X-Gm-Message-State: AOJu0YwogFrlwcMljsjywCbFL2a3Sb4X46VOD1J60+A8EEEkU7o0r9Am 6TpqE6UHJr/q+ax+KcXQnu6YHGdTkaD7FL0IUSah8Lyej6j/uhvC89R6Tx8rB24EfKyj4FaS0c7 duL0= X-Google-Smtp-Source: AGHT+IGvp52EpEAc9FGvy/V8JQWw06FT0jKgQXIGHF2EuOJaNz1zXEvPbDLQXdc/ttYn4VqPLhLqEA== X-Received: by 2002:a17:902:b589:b0:1e2:3e1e:3d9 with SMTP id d9443c01a7336-1f31c9f7009mr8086745ad.63.1716348629562; Tue, 21 May 2024 20:30:29 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:29 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Akhil Goyal , Fan Zhang Subject: [PATCH v5 05/32] cryptodev: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:32 -0700 Message-ID: <20240522033009.143100-6-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 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 --- lib/cryptodev/rte_cryptodev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c index 886eb7adc4..1377777525 100644 --- a/lib/cryptodev/rte_cryptodev.c +++ b/lib/cryptodev/rte_cryptodev.c @@ -2854,7 +2854,7 @@ crypto_caps_array(struct rte_tel_data *d, while ((dev_caps = &capabilities[i++])->op != RTE_CRYPTO_OP_TYPE_UNDEFINED) { memset(&caps_val, 0, CRYPTO_CAPS_SZ * sizeof(caps_val[0])); - rte_memcpy(caps_val, dev_caps, sizeof(capabilities[0])); + memcpy(caps_val, dev_caps, sizeof(capabilities[0])); for (j = 0; j < CRYPTO_CAPS_SZ; j++) rte_tel_data_add_array_uint(d, caps_val[j]); } From patchwork Wed May 22 03:27:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140243 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 015A844093; Wed, 22 May 2024 05:31:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 22F6C406A2; Wed, 22 May 2024 05:30:37 +0200 (CEST) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id 0A575402E2 for ; Wed, 22 May 2024 05:30:31 +0200 (CEST) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1f2ecea41deso103878395ad.1 for ; Tue, 21 May 2024 20:30:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348630; x=1716953430; 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=NhAVasGADBWHOFo97XaY43Xou/YF/552baDpBt/hwGk=; b=Xly8Y1T1piXg60bRBv8iDuBFC1AF26K70gLzH+vcJOSj0n30UcegRdtRy3cs/nnM6+ MMfDbWi/XySvmU938DU7kJSUMcJnSQxvkiEvVCXSgewB5qiiudNTY/6wOwD7DiZxGjt9 ea+mrMJaHeiK7riceBpF8JOTGIgVdUzAVy4In6j4S0p0tMxtj+65BY6ggImCls8THqSa J+A8cxJwRJegkpX+5CIGkp3yUbPFEes6jPrHuojWmrliYBNHonN3pe4zve7wzeN7lZhG XcKWaC6l/S8U3E9R0JHDAvgA93uoWQsd2XGZYaAAKdXlzhUOW1rl0MJbnMNjFe/Y/F+U Bmkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348630; x=1716953430; 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=NhAVasGADBWHOFo97XaY43Xou/YF/552baDpBt/hwGk=; b=veK2AQ8UMZUqDL7UuDvDIwOiHBkodu9BD2uRvLg8LzJSv+fUHMQCVn9ewYmhYhdaZz k5IDzMNbnm+hGrvIgc5fPpucTde3Yf24U4CD755fkJCRc08FKXzGrIwq6faVknOW5ies rBfaUHHxkOI3YUYDlI+9z7+USLrlJ5kTCofNIE+A2cr1eGskdYPRyy+MQHB3pDOBZFEJ 3qWR9MoJGuOK+0yMmK+n/XeguhU3ORBnVyW1zm+NP6ewlPWbuwFd+ZjsoRg3hate6CGX js7E2fuGmJekGQ7TFZKiUgIL2k0CEdUeL17TGLOLh/UwJFH0i+ZC71EQEVWkPCX7BXiV naXg== X-Gm-Message-State: AOJu0Yz18O2NIxxY5C3K60k1vayFojlZtjgcF7GBjWNy/zzrEZXamHLf m/86SBl+Ig2fGCma9c3YKfee0bX93oicTW484cHS6UqOA3CXMfKWxt8xYcPC1z3EKJR8XhgVkLs K7mA= X-Google-Smtp-Source: AGHT+IG6Gn7t3dgmNCAeikILqKvhDtW3P7aaZhDlgaphS7sFQ79zkekZtKB/NV7EDqidglt36XOD1g== X-Received: by 2002:a17:902:d141:b0:1f2:ff28:c751 with SMTP id d9443c01a7336-1f31c9f03f6mr6947275ad.47.1716348630304; Tue, 21 May 2024 20:30:30 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:29 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Konstantin Ananyev Subject: [PATCH v5 06/32] ip_frag: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:33 -0700 Message-ID: <20240522033009.143100-7-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 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 --- lib/ip_frag/rte_ipv6_fragmentation.c | 4 +--- lib/ip_frag/rte_ipv6_reassembly.c | 6 ++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/ip_frag/rte_ipv6_fragmentation.c b/lib/ip_frag/rte_ipv6_fragmentation.c index 56696f32f8..72ce6501c8 100644 --- a/lib/ip_frag/rte_ipv6_fragmentation.c +++ b/lib/ip_frag/rte_ipv6_fragmentation.c @@ -5,8 +5,6 @@ #include #include -#include - #include "ip_frag_common.h" /** @@ -23,7 +21,7 @@ __fill_ipv6hdr_frag(struct rte_ipv6_hdr *dst, { struct rte_ipv6_fragment_ext *fh; - rte_memcpy(dst, src, sizeof(*dst)); + memcpy(dst, src, sizeof(*dst)); dst->payload_len = rte_cpu_to_be_16(len); dst->proto = IPPROTO_FRAGMENT; diff --git a/lib/ip_frag/rte_ipv6_reassembly.c b/lib/ip_frag/rte_ipv6_reassembly.c index 88863a98d1..663b1737a6 100644 --- a/lib/ip_frag/rte_ipv6_reassembly.c +++ b/lib/ip_frag/rte_ipv6_reassembly.c @@ -4,8 +4,6 @@ #include -#include - #include "ip_frag_common.h" /** @@ -143,8 +141,8 @@ rte_ipv6_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl, int32_t ip_len; int32_t trim; - rte_memcpy(&key.src_dst[0], ip_hdr->src_addr, 16); - rte_memcpy(&key.src_dst[2], ip_hdr->dst_addr, 16); + memcpy(&key.src_dst[0], ip_hdr->src_addr, 16); + memcpy(&key.src_dst[2], ip_hdr->dst_addr, 16); key.id = frag_hdr->id; key.key_len = IPV6_KEYLEN; From patchwork Wed May 22 03:27:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140244 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1D1D344093; Wed, 22 May 2024 05:31:22 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A3F5B406B7; Wed, 22 May 2024 05:30:38 +0200 (CEST) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mails.dpdk.org (Postfix) with ESMTP id 60B444067C for ; Wed, 22 May 2024 05:30:32 +0200 (CEST) Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-656d8b346d2so1813268a12.2 for ; Tue, 21 May 2024 20:30:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348631; x=1716953431; 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=rIYIbSxL/BCBM8GbYg7307lWXBIOhsJQKZVDHnyGh94=; b=f4Zhk2rI562O18taCFBfAKfARqAE2IWR8Qvo/wSE+M5eZhtbw/+NVvyt9uRkEBtVWt vtrWJtl+tDOSxr3uBINRH0oos9LDTsBDELIGZZx8+EfhD2XPZk4bfvWjd69awB/kTcve hbaCt0TAuc951xZgLuPtgSkpNciQ6JEzQbpFmXCScWOYv07NGHe7B38yj25S4+1tRnnY SKkzZwQ2uD9Ma0WLej07bJHOKzv6wBjBBmymp9iUVZdtWYsm5yMqYaPNF8SdgCzC1pew 7emBW1CUgmTffkZuUQ3dLg6ZeA4wRzzvcE+pjvhzQhNeew/T3rriNltktLBf9YsveUfT m67g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348631; x=1716953431; 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=rIYIbSxL/BCBM8GbYg7307lWXBIOhsJQKZVDHnyGh94=; b=s8MD/cRNPlZ1o3Nelgv99oSNdoavgx/OGS+BjU6swpxTZf7p2lwpKT98iYbn6jEC3g LfjAsfCV4wQCVLePkwTwX71QaR2Il1lNPBU8lMDDhW+u7rbRfstAgkVtPnmBgFBW9gmR IJ4e8xwR10kh6L4Ps8HKu0lPAG2uSxOjXMxN8ukC0LMQOsL/Mm5wmC6xTQqZ/f6ZBEhB ecrcfU+mpbfXf617ME2VNWUiZBM4qgjuCFHiHlyIoL/ktdC8eShqO9Hwpb9GqGvW+Iqa NyZf3ja087lWLSk5KNYhecDHvm+SEbfkW48zLxXWTA8v3jVtDRWA3NDCuWK/qPmlPdvI GUyw== X-Gm-Message-State: AOJu0YxYdZ3rRg0VnQSisnxlx5AkFp599efDie/qC6TGCgg47XBX/kS6 ESNaCzXkzj+LQTsWq9UAlLIh/OKoTAYzIN5X8rPTjdQoOo8pw0S9FlddXuTP4NQ/7Ye1UuQH54L OVCA= X-Google-Smtp-Source: AGHT+IHD2Fp+BQ94V7FCrTFrFLVaO7tkAT/o5IUYh+WBMpqeKkzVWxt+KyUUYXWd33IIIUhOwS46VA== X-Received: by 2002:a17:902:eb85:b0:1ea:6fb2:5a88 with SMTP id d9443c01a7336-1f31ca5273cmr8700265ad.68.1716348631367; Tue, 21 May 2024 20:30:31 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:30 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v5 07/32] net: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:34 -0700 Message-ID: <20240522033009.143100-8-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 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 --- lib/net/rte_ether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/net/rte_ether.c b/lib/net/rte_ether.c index f59c20289d..761b38f805 100644 --- a/lib/net/rte_ether.c +++ b/lib/net/rte_ether.c @@ -13,7 +13,7 @@ rte_eth_random_addr(uint8_t *addr) uint64_t rand = rte_rand(); uint8_t *p = (uint8_t *)&rand; - rte_memcpy(addr, p, RTE_ETHER_ADDR_LEN); + memcpy(addr, p, RTE_ETHER_ADDR_LEN); addr[0] &= (uint8_t)~RTE_ETHER_GROUP_ADDR; /* clear multicast bit */ addr[0] |= RTE_ETHER_LOCAL_ADMIN_ADDR; /* set local assignment bit */ } From patchwork Wed May 22 03:27:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140245 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A979B44093; Wed, 22 May 2024 05:31:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E8F4740A67; Wed, 22 May 2024 05:30:39 +0200 (CEST) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mails.dpdk.org (Postfix) with ESMTP id DE06F4067E for ; Wed, 22 May 2024 05:30:32 +0200 (CEST) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1eb24e3a2d9so120727245ad.1 for ; Tue, 21 May 2024 20:30:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348632; x=1716953432; 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=e3gFFKu0curBrX3++ZjRWmj5hwHWW3i+kqg5CyMDWgs=; b=IrYebMQasvARxLNJaV5MdxhYrg5ogPd3cmgds1j5MqlE4olMwj3D+EDDwVlmfo8/MJ eDuUXyIcTWfMDEjjlNBR2Sec9VSAUi4TUsWzZiTzoEGglXW3g9LtNSf7v+UbIObqyRxa rNMjXW2pwiN4Iq9xwDdgIi+4uOHxEQ5RBHeMe2XU67MJpwMHZvjg4PNgYNZ0LcA1KrwO CYD7yBGw6U38y5E7iiWzeFKg38m7r9SUnceHgpopy2mnWTXwpxQ5/jkCcHORp5+fbYIN pP+IrziJiPwDuY/WXnDORAsCbfnpDT/poKRvbQ3PVkP+GrUX/4ynRH2rcB/59fIDXgV2 fpaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348632; x=1716953432; 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=e3gFFKu0curBrX3++ZjRWmj5hwHWW3i+kqg5CyMDWgs=; b=cvOUt2WPWvijydUKwUhtegT7dYPyyAiWy1favy3Ncz3uE18lXaVksSSd7Q8P6ZUi7u IvpNVSWKwCcpDpBqUxuxGcqpW8NUEcwigkTJfvSKQH1h8Mak1RDUuqc35XBaQiZ2Z3rk SnkGY7Md7EuywxMBDgIgXwPKijfjxfvpGs1T7t2+Ap/XQapHodZPuRaODmnHl4yK6hPD Xsh55q96kPOzOK2OtmMirOoqKooK4A5+X25ort/C4qOi4gYzEQnhGPpI7NLXPuEw+TI7 fUe4ld4zt2wHHaYZ8o9Ia9xRXRde4YeUnAO1qoyWTVS7woUhezoDpEO5vvev7evfTL/g bKxQ== X-Gm-Message-State: AOJu0Yw6P/d7WODSYNZ9esQZbxTUzgSHqmEmXP1MfeJHJF/CCcupVSgV mEydCz4A/x8OJcV/J9uTarzWNFFkXK2582WTTW5g1v0XBo3aOt55ocIwu94GafFYr+FSHSwg2oF v+rw= X-Google-Smtp-Source: AGHT+IHqlmm7gcyauq/qhNhqkJg7kb27WIT3OgAbOKkvui22nNSHQ4O6MEC3UKpeLIBk92dilUVDDA== X-Received: by 2002:a17:902:dac8:b0:1f2:f63b:4795 with SMTP id d9443c01a7336-1f31c9651bdmr13256215ad.14.1716348632163; Tue, 21 May 2024 20:30:32 -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.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:31 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Bruce Richardson , Vladimir Medvedkin Subject: [PATCH v5 08/32] lpm: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:35 -0700 Message-ID: <20240522033009.143100-9-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 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 --- lib/lpm/rte_lpm6.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/lpm/rte_lpm6.c b/lib/lpm/rte_lpm6.c index 46d8f71a2d..242695dd4d 100644 --- a/lib/lpm/rte_lpm6.c +++ b/lib/lpm/rte_lpm6.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -139,7 +138,7 @@ ip6_mask_addr(uint8_t *ip, uint8_t depth) static inline void ip6_copy_addr(uint8_t *dst, const uint8_t *src) { - rte_memcpy(dst, src, RTE_LPM6_IPV6_ADDR_SIZE); + memcpy(dst, src, RTE_LPM6_IPV6_ADDR_SIZE); } /* From patchwork Wed May 22 03:27:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140246 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B92E244093; Wed, 22 May 2024 05:31:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2FE8040A6F; Wed, 22 May 2024 05:30:41 +0200 (CEST) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mails.dpdk.org (Postfix) with ESMTP id AB4424067E for ; Wed, 22 May 2024 05:30:33 +0200 (CEST) Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-5ff57410ebbso1914541a12.1 for ; Tue, 21 May 2024 20:30:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348633; x=1716953433; 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=c/mW3JjvxJA9CrscA5e2jXO0D4dxH7t6G0XEw6CK6GY=; b=R14/mAM5Tf4LHcbaZHZfHMDl9gJHtb/rPsjx5eGnIVaf+uVMolicymf27z1LDYMYmP lDShm1Io9SzSyfg7eucS0ZsTTNNzL3akneX1ZPFrbOSEtlYLGyTsK3BW6flb+ie9oWM5 kBSNsK9z0aMY1mXT1425nRW8imnuzK8cPVd4qNTGJLsaPZLJWNRk14cCXE1zVh3Ykoqy bA3beVVdQqSTb7NthDU9J5vyjnVuxCLhOMJognEoOVg/whcmkrBtPj8WqZ58zFVGaxMd hmpEb9t60a2lRBRl+ekN+efl5MmR5KR24TEg309TbfY6g9PQxHS6y6BgR89AxTBTxZIp QlJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348633; x=1716953433; 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=c/mW3JjvxJA9CrscA5e2jXO0D4dxH7t6G0XEw6CK6GY=; b=qtlxqmvPhcKvkI2pdLge7AGL3LeDCqGGr+KhkXRpUjJeuDBAUTMqrqGFE5qh2p45OT 3/hUf7+zReJobon6ALtMr2xTE4BrYECcjs7b+TiwiR9syisqFAqLR8TK702ksGc0S+// V/zTynC1ooq5DfPbtctlYXCbIrKXp4pzRzsj4g9VZ+raqiNKBZQhehmNZqg2VdBgXirT ioIvyPxV51eo4Y1N2fIlHXg5TYGBuJg97PMU0LkPxPIMrmtE/9vqJqCwMtGb0dnCSwap 4gO5OWX+jSrPV7p/JKENGG9tnZa2HbmFMRnVIhHWcxG20+etZRIaLfibK2fdID70O5mU r3nw== X-Gm-Message-State: AOJu0YwYyRE+y6/4dIuQg5vqZ5rMSZKsoWHAbCleLZZkW1lu8FDY5WXv hgHXLwy3SCYAiifKHIkDapqSxSlWUXGDIkQ0kjb2Y/oGTvAZAgZU8kyDJOv1JdzEV7KpwDfoxhi KIr4= X-Google-Smtp-Source: AGHT+IFDxy853s1fXi9n/3cYoAKsgCt0DIDdBhMmQWVEByfvtVDENp1EG/IDjKSLTf50+CrC+S9udQ== X-Received: by 2002:a17:902:8b84:b0:1ec:4695:6759 with SMTP id d9443c01a7336-1f31c990e54mr6960795ad.31.1716348632951; Tue, 21 May 2024 20:30:32 -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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:32 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Nithin Dabilpuram , Pavan Nikhilesh Subject: [PATCH v5 09/32] node: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:36 -0700 Message-ID: <20240522033009.143100-10-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 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 --- lib/node/ip6_lookup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/node/ip6_lookup.c b/lib/node/ip6_lookup.c index 309964f60f..b8e567ccd9 100644 --- a/lib/node/ip6_lookup.c +++ b/lib/node/ip6_lookup.c @@ -112,28 +112,28 @@ ip6_lookup_node_process_scalar(struct rte_graph *graph, struct rte_node *node, sizeof(struct rte_ether_hdr)); /* Extract hop_limits as ipv6 hdr is in cache */ node_mbuf_priv1(mbuf0, dyn)->ttl = ipv6_hdr->hop_limits; - rte_memcpy(ip_batch[0], ipv6_hdr->dst_addr, 16); + memcpy(ip_batch[0], ipv6_hdr->dst_addr, 16); /* Extract DIP of mbuf1 */ ipv6_hdr = rte_pktmbuf_mtod_offset(mbuf1, struct rte_ipv6_hdr *, sizeof(struct rte_ether_hdr)); /* Extract hop_limits as ipv6 hdr is in cache */ node_mbuf_priv1(mbuf1, dyn)->ttl = ipv6_hdr->hop_limits; - rte_memcpy(ip_batch[1], ipv6_hdr->dst_addr, 16); + memcpy(ip_batch[1], ipv6_hdr->dst_addr, 16); /* Extract DIP of mbuf2 */ ipv6_hdr = rte_pktmbuf_mtod_offset(mbuf2, struct rte_ipv6_hdr *, sizeof(struct rte_ether_hdr)); /* Extract hop_limits as ipv6 hdr is in cache */ node_mbuf_priv1(mbuf2, dyn)->ttl = ipv6_hdr->hop_limits; - rte_memcpy(ip_batch[2], ipv6_hdr->dst_addr, 16); + memcpy(ip_batch[2], ipv6_hdr->dst_addr, 16); /* Extract DIP of mbuf3 */ ipv6_hdr = rte_pktmbuf_mtod_offset(mbuf3, struct rte_ipv6_hdr *, sizeof(struct rte_ether_hdr)); /* Extract hop_limits as ipv6 hdr is in cache */ node_mbuf_priv1(mbuf3, dyn)->ttl = ipv6_hdr->hop_limits; - rte_memcpy(ip_batch[3], ipv6_hdr->dst_addr, 16); + memcpy(ip_batch[3], ipv6_hdr->dst_addr, 16); rte_lpm6_lookup_bulk_func(lpm6, ip_batch, next_hop, 4); From patchwork Wed May 22 03:27:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140247 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F3C9544093; Wed, 22 May 2024 05:31:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D99F940A82; Wed, 22 May 2024 05:30:42 +0200 (CEST) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id 8F4FE4068A for ; Wed, 22 May 2024 05:30:34 +0200 (CEST) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1ed904c2280so5675335ad.2 for ; Tue, 21 May 2024 20:30:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348634; x=1716953434; 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=lTPdGr/UGHjV9BDoEi9KOalEaKGR3d/Y7EFFC+9Bq/k=; b=NUAedrQhl7TyjkW6qXA80Ry0jPZbKPUfTDNo2qGqfCcpvJkC6d4wHtOIUPozPz2uyb k00IPPGyoaVbIWuNbrF8C7FyUyZimpsCy34pcvCsADtepPAaaGOLcjNMBInWXdnHCStl 1DPV5je+4d4hz8oRjQr/oa88xwVbmXSvn+d6wxKuOffxr5FVVKh6IbaPyFElwEB+Vzzy PFt4rbkNbo6GTyEwxQrrx4KoB8eU0waWJ2ZxeBk624O1IBZE3IO5OhISlO6WqxO3tw7P m9hsmhpYk1OXEkCnRLreoMBzi+tC1m4vJtV/yCb6f8bGJz/A8jkBCC8aoqr0rdXweniD ygmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348634; x=1716953434; 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=lTPdGr/UGHjV9BDoEi9KOalEaKGR3d/Y7EFFC+9Bq/k=; b=p+mZvMsHss7oq7TXuD6SP7sap2pxHWM1dlW93BQlmXc4qGr5+bZGWH7OD0Q2KtG7xX j5FhkkTnYNAbvvJfoEwbvU5wl3xqZakghg0suAWLUPFm1X3lXfY29lhxHfBrwnbz1UDg uli6g3/AGnECDS11N6VR7TlmLwJ6KU3hpbH8OccUiOtlTCm5+ienIrrDRfSvMhSMPNdm 7aVnsXiB1R6tdBGKiRTSHKd3nEv+gF991ePmpVWjLLiWrPhCcNqEhgkUS0mbi4PF64BX B368cQubQYRMzNbr3m6z3xUbUwldd4FJ6MOxx4wuazCdIDekKrMFLJYI6dTY224lwTqx wNaA== X-Gm-Message-State: AOJu0Ywxp0HKVomeSf3lx3gatiXpeNR+HBUBeJH0r9eD6k2Jl3UmHHPA yZR56BrC9JphzPCy0aBBFNsbPT1LqAj59R0ei+fmcflbTGbEDxPRnkYDm9e60ZKK1BQrH8F39E7 xn2c= X-Google-Smtp-Source: AGHT+IF2iXsQIH0eB1GQV6IXMdKobK46kUUtj25ccwbYGTaQoSBfbSF0Q28aAJFphtBlMb5igJJ/cA== X-Received: by 2002:a17:903:245:b0:1e4:4000:a576 with SMTP id d9443c01a7336-1f31c9effbemr8563315ad.43.1716348633766; Tue, 21 May 2024 20:30:33 -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.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:33 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anoob Joseph , Volodymyr Fialko Subject: [PATCH v5 10/32] pdcp: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:37 -0700 Message-ID: <20240522033009.143100-11-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 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 --- lib/pdcp/pdcp_process.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/pdcp/pdcp_process.c b/lib/pdcp/pdcp_process.c index 9b9b881124..6c0693f666 100644 --- a/lib/pdcp/pdcp_process.c +++ b/lib/pdcp/pdcp_process.c @@ -60,7 +60,7 @@ pdcp_iv_gen_null_aes_cmac(struct rte_crypto_op *cop, const struct entity_priv *e m = en_priv->auth_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); - rte_memcpy(m_ptr, &m, 8); + memcpy(m_ptr, &m, 8); } static void @@ -72,10 +72,10 @@ pdcp_iv_gen_null_zs(struct rte_crypto_op *cop, const struct entity_priv *en_priv iv = rte_crypto_op_ctod_offset(cop, uint8_t *, PDCP_IV_OFFSET); iv_u64[0] = en_priv->auth_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); - rte_memcpy(iv, &iv_u64[0], 8); + memcpy(iv, &iv_u64[0], 8); iv_u64[1] = iv_u64[0] ^ en_priv->auth_iv_part.u64[1]; - rte_memcpy(iv + 8, &iv_u64[1], 8); + memcpy(iv + 8, &iv_u64[1], 8); } static void @@ -89,7 +89,7 @@ pdcp_iv_gen_aes_ctr_null(struct rte_crypto_op *cop, const struct entity_priv *en iv_u64[0] = en_priv->cipher_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); iv_u64[1] = 0; - rte_memcpy(iv, iv_u64, 16); + memcpy(iv, iv_u64, 16); } static void @@ -101,8 +101,8 @@ pdcp_iv_gen_zs_null(struct rte_crypto_op *cop, const struct entity_priv *en_priv iv = rte_crypto_op_ctod_offset(cop, uint8_t *, PDCP_IV_OFFSET); iv_u64 = en_priv->cipher_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); - rte_memcpy(iv, &iv_u64, 8); - rte_memcpy(iv + 8, &iv_u64, 8); + memcpy(iv, &iv_u64, 8); + memcpy(iv + 8, &iv_u64, 8); } static void @@ -115,17 +115,17 @@ pdcp_iv_gen_zs_zs(struct rte_crypto_op *cop, const struct entity_priv *en_priv, /* Generating cipher IV */ iv_u64[0] = en_priv->cipher_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); - rte_memcpy(iv, &iv_u64[0], 8); - rte_memcpy(iv + 8, &iv_u64[0], 8); + memcpy(iv, &iv_u64[0], 8); + memcpy(iv + 8, &iv_u64[0], 8); iv += PDCP_IV_LEN; /* Generating auth IV */ iv_u64[0] = en_priv->auth_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); - rte_memcpy(iv, &iv_u64[0], 8); + memcpy(iv, &iv_u64[0], 8); iv_u64[1] = iv_u64[0] ^ en_priv->auth_iv_part.u64[1]; - rte_memcpy(iv + 8, &iv_u64[1], 8); + memcpy(iv + 8, &iv_u64[1], 8); } static void @@ -140,12 +140,12 @@ pdcp_iv_gen_zs_aes_cmac(struct rte_crypto_op *cop, const struct entity_priv *en_ iv = rte_crypto_op_ctod_offset(cop, uint8_t *, PDCP_IV_OFFSET); iv_u64[0] = en_priv->cipher_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); - rte_memcpy(iv, &iv_u64[0], 8); - rte_memcpy(iv + 8, &iv_u64[0], 8); + memcpy(iv, &iv_u64[0], 8); + memcpy(iv + 8, &iv_u64[0], 8); m_ptr = (uint8_t *)rte_pktmbuf_prepend(mb, 8); m = en_priv->auth_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); - rte_memcpy(m_ptr, &m, 8); + memcpy(m_ptr, &m, 8); } static void @@ -162,11 +162,11 @@ pdcp_iv_gen_aes_ctr_aes_cmac(struct rte_crypto_op *cop, const struct entity_priv iv_u64[0] = en_priv->cipher_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); iv_u64[1] = 0; - rte_memcpy(iv, iv_u64, PDCP_IV_LEN); + memcpy(iv, iv_u64, PDCP_IV_LEN); m_ptr = (uint8_t *)rte_pktmbuf_prepend(mb, 8); m = en_priv->auth_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); - rte_memcpy(m_ptr, &m, 8); + memcpy(m_ptr, &m, 8); } static void @@ -179,15 +179,15 @@ pdcp_iv_gen_aes_ctr_zs(struct rte_crypto_op *cop, const struct entity_priv *en_p iv_u64[0] = en_priv->cipher_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); iv_u64[1] = 0; - rte_memcpy(iv, iv_u64, PDCP_IV_LEN); + memcpy(iv, iv_u64, PDCP_IV_LEN); iv += PDCP_IV_LEN; iv_u64[0] = en_priv->auth_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); - rte_memcpy(iv, &iv_u64[0], 8); + memcpy(iv, &iv_u64[0], 8); iv_u64[1] = iv_u64[0] ^ en_priv->auth_iv_part.u64[1]; - rte_memcpy(iv + 8, &iv_u64[1], 8); + memcpy(iv + 8, &iv_u64[1], 8); } static int From patchwork Wed May 22 03:27:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140248 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8A32E44093; Wed, 22 May 2024 05:31:53 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 38E7B40A71; Wed, 22 May 2024 05:30:44 +0200 (CEST) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id 605E940695 for ; Wed, 22 May 2024 05:30:35 +0200 (CEST) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1ed41eb3382so6452965ad.0 for ; Tue, 21 May 2024 20:30:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348634; x=1716953434; 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=KNssdkO4h/d0O43YwqDIkUM5fIncjTeUXF3OtgTY6Nc=; b=opOpN4Hh/SBL32MDLDKUVOTwE8BgrFK7MMLRWzthjICnnFQ6KS0442vxQKgDCuDBFT dKv2CUpAzMvoc+0yB8wRca6Na9nIvRguaJeYkzpvIn38DReirkPWgOB9Eakhg2SbscB+ 5qzNFuc+RoDX8VtlDZwH2Ya6+xfjlesDIiTeJoLWAGlVK/Fyr77L84TISQCWroghshiz fZLFFBF6ourFr63W/FVL9XbgzvBJ65xuidqfNaCFkHKKydiwwnhaA+ZQhkkOVj7zleoi tatDLU8z3cSMG1D/3cEy8gINMz+UtiElDczvjk/T1Z4gK2JllTY0bictIh3RCR1mT+Vz sNDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348634; x=1716953434; 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=KNssdkO4h/d0O43YwqDIkUM5fIncjTeUXF3OtgTY6Nc=; b=lMj5o4mAsN5oBXT49oCYyNQWwlTo0RTOIclnKKkryZwQn2VJ2ilBzYkqt0zF6O9K9x xQ9WgZDTPlHFaTYUIP8OWt7ep6TkMHKO6UMQfhKgp3LBZn/2TetLpGtXpIOiHUx0MguG 3DMYcWfz/juDOAh/4HlxuyEVu5+xxkybOpNgePDtgFFEwERTM2Azy0sri+hKRjLAi0Gq tWstdqEfcEC93iRX+GgEtTCLnndr+7m+qKqvsCaaHvESDQS5IOOqZj/qFL9/fAGJvftq jIPfEx/B5fY5mtBmQwuLOhMeqyWP8Yk0xiEzgn88QSTqlwPwj/tx8DYoCWXicjkg5VLn ankg== X-Gm-Message-State: AOJu0Yw9uPYrcq08HF0mbyDPjUlTDdVZUEqmzLwXpaiuktNqIJqrpvsf WkzLbap1+Kow/sel0YJ6VlzO2QK4wSHJzohQ/+HDgypDC0hArqzESskubfgw0cETH0sPXlTHnlg DazQ= X-Google-Smtp-Source: AGHT+IGLcdBRBgcmB7t1XQ+OI4UTZP+lS5I8FBMz70MOYJtWsViHymmsooBkIbtCH5UEvPk83FzgEA== X-Received: by 2002:a17:903:40c5:b0:1f3:b35:ebab with SMTP id d9443c01a7336-1f31c9e6cddmr13156375ad.51.1716348634644; Tue, 21 May 2024 20:30:34 -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.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:34 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Cristian Dumitrescu Subject: [PATCH v5 11/32] pipeline: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:38 -0700 Message-ID: <20240522033009.143100-12-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 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 --- lib/pipeline/rte_table_action.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/pipeline/rte_table_action.c b/lib/pipeline/rte_table_action.c index 87c3e0e2c9..aec84deed5 100644 --- a/lib/pipeline/rte_table_action.c +++ b/lib/pipeline/rte_table_action.c @@ -1441,7 +1441,7 @@ pkt_ipv6_work_nat(struct rte_ipv6_hdr *ip, tcp->src_port, data->port); - rte_memcpy(ip->src_addr, data->addr, 16); + memcpy(ip->src_addr, data->addr, 16); tcp->src_port = data->port; tcp->cksum = tcp_cksum; } else { @@ -1454,7 +1454,7 @@ pkt_ipv6_work_nat(struct rte_ipv6_hdr *ip, udp->src_port, data->port); - rte_memcpy(ip->src_addr, data->addr, 16); + memcpy(ip->src_addr, data->addr, 16); udp->src_port = data->port; udp->dgram_cksum = udp_cksum; } @@ -1469,7 +1469,7 @@ pkt_ipv6_work_nat(struct rte_ipv6_hdr *ip, tcp->dst_port, data->port); - rte_memcpy(ip->dst_addr, data->addr, 16); + memcpy(ip->dst_addr, data->addr, 16); tcp->dst_port = data->port; tcp->cksum = tcp_cksum; } else { @@ -1482,7 +1482,7 @@ pkt_ipv6_work_nat(struct rte_ipv6_hdr *ip, udp->dst_port, data->port); - rte_memcpy(ip->dst_addr, data->addr, 16); + memcpy(ip->dst_addr, data->addr, 16); udp->dst_port = data->port; udp->dgram_cksum = udp_cksum; } From patchwork Wed May 22 03:27:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140249 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EBBA644093; Wed, 22 May 2024 05:31:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9208D40DCA; Wed, 22 May 2024 05:30:45 +0200 (CEST) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id 2E36E40698 for ; Wed, 22 May 2024 05:30:36 +0200 (CEST) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1ee38966529so3618095ad.1 for ; Tue, 21 May 2024 20:30:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348635; x=1716953435; 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=PGi90epMJ/pclaSLUu7UxclwzRV2+JGVGUTq+rpiSgY=; b=B6RN6SFDq4BFq2F9dCuZhnI9P7sztTgaU8Lvk+Pgp2E28zO4iGztPCnZj4yWgZ1vtO 42amyZr8rAN1nRQq8Oo2LzddSn47Hfrnke3tIh2Zj6LgqxNu867oyREQZ+eg4m99AKFb NKErq1qPZzBjyNhHmP7O08R3CD/lkI0Y+1rF34Nyvf7IHMh5Ib3ywuy9Hh0DWUDU+yy2 hTr9F7Xu51nMlAkYSLH1lf2O5mgLaOYBUjftZUx4Rsq1pThoiuvjrsN0qi2/rU9iMpJM 1Hd0t4UMA5jyDipCfu4w7INTTLmqcY8PRrWGW2yjLPTIjXcvnI3GOhJSn7NwdKrzsoWz 5Vjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348635; x=1716953435; 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=PGi90epMJ/pclaSLUu7UxclwzRV2+JGVGUTq+rpiSgY=; b=Hul6MuInT5vf13pkijAVnvoR/XO5Zn3fe1yt0WYuWe1+muCQ21mD1DyEKDRPPRK6qY TjmNPs5PFKcjvgD0LjvrSgR/gtbx3yzeyUxrjzBFzAxkspv2tPevR4ASJBz0VPjulPIq 0D2gMsSg1J78ciOO7dwqj8KkfvfXOoDcIPPxh6pWtetk4lfz81Ua7I5XPtfnHr4V1s9R vq6PtzzvvVGWTICiH8gS7716NAf6Bn9PI4SlWq9tPzKax/8n3EiD0FRkDASlcN3ku2IN 7NpHPkIRNkBYgMuCHnVxDLtI00JGGl3XfvsO86axbenQRjzgrCOdKkq5thZygQadDqxW SVVQ== X-Gm-Message-State: AOJu0YxjSqo/Ezz5++WhMgAiT556J2zQkmdZkwAnDVB+2igLJUeqrOpa 3D/n673DhflBV/XJEA4lqe2MN0/ZLsx0SnCSSpwBiph/CH1lWKSPWTvnvX9xLAIGyVOhgVg/OSA uaeI= X-Google-Smtp-Source: AGHT+IHowV3UWYCiDvW0z2sxVjt52peoAfxlb5FpkdEgIWiNGlFW7WmulNNpOvElfuze/94rzCaczQ== X-Received: by 2002:a17:903:32d2:b0:1f2:fab9:a0a2 with SMTP id d9443c01a7336-1f31ace2fe6mr12497145ad.1.1716348635387; Tue, 21 May 2024 20:30:35 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:35 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Vladimir Medvedkin Subject: [PATCH v5 12/32] rib: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:39 -0700 Message-ID: <20240522033009.143100-13-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 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 Mostly automatically generated by devtools/cocci/rte_memcpy.cocci The fib/trie.c was relying on headers rte_rib6 -> rte_memcpy -> rte_vect since rib6 is no longer using rte_memcpy need to get rte_vect.h Signed-off-by: Stephen Hemminger --- lib/fib/trie.c | 2 +- lib/rib/rte_rib6.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/fib/trie.c b/lib/fib/trie.c index 09470e7287..a77f6c758b 100644 --- a/lib/fib/trie.c +++ b/lib/fib/trie.c @@ -9,7 +9,7 @@ #include #include #include - +#include #include #include #include "trie.h" diff --git a/lib/rib/rte_rib6.h b/lib/rib/rte_rib6.h index 775286f965..f366d3d197 100644 --- a/lib/rib/rte_rib6.h +++ b/lib/rib/rte_rib6.h @@ -14,7 +14,8 @@ * Level compressed tree implementation for IPv6 Longest Prefix Match */ -#include +#include + #include #ifdef __cplusplus @@ -61,7 +62,7 @@ rte_rib6_copy_addr(uint8_t *dst, const uint8_t *src) { if ((dst == NULL) || (src == NULL)) return; - rte_memcpy(dst, src, RTE_RIB6_IPV6_ADDR_SIZE); + memcpy(dst, src, RTE_RIB6_IPV6_ADDR_SIZE); } /** From patchwork Wed May 22 03:27:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140250 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3BA0844093; Wed, 22 May 2024 05:32:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DEEC840DD8; Wed, 22 May 2024 05:30:46 +0200 (CEST) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mails.dpdk.org (Postfix) with ESMTP id 36FDC406B6 for ; Wed, 22 May 2024 05:30:37 +0200 (CEST) Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1f05b669b6cso6976785ad.3 for ; Tue, 21 May 2024 20:30:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348636; x=1716953436; 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=t8IiiMVjqIJ9Nyl4AAxJjPF6IvqqEiV7liFyz4ccLN8=; b=t1gCxCfqFcPo4V4dZQBC72vtAXfErTY3p/CtSO4Mr0dYVwYtL9WojKhbpNigty6hGo LPa0gSys1pj3Xz7Mq7R7GWd06Xv+q2OVeFwC0nCEgZpXOYb7PnGW0jKtG7Gvp95HlYT6 pzWQpsauvttac/QD1CdL6TGc4g/LJb8docBXu25BT2n9D9YxrvpvxcPuEmdOwWWKphM4 a1wguZSUpJWahq2bi6EnhgloyeySl4wK6yTanuLg9xA5Vp9n803OpFXQhLRy71RZ9RXT NmuxjSTFZ6oCmy6DV1Z4jsepcXZIDvYdIiCUsSXaXa+swm3Wjb9mj0px1XsJ9B//pHWh 4LNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348636; x=1716953436; 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=t8IiiMVjqIJ9Nyl4AAxJjPF6IvqqEiV7liFyz4ccLN8=; b=VL4YsPbgBOdEzPiyJFl+k+lxpwVTr1nGBz5XV5Bkotd3/vaWmhYbuB2sbSKH/8DWni dw5rT95pIszTneVo9/nJ808c8cfaEmirkn3tSh5vHq3RIqGXO181PSzj1l0K2eNCAEjU URKulOsAF55aPLIMPiXFFo8vLFssqMPtD/ytyoC1GYRU2/7LwL9hTkLjVUZoj7JICVaZ /EgUrTuX0APRzY72nbugD4kF4fQcnNhVlihT8Ll6SH6OrzpK67H2ss96bUa5Ot/NXnz7 u+rU2Dy/jbxc1ZRR2PhlR7yHbW+i0BYqv0CT32eJQzKZqz1IggSaLH+4fqLbvq9C3rdp WgZg== X-Gm-Message-State: AOJu0YySiPIaYn1tuP6mp4i4EqHJyhMfVopBhbH2B8462UfAqO7dx5L2 TyUVHo26FgyKlu9BUogna0gew1l0PUnTJwpzo6Mys+IVvSH7iFkcNyYcw8BSOUbd1j/q8X77VU1 xNwY= X-Google-Smtp-Source: AGHT+IF2Dy9d6vzz2IdYpq3J+qZozQ7UBJHX5dXcUBBjv5ahgL9k8fmC2b9ldIozaNr04YCce4UY0g== X-Received: by 2002:a17:902:b197:b0:1ea:cb6f:ee5b with SMTP id d9443c01a7336-1f31c991397mr7704875ad.38.1716348636275; Tue, 21 May 2024 20:30:36 -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.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:35 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Akhil Goyal , Anoob Joseph Subject: [PATCH v5 13/32] security: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:40 -0700 Message-ID: <20240522033009.143100-14-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 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 --- lib/security/rte_security.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/security/rte_security.c b/lib/security/rte_security.c index e5c862f5f5..28d59ef388 100644 --- a/lib/security/rte_security.c +++ b/lib/security/rte_security.c @@ -384,7 +384,7 @@ crypto_caps_array(struct rte_tel_data *d, while ((dev_caps = &capabilities[i++])->op != RTE_CRYPTO_OP_TYPE_UNDEFINED) { memset(&caps_val, 0, CRYPTO_CAPS_SZ * sizeof(caps_val[0])); - rte_memcpy(caps_val, dev_caps, sizeof(capabilities[0])); + memcpy(caps_val, dev_caps, sizeof(capabilities[0])); for (j = 0; j < CRYPTO_CAPS_SZ; j++) rte_tel_data_add_array_uint(d, caps_val[j]); } @@ -409,7 +409,7 @@ sec_caps_array(struct rte_tel_data *d, while ((dev_caps = &capabilities[i++])->action != RTE_SECURITY_ACTION_TYPE_NONE) { memset(&caps_val, 0, SEC_CAPS_SZ * sizeof(caps_val[0])); - rte_memcpy(caps_val, dev_caps, sizeof(capabilities[0])); + memcpy(caps_val, dev_caps, sizeof(capabilities[0])); for (j = 0; j < SEC_CAPS_SZ; j++) rte_tel_data_add_array_uint(d, caps_val[j]); } From patchwork Wed May 22 03:27:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140251 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6BF8B44093; Wed, 22 May 2024 05:32:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 58AA840DF5; Wed, 22 May 2024 05:30:48 +0200 (CEST) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by mails.dpdk.org (Postfix) with ESMTP id 1A5EB406B6 for ; Wed, 22 May 2024 05:30:38 +0200 (CEST) Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-656d8b346d2so1813305a12.2 for ; Tue, 21 May 2024 20:30:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348637; x=1716953437; 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=JSN1m+l+oNwDoCRQ0Gjdhbiuoczq/kMhohXgq879O5o=; b=IANALG0vkQHSXdHe+A0qB/iDTewKoxa2cFS+XYY2orj1dBFRkzYbl+8OXnEfQ7kc/j Cpxml7SsxoX5/80nA9dnRLUOLew34gDSyu9z7EMyznFnvG+veklyRSTxcvgOFsquR2Wv jTmXgg9TV7RJM6YTB3RgBQD42IXt+s139zuzLbqEEDiLabxzBtumNQ1x0F9FsXO88Uud LDcVuZG2niRfHnyJgKYwUwtA1GFD1woZEVroGqvLTTzY+VgTex8cdUmJWdusHazjLE+9 kQLNGDuF/xrG9V0WAw/vMIfn3RRP2zWGAM6t5BVwYL0zJLG6HGs4/ps+A4UADywTuKoh iPjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348637; x=1716953437; 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=JSN1m+l+oNwDoCRQ0Gjdhbiuoczq/kMhohXgq879O5o=; b=MAaNwXevh2p/Vd8eGsD/OydF9vK57xcaP2iZfJUUxXOdXyYS7AoGwg+p/1kL1uhaRQ LE8UL7GEAumQfB/p6TWxpH9sTvXAcDcLfmJb+/w1u9wbXLl/BnL117ViVc8/BnQ3BYkC BwGwsOnMlNT+gfZvGn+q/PF+1n5FCXDjRCxGrJlS4C28TSoXeGFgrMHRPdY4/CACD74/ AuCbQcuuTOljvC5xL+8bb5sDCvd5/NwZvGTUrdcgKRSh8vswOaWASrG/KFkU6fUj8nt8 7HPbexSVf25A1BKBQEcZi8ats0en3sWJi0ZREmmI/i2eQxGKOcXKk7RE46byz8ThO4ff HFvg== X-Gm-Message-State: AOJu0YyYhNT45XKn+Qex7wY7nK+MhelnDgIL0D31DgSelljL+lmMaISE 1J+pOWlYTwU5puy23uxEifpfnD60t5XfGKcICe8o4+6BskgtMzywyH0mbv7KD3eENgO2m9nw6zp ia6A= X-Google-Smtp-Source: AGHT+IENzP7VLL6tpkVxQmsEvunXdpUTDSTgw2Cph34eFRS81xguLhu7OsMi83FA8IbGwut0Lkkhkg== X-Received: by 2002:a17:90a:d782:b0:2bd:773c:e49e with SMTP id 98e67ed59e1d1-2bd9f450afcmr944470a91.16.1716348637259; Tue, 21 May 2024 20:30:37 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:36 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Parav Pandit , Xueming Li , Hemant Agrawal , Sachin Saxena , Chenbo Xia , Nipun Gupta Subject: [PATCH v5 14/32] bus: remove unneeded rte_memcpy.h include Date: Tue, 21 May 2024 20:27:41 -0700 Message-ID: <20240522033009.143100-15-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 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 Included here but never used. Signed-off-by: Stephen Hemminger --- drivers/bus/auxiliary/linux/auxiliary.c | 1 - drivers/bus/fslmc/fslmc_bus.c | 1 - drivers/bus/fslmc/fslmc_vfio.c | 1 - drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 1 - drivers/bus/fslmc/portal/dpaa2_hw_dpci.c | 1 - drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 1 - drivers/bus/pci/linux/pci.c | 1 - 7 files changed, 7 deletions(-) diff --git a/drivers/bus/auxiliary/linux/auxiliary.c b/drivers/bus/auxiliary/linux/auxiliary.c index 02fc9285dc..011278d79b 100644 --- a/drivers/bus/auxiliary/linux/auxiliary.c +++ b/drivers/bus/auxiliary/linux/auxiliary.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include "../private.h" diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c index c155f4a2fd..6696aa2575 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c index 5966776a85..2011cd6e77 100644 --- a/drivers/bus/fslmc/fslmc_vfio.c +++ b/drivers/bus/fslmc/fslmc_vfio.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c index d7f6e45b7d..cc4d51c7f2 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c index 07256ed7ec..5ff98b2176 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c @@ -13,7 +13,6 @@ #include #include -#include #include #include #include diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index 4aec7b2cd8..bb8efc1871 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c index 3d237398d9..12e58735b7 100644 --- a/drivers/bus/pci/linux/pci.c +++ b/drivers/bus/pci/linux/pci.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include "eal_filesystem.h" From patchwork Wed May 22 03:27:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140252 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 147E044093; Wed, 22 May 2024 05:32:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 128E240E25; Wed, 22 May 2024 05:30:50 +0200 (CEST) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by mails.dpdk.org (Postfix) with ESMTP id D4F0D406BC for ; Wed, 22 May 2024 05:30:38 +0200 (CEST) Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-5d81b08d6f2so728102a12.0 for ; Tue, 21 May 2024 20:30:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348638; x=1716953438; 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=2OLCzTpVdNBqCNj9iyBJUDA/dJM+98eWk1gEQ44noaw=; b=Pn+Y+zGkB9JeT2r8d+AlHKqDyNJglo+3ORxD2THPtro0eoZRKS5yHXLaZymjcinqwJ j+NFhszuwZHDeFSmlJWy6ryQXNTs8C9sblOVkzCYFMnadzETn9jddgIuMkeLpz8wk5Yj 8TPF9nNGL1yJ7Pbva2J/Jtm3JDu4MT6HdvQquTrBW1EddR8fX7ItP103UPqAWoetEDxZ 8YHK3t6C6mNes/tyhwX6NICI9Q/SGa37C9A3PT5DPCIoRJlBEO+TLQNtoBZ8UGFXOT6t HzbR1dSC39FVEYftLwWw1os9kOWfS3D5htyWTdjz0bARpgO2GxxkHXGKlWHwT7Duf0EL S/UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348638; x=1716953438; 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=2OLCzTpVdNBqCNj9iyBJUDA/dJM+98eWk1gEQ44noaw=; b=btxxbnKNMgcMhDFiJxKJX+95e2XEcBfCGMl8263KcPJhvqB/nnd/VO13gzB6X5vHwp UZrl0S20kHIItIDZ8Rt5kjaJ8591jfFNAjfA4a2ggZYCKfT7NO/DshPmVSLVbi282v7J v2lCLzb6HCuprYjN5uv3ejyf+ArMKU0X5Lps+ixLJ+ox1FRKG1N6+wtdP4rBGgSH3Xgh czVB8BIrRn9sv1xp43e0aACh07I+oj93AhJsPipHUDrJ2B64tonoLIxb1McvgtHzwh9f ZfNJzs5gZlKwFgu9LJP/HwNecBM6cHXx6vHJPlWrzUuLutSPSCHr1WkB5PRDM75sIU44 vhTg== X-Gm-Message-State: AOJu0YyaeOgzkr+ECf9UyDxUmokA9nqC7xnQNAA3/raGm74jqAC9Z0AO /DLUZtFiG8p/FC2IdxRrk84slU3Zam0GYUh5mZInGwz1E1nXWcWKMIhMWkjx4AN047lqkCxGZjg r3a4= X-Google-Smtp-Source: AGHT+IEgfdx+lGCVykvJJcbCosPjYo/1qd0sQWjcsJ5Lk1tt6U9Z6pcCLx2AYgYBskyksCYyhVYeNg== X-Received: by 2002:a17:903:182:b0:1f2:f382:5017 with SMTP id d9443c01a7336-1f31c9e6f6bmr12655975ad.54.1716348638135; Tue, 21 May 2024 20:30:38 -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.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:37 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Rosen Xu , Sachin Saxena , Hemant Agrawal Subject: [PATCH v5 15/32] raw: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:42 -0700 Message-ID: <20240522033009.143100-16-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 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/raw/ifpga/afu_pmd_he_hssi.c | 3 +-- drivers/raw/ifpga/afu_pmd_he_lpbk.c | 3 +-- drivers/raw/ifpga/afu_pmd_he_mem.c | 3 +-- drivers/raw/ifpga/afu_pmd_n3000.c | 8 ++++---- drivers/raw/ifpga/ifpga_rawdev.c | 11 +++++------ drivers/raw/skeleton/skeleton_rawdev.c | 8 +++----- drivers/raw/skeleton/skeleton_rawdev_test.c | 1 - 7 files changed, 15 insertions(+), 22 deletions(-) diff --git a/drivers/raw/ifpga/afu_pmd_he_hssi.c b/drivers/raw/ifpga/afu_pmd_he_hssi.c index 859f28dcc1..c2aaed9203 100644 --- a/drivers/raw/ifpga/afu_pmd_he_hssi.c +++ b/drivers/raw/ifpga/afu_pmd_he_hssi.c @@ -15,7 +15,6 @@ #include #include -#include #include #include #include @@ -314,7 +313,7 @@ static int he_hssi_config(struct afu_rawdev *dev, void *config, if (cfg->port >= NUM_HE_HSSI_PORTS) return -EINVAL; - rte_memcpy(&priv->he_hssi_cfg, cfg, sizeof(priv->he_hssi_cfg)); + memcpy(&priv->he_hssi_cfg, cfg, sizeof(priv->he_hssi_cfg)); return 0; } diff --git a/drivers/raw/ifpga/afu_pmd_he_lpbk.c b/drivers/raw/ifpga/afu_pmd_he_lpbk.c index c7c5cda48c..ffb7075c84 100644 --- a/drivers/raw/ifpga/afu_pmd_he_lpbk.c +++ b/drivers/raw/ifpga/afu_pmd_he_lpbk.c @@ -15,7 +15,6 @@ #include #include -#include #include #include #include @@ -363,7 +362,7 @@ static int he_lpbk_config(struct afu_rawdev *dev, void *config, if ((cfg->end < cfg->begin) || (cfg->end > MAX_CACHE_LINES)) return -EINVAL; - rte_memcpy(&priv->he_lpbk_cfg, cfg, sizeof(priv->he_lpbk_cfg)); + memcpy(&priv->he_lpbk_cfg, cfg, sizeof(priv->he_lpbk_cfg)); return 0; } diff --git a/drivers/raw/ifpga/afu_pmd_he_mem.c b/drivers/raw/ifpga/afu_pmd_he_mem.c index a1db533eeb..b799e40d2d 100644 --- a/drivers/raw/ifpga/afu_pmd_he_mem.c +++ b/drivers/raw/ifpga/afu_pmd_he_mem.c @@ -14,7 +14,6 @@ #include #include -#include #include #include #include @@ -126,7 +125,7 @@ static int he_mem_tg_config(struct afu_rawdev *dev, void *config, if (config_size != sizeof(struct rte_pmd_afu_he_mem_tg_cfg)) return -EINVAL; - rte_memcpy(&priv->he_mem_tg_cfg, config, sizeof(priv->he_mem_tg_cfg)); + memcpy(&priv->he_mem_tg_cfg, config, sizeof(priv->he_mem_tg_cfg)); return 0; } diff --git a/drivers/raw/ifpga/afu_pmd_n3000.c b/drivers/raw/ifpga/afu_pmd_n3000.c index 67b3941265..9236c0b153 100644 --- a/drivers/raw/ifpga/afu_pmd_n3000.c +++ b/drivers/raw/ifpga/afu_pmd_n3000.c @@ -1867,8 +1867,8 @@ static int n3000_afu_config(struct afu_rawdev *dev, void *config, if ((cfg->nlb_cfg.end < cfg->nlb_cfg.begin) || (cfg->nlb_cfg.end > MAX_CACHE_LINES)) return -EINVAL; - rte_memcpy(&priv->nlb_cfg, &cfg->nlb_cfg, - sizeof(struct rte_pmd_afu_nlb_cfg)); + memcpy(&priv->nlb_cfg, &cfg->nlb_cfg, + sizeof(struct rte_pmd_afu_nlb_cfg)); } else if (cfg->type == RTE_PMD_AFU_N3000_DMA) { if (cfg->dma_cfg.index >= NUM_N3000_DMA) return -EINVAL; @@ -1887,8 +1887,8 @@ static int n3000_afu_config(struct afu_rawdev *dev, void *config, cfg->dma_cfg.length); } } - rte_memcpy(&priv->dma_cfg, &cfg->dma_cfg, - sizeof(struct rte_pmd_afu_dma_cfg)); + memcpy(&priv->dma_cfg, &cfg->dma_cfg, + sizeof(struct rte_pmd_afu_dma_cfg)); } else { IFPGA_RAWDEV_PMD_ERR("Invalid type of N3000 AFU"); return -EINVAL; diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c index a972b3b7a4..4057fcdca2 100644 --- a/drivers/raw/ifpga/ifpga_rawdev.c +++ b/drivers/raw/ifpga/ifpga_rawdev.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -258,7 +257,7 @@ static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev) if (point < 12) return -1; point -= 12; - rte_memcpy(ifpga_dev->parent_bdf, &link[point], 12); + memcpy(ifpga_dev->parent_bdf, &link[point], 12); point = strlen(link1); if (point < 26) @@ -949,10 +948,10 @@ ifpga_rawdev_pr(struct rte_rawdev *dev, if (ret) return ret; - rte_memcpy(&afu_pr_conf->afu_id.uuid.uuid_low, uuid.b, - sizeof(u64)); - rte_memcpy(&afu_pr_conf->afu_id.uuid.uuid_high, uuid.b + 8, - sizeof(u64)); + memcpy(&afu_pr_conf->afu_id.uuid.uuid_low, uuid.b, + sizeof(u64)); + memcpy(&afu_pr_conf->afu_id.uuid.uuid_high, uuid.b + 8, + sizeof(u64)); IFPGA_RAWDEV_PMD_INFO("%s: uuid_l=0x%lx, uuid_h=0x%lx\n", __func__, diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/skeleton_rawdev.c index 6e99d35536..256f45cb5d 100644 --- a/drivers/raw/skeleton/skeleton_rawdev.c +++ b/drivers/raw/skeleton/skeleton_rawdev.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -245,8 +244,8 @@ static int skeleton_rawdev_queue_def_conf(struct rte_rawdev *dev, skelq = &skeldev->queues[queue_id]; if (queue_id < SKELETON_MAX_QUEUES) - rte_memcpy(queue_conf, skelq, - sizeof(struct skeleton_rawdev_queue)); + memcpy(queue_conf, skelq, + sizeof(struct skeleton_rawdev_queue)); return 0; } @@ -281,8 +280,7 @@ static int skeleton_rawdev_queue_setup(struct rte_rawdev *dev, if (skeldev->num_queues > queue_id && q->depth < SKELETON_QUEUE_MAX_DEPTH) { - rte_memcpy(q, queue_conf, - sizeof(struct skeleton_rawdev_queue)); + memcpy(q, queue_conf, sizeof(struct skeleton_rawdev_queue)); clear_queue_bufs(queue_id); } else { SKELETON_PMD_ERR("Invalid queue configuration"); diff --git a/drivers/raw/skeleton/skeleton_rawdev_test.c b/drivers/raw/skeleton/skeleton_rawdev_test.c index b7a7f623aa..dc32c4e29b 100644 --- a/drivers/raw/skeleton/skeleton_rawdev_test.c +++ b/drivers/raw/skeleton/skeleton_rawdev_test.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include From patchwork Wed May 22 03:27:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140253 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9D84C44093; Wed, 22 May 2024 05:32:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EBE7B40E78; Wed, 22 May 2024 05:30:52 +0200 (CEST) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mails.dpdk.org (Postfix) with ESMTP id E820E40A4B for ; Wed, 22 May 2024 05:30:39 +0200 (CEST) Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1eecc71311eso6797325ad.3 for ; Tue, 21 May 2024 20:30:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348639; x=1716953439; 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=4sGEJAtI3M/DtmkYO9snYfPDe9KjyJqXHXFqxCjbI44=; b=H5QvMSMCXejEvhm1PQm5rcu0Bhe8FVVAtf2nTRi/QxMu4iutqfeefu/xDrCkuQMqju 88Fg3MaPiVMX41Pl4XzGlLtt7oLsf/qPU4Yax2uPxmtNQ5pG7wyY1ip1gCC0TyH8oaP7 EELt9qLkIDS0sBaoQ/fZQOV5+UZKT9h+RTBEDWEw6VsB6iyUf1hiBOdEOl0jHc6PKUUG F70rMppysahHdXVbHr2a8EWzvnsZ6k0LPTyOg7lyerQ6ZLvv9N2xogCVwANk5pmtacM5 aZrL7piZNkJqY2vuJFcg/NFlOke5o7hztH9d7eZupU64BRxmEB3SYM/nKjgd3YW0bwq8 BBNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348639; x=1716953439; 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=4sGEJAtI3M/DtmkYO9snYfPDe9KjyJqXHXFqxCjbI44=; b=J0cp5TX1Yfzo65mGpmuasXeNu2zKsfNtUfXBYaK8fwy64queUdMNvY6Wh16hw9bU5V +Pc7xACR+ikPi1XeJorfckUvuc/IbN6chB8h0Ilqd/D5erJxsm2bIWdTtCil5L+3Iff6 z2mVsiPY5mhU44P5Nwd6ITJEx+HPkO2CWw0+Sd+gCBqN3k+RZ7Of6Chk4STCiFmU5NbQ tpSwFXzit3ei62aGSjoPwjF0k06ZjBxHU5rIZkzQQS0EwkG0HUXWOCeG2kJreOQfGSOe mX9hIgxq0P41JnS0kGzJThkvMuj1B9lN8Qm3wY9AWRhdWAT9sv8E9hARcV3bhoANUVDz gV4Q== X-Gm-Message-State: AOJu0Yygn5y43jc2GwYOKenaoRGbH7C2c8Ncyq36V6dnRMV91cs0WJs8 KbenI3U9owaByInR9xvxKNBTJYMnVRkTYKhRhMmOqToXCcIUQFquIW0ATsKV7ka7sp7V7GNdBCE 4Zhs= X-Google-Smtp-Source: AGHT+IHWP6kjHqwkp/sorf7iks8957/772hlMEVqpzELnCil9amtYCvITd9dBvjbGL8+8S6vii2G3Q== X-Received: by 2002:a17:902:650e:b0:1ec:3019:c72c with SMTP id d9443c01a7336-1f31ca38468mr9448485ad.68.1716348638994; Tue, 21 May 2024 20:30:38 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:38 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Nicolas Chautru , Gagandeep Singh , Hemant Agrawal Subject: [PATCH v5 16/32] baseband: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:43 -0700 Message-ID: <20240522033009.143100-17-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 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/baseband/acc/rte_acc100_pmd.c | 16 +++++++--------- drivers/baseband/acc/rte_vrb_pmd.c | 21 ++++++++++----------- drivers/baseband/la12xx/bbdev_la12xx.c | 4 ++-- 3 files changed, 19 insertions(+), 22 deletions(-) diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c index ee50b9c60c..4a929d9cfa 100644 --- a/drivers/baseband/acc/rte_acc100_pmd.c +++ b/drivers/baseband/acc/rte_acc100_pmd.c @@ -2975,15 +2975,13 @@ enqueue_ldpc_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op, uint8_t *prev_ptr = (uint8_t *) prev_desc; uint8_t *new_ptr = (uint8_t *) desc; /* Copy first 4 words and BDESCs */ - rte_memcpy(new_ptr, prev_ptr, ACC_5GUL_SIZE_0); - rte_memcpy(new_ptr + ACC_5GUL_OFFSET_0, - prev_ptr + ACC_5GUL_OFFSET_0, - ACC_5GUL_SIZE_1); + memcpy(new_ptr, prev_ptr, ACC_5GUL_SIZE_0); + memcpy(new_ptr + ACC_5GUL_OFFSET_0, + prev_ptr + ACC_5GUL_OFFSET_0, ACC_5GUL_SIZE_1); desc->req.op_addr = prev_desc->req.op_addr; /* Copy FCW */ - rte_memcpy(new_ptr + ACC_DESC_FCW_OFFSET, - prev_ptr + ACC_DESC_FCW_OFFSET, - ACC_FCW_LD_BLEN); + memcpy(new_ptr + ACC_DESC_FCW_OFFSET, + prev_ptr + ACC_DESC_FCW_OFFSET, ACC_FCW_LD_BLEN); acc100_dma_desc_ld_update(op, &desc->req, input, h_output, &in_offset, &h_out_offset, &h_out_length, harq_layout); @@ -3130,7 +3128,7 @@ enqueue_ldpc_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op, desc = acc_desc(q, total_enqueued_cbs); desc->req.data_ptrs[0].address = q->ring_addr_iova + fcw_offset; desc->req.data_ptrs[0].blen = ACC_FCW_LD_BLEN; - rte_memcpy(&desc->req.fcw_ld, &desc_first->req.fcw_ld, ACC_FCW_LD_BLEN); + memcpy(&desc->req.fcw_ld, &desc_first->req.fcw_ld, ACC_FCW_LD_BLEN); ret = acc100_dma_desc_ld_fill(op, &desc->req, &input, h_output, &in_offset, &h_out_offset, &h_out_length, @@ -4430,7 +4428,7 @@ acc100_configure(const char *dev_name, struct rte_acc_conf *conf) struct acc_device *d = bbdev->data->dev_private; /* Store configuration */ - rte_memcpy(&d->acc_conf, conf, sizeof(d->acc_conf)); + memcpy(&d->acc_conf, conf, sizeof(d->acc_conf)); value = acc_reg_read(d, HwPfPcieGpexBridgeControl); bool firstCfg = (value != ACC100_CFG_PCI_BRIDGE); diff --git a/drivers/baseband/acc/rte_vrb_pmd.c b/drivers/baseband/acc/rte_vrb_pmd.c index 585dc49bd6..bb11ff887a 100644 --- a/drivers/baseband/acc/rte_vrb_pmd.c +++ b/drivers/baseband/acc/rte_vrb_pmd.c @@ -2450,15 +2450,13 @@ vrb_enqueue_ldpc_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op, uint8_t *prev_ptr = (uint8_t *) prev_desc; uint8_t *new_ptr = (uint8_t *) desc; /* Copy first 4 words and BDESCs. */ - rte_memcpy(new_ptr, prev_ptr, ACC_5GUL_SIZE_0); - rte_memcpy(new_ptr + ACC_5GUL_OFFSET_0, - prev_ptr + ACC_5GUL_OFFSET_0, - ACC_5GUL_SIZE_1); + memcpy(new_ptr, prev_ptr, ACC_5GUL_SIZE_0); + memcpy(new_ptr + ACC_5GUL_OFFSET_0, + prev_ptr + ACC_5GUL_OFFSET_0, ACC_5GUL_SIZE_1); desc->req.op_addr = prev_desc->req.op_addr; /* Copy FCW. */ - rte_memcpy(new_ptr + ACC_DESC_FCW_OFFSET, - prev_ptr + ACC_DESC_FCW_OFFSET, - ACC_FCW_LD_BLEN); + memcpy(new_ptr + ACC_DESC_FCW_OFFSET, + prev_ptr + ACC_DESC_FCW_OFFSET, ACC_FCW_LD_BLEN); vrb_dma_desc_ld_update(op, &desc->req, input, h_output, &in_offset, &h_out_offset, &h_out_length, harq_layout); @@ -2566,7 +2564,8 @@ vrb_enqueue_ldpc_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op, fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET; desc->req.data_ptrs[0].address = q->ring_addr_iova + fcw_offset; desc->req.data_ptrs[0].blen = ACC_FCW_LD_BLEN; - rte_memcpy(&desc->req.fcw_ld, &desc_first->req.fcw_ld, ACC_FCW_LD_BLEN); + memcpy(&desc->req.fcw_ld, &desc_first->req.fcw_ld, + ACC_FCW_LD_BLEN); desc->req.fcw_ld.tb_trailer_size = (c - r - 1) * trail_len; ret = vrb_dma_desc_ld_fill(op, &desc->req, &input, h_output, &in_offset, &h_out_offset, @@ -4002,7 +4001,7 @@ enqueue_mldts_split_op(struct acc_queue *q, struct rte_bbdev_mldts_op *op, if (symb == 0) desc->req.cbs_in_tb = num_syms; else - rte_memcpy(&desc->req.fcw_mldts, fcw, ACC_FCW_MLDTS_BLEN); + memcpy(&desc->req.fcw_mldts, fcw, ACC_FCW_MLDTS_BLEN); desc->req.data_ptrs[1].address = rte_pktmbuf_iova_offset(input_q, in_offset); desc->req.data_ptrs[1].blen = q_size; in_offset += q_size; @@ -4352,7 +4351,7 @@ vrb1_configure(const char *dev_name, struct rte_acc_conf *conf) struct acc_device *d = bbdev->data->dev_private; /* Store configuration. */ - rte_memcpy(&d->acc_conf, conf, sizeof(d->acc_conf)); + memcpy(&d->acc_conf, conf, sizeof(d->acc_conf)); /* Check we are already out of PG. */ status = acc_reg_read(d, VRB1_PfHiSectionPowerGatingAck); @@ -4759,7 +4758,7 @@ vrb2_configure(const char *dev_name, struct rte_acc_conf *conf) struct acc_device *d = bbdev->data->dev_private; /* Store configuration. */ - rte_memcpy(&d->acc_conf, conf, sizeof(d->acc_conf)); + memcpy(&d->acc_conf, conf, sizeof(d->acc_conf)); /* Explicitly releasing AXI as this may be stopped after PF FLR/BME. */ address = VRB2_PfDmaAxiControl; diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c index bb754a5395..23e2fdb811 100644 --- a/drivers/baseband/la12xx/bbdev_la12xx.c +++ b/drivers/baseband/la12xx/bbdev_la12xx.c @@ -597,8 +597,8 @@ dequeue_single_op(struct bbdev_la12xx_q_priv *q_priv, void *dst) op = q_priv->bbdev_op[ci]; - rte_memcpy(dst, q_priv->msg_ch_vaddr[ci], - sizeof(struct bbdev_ipc_enqueue_op)); + memcpy(dst, q_priv->msg_ch_vaddr[ci], + sizeof(struct bbdev_ipc_enqueue_op)); /* Move Consumer Index forward */ ci++; From patchwork Wed May 22 03:27:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140254 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D10D344093; Wed, 22 May 2024 05:32:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7F23340EA5; Wed, 22 May 2024 05:30:54 +0200 (CEST) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mails.dpdk.org (Postfix) with ESMTP id EE0C940A6C for ; Wed, 22 May 2024 05:30:40 +0200 (CEST) Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-2bd92557274so694197a91.0 for ; Tue, 21 May 2024 20:30:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348640; x=1716953440; 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=wWGruJZndTsR6dy3JQTOVb7AKGrbye4ePcPebgwmfLQ=; b=ssed9Tax6hJjhW/WYgvMQV2Cix/xHLfi1VwrroSPzAvn1SUKDk8Lr2Ls1hqCfVYJC8 2+2fXxQJhp+tWr9wR7KSCZbXyYmtZQijPQzidr51jCVi5RU/Uc7Hxz8nrG9VgVaBwY8T jriN5B22r31VMx8ya3nw3hf0c6qWxwYatiB57kNv6xRJ4e9eeziuLjo+l9XGKr/Di23F v3sS5F6+DxFdtzM9Zd7jau/y65xuYFYnvKFXY7GRd+maDY0uKx9oH4Ak2STGAANPUzwa 9EltG9OT6SyWseKvA3ZkoDviyfd2Dmw9b2310UwE2j8m9nG2543nmGQWOKOzvqyI9J/G m/oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348640; x=1716953440; 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=wWGruJZndTsR6dy3JQTOVb7AKGrbye4ePcPebgwmfLQ=; b=GGm6ZzEKmahhM6+yWwddj8aBPxNKnOZkGmtFsB7/3tpdarpEIO8GBZuib4k2A8N8GF q9AfsV73D5AnqRBYYf6WbGBgytGmDA7NON+5D9/39MDW8Woq24Row18iWZy39uIRZKxi UO+vviGux43LikQ0SVcCUVmT/U2Df3EIMSafFs2eH+/QA1eBxkCgIkrYNbv4aBWgTXEo 7lLhOIzXLiaMdZWs9/4vlGjcfgksYNpMcIScwX0aN7ZUn6QgLmogDBwYWTlrGdidJlfe PvUj6H7CXgV6iLkTKcBm1mkLKEWX/KNL1NN2SKTxAghGm0gTaM7dK/7waMstOVpykxfA Npuw== X-Gm-Message-State: AOJu0YzvmWET6RGK2XbslqYmwCTE938IVJFBA/qTwwUuzP5srn0l3+nr 01Uk0hfmcncr9LbAZv9NpN5SrbXVoZRmCMKlLcl25lZi2pqlMnpbFZblU87UF/2GrPhA5wiRWxr 3YPc= X-Google-Smtp-Source: AGHT+IEpRFPobQJJZvItIG67+bN12A6qLOPtvGurRvueMKRJeR7me+UwIZ+i2fzHxi9YieCb1R8dhQ== X-Received: by 2002:a17:90b:a0b:b0:2bd:ad2f:e43c with SMTP id 98e67ed59e1d1-2bdad2fef41mr262851a91.29.1716348640226; Tue, 21 May 2024 20:30:40 -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.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:39 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jingjing Wu , Kai Ji , Fan Zhang , Ashish Gupta Subject: [PATCH v5 17/32] common: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:44 -0700 Message-ID: <20240522033009.143100-18-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 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 Also, remove unnecessary includes of rte_memcpy.h Signed-off-by: Stephen Hemminger --- drivers/common/idpf/idpf_common_device.c | 4 ++-- drivers/common/idpf/idpf_common_virtchnl.c | 10 ++++++---- drivers/common/qat/qat_qp.c | 10 ++++------ drivers/compress/qat/qat_comp.c | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/common/idpf/idpf_common_device.c b/drivers/common/idpf/idpf_common_device.c index 8403ed83f9..37c859f830 100644 --- a/drivers/common/idpf/idpf_common_device.c +++ b/drivers/common/idpf/idpf_common_device.c @@ -477,8 +477,8 @@ idpf_vport_init(struct idpf_vport *vport, vport->num_rx_q = vport_info->num_rx_q; vport->num_rx_bufq = vport_info->num_rx_bufq; vport->max_mtu = vport_info->max_mtu; - rte_memcpy(vport->default_mac_addr, - vport_info->default_mac_addr, ETH_ALEN); + memcpy(vport->default_mac_addr, vport_info->default_mac_addr, + ETH_ALEN); vport->rss_algorithm = vport_info->rss_algorithm; vport->rss_key_size = RTE_MIN(IDPF_RSS_KEY_LEN, vport_info->rss_key_size); diff --git a/drivers/common/idpf/idpf_common_virtchnl.c b/drivers/common/idpf/idpf_common_virtchnl.c index c46ed50eb5..baabfeb216 100644 --- a/drivers/common/idpf/idpf_common_virtchnl.c +++ b/drivers/common/idpf/idpf_common_virtchnl.c @@ -290,7 +290,8 @@ idpf_vc_caps_get(struct idpf_adapter *adapter) return err; } - rte_memcpy(&adapter->caps, args.out_buffer, sizeof(struct virtchnl2_get_capabilities)); + memcpy(&adapter->caps, args.out_buffer, + sizeof(struct virtchnl2_get_capabilities)); return 0; } @@ -327,7 +328,8 @@ idpf_vc_vport_create(struct idpf_vport *vport, return err; } - rte_memcpy(&(vport->vport_info.info), args.out_buffer, IDPF_DFLT_MBX_BUF_SIZE); + memcpy(&(vport->vport_info.info), args.out_buffer, + IDPF_DFLT_MBX_BUF_SIZE); return 0; } @@ -383,7 +385,7 @@ idpf_vc_queue_grps_add(struct idpf_vport *vport, return err; } - rte_memcpy(p2p_queue_grps_out, args.out_buffer, IDPF_DFLT_MBX_BUF_SIZE); + memcpy(p2p_queue_grps_out, args.out_buffer, IDPF_DFLT_MBX_BUF_SIZE); return 0; } @@ -922,7 +924,7 @@ idpf_vc_ptype_info_query(struct idpf_adapter *adapter, if (err != 0) DRV_LOG(ERR, "Failed to execute command of VIRTCHNL2_OP_GET_PTYPE_INFO"); - rte_memcpy(recv_ptype_info, args.out_buffer, IDPF_DFLT_MBX_BUF_SIZE); + memcpy(recv_ptype_info, args.out_buffer, IDPF_DFLT_MBX_BUF_SIZE); return err; } diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c index f95dd33375..0c30c4d8c1 100644 --- a/drivers/common/qat/qat_qp.c +++ b/drivers/common/qat/qat_qp.c @@ -871,9 +871,8 @@ qat_cq_get_fw_cipher_crc_cap(struct qat_qp *qp) return -EINVAL; } - rte_memcpy(src_data_addr, - cipher_crc_cap_check_plaintext, - sizeof(cipher_crc_cap_check_plaintext)); + memcpy(src_data_addr, cipher_crc_cap_check_plaintext, + sizeof(cipher_crc_cap_check_plaintext)); phy_src_addr = rte_mem_virt2iova(src_data_addr); if (phy_src_addr == 0 || phy_src_addr == RTE_BAD_IOVA) { @@ -892,9 +891,8 @@ qat_cq_get_fw_cipher_crc_cap(struct qat_qp *qp) auth_param = (void *)((uint8_t *)cipher_param + ICP_QAT_FW_HASH_REQUEST_PARAMETERS_OFFSET); - rte_memcpy(cipher_param->u.cipher_IV_array, - cipher_crc_cap_check_iv, - sizeof(cipher_crc_cap_check_iv)); + memcpy(cipher_param->u.cipher_IV_array, cipher_crc_cap_check_iv, + sizeof(cipher_crc_cap_check_iv)); cipher_param->cipher_offset = cipher_crc_cap_check_cipher_offset; cipher_param->cipher_length = diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c index 559948a46a..5bcbefe395 100644 --- a/drivers/compress/qat/qat_comp.c +++ b/drivers/compress/qat/qat_comp.c @@ -375,7 +375,7 @@ qat_comp_build_multiple_requests(void *in_op, struct qat_qp *qp, QAT_DP_LOG(DEBUG, "op %p, parent_cookie %p", op, parent_cookie); /* copy original op to the local variable for restoring later */ - rte_memcpy(&op_backup, op, sizeof(op_backup)); + memcpy(&op_backup, op, sizeof(op_backup)); parent_cookie->nb_child_responses = 0; parent_cookie->nb_children = 0; @@ -401,7 +401,7 @@ qat_comp_build_multiple_requests(void *in_op, struct qat_qp *qp, } /* prepare local dst mbuf */ - rte_memcpy(&dst_mbuf, op->m_dst, sizeof(dst_mbuf)); + memcpy(&dst_mbuf, op->m_dst, sizeof(dst_mbuf)); rte_pktmbuf_reset(&dst_mbuf); dst_mbuf.buf_len = dst_data_size; dst_mbuf.data_len = dst_data_size; @@ -457,7 +457,7 @@ qat_comp_build_multiple_requests(void *in_op, struct qat_qp *qp, if (ret < 0) { QAT_DP_LOG(WARNING, "Failed to build child descriptor"); /* restore op and clear cookie */ - rte_memcpy(op, &op_backup, sizeof(op_backup)); + memcpy(op, &op_backup, sizeof(op_backup)); parent_cookie->split_op = 0; parent_cookie->nb_children = 0; return ret; @@ -468,7 +468,7 @@ qat_comp_build_multiple_requests(void *in_op, struct qat_qp *qp, } /* restore backed up original op */ - rte_memcpy(op, &op_backup, sizeof(op_backup)); + memcpy(op, &op_backup, sizeof(op_backup)); if (nb_descr != num_descriptors_built) QAT_DP_LOG(ERR, "split op. expected %d, built %d", From patchwork Wed May 22 03:27:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140255 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7056A44093; Wed, 22 May 2024 05:32:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0E6B740ED3; Wed, 22 May 2024 05:30:56 +0200 (CEST) Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by mails.dpdk.org (Postfix) with ESMTP id 1430D40A71 for ; Wed, 22 May 2024 05:30:42 +0200 (CEST) Received: by mail-pg1-f175.google.com with SMTP id 41be03b00d2f7-5ff57410ebbso1914602a12.1 for ; Tue, 21 May 2024 20:30:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348641; x=1716953441; 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=mUFH4nRROl/hP+2uPtXw4QtLIGv4zexlPmaUq4/gvsQ=; b=AoaebK2LeD1UPUtgYtevhcchw47XyOz49hbdtxWFK/x8PMvyE0uyLc6HxSN/US4gm4 O+rm7D00JMoYJjZXLEBOa0WFb+iSFHhWpGDrzPUDXYIfUGU92hzltCAaGoWNnV0uDdja GzJTpvLiAoZWEYGpsPztNhgROUqJv8sdOH4ywc7TMrK+RVLComET34dHUf9bOWNUqfHG v5BfUnSeGhpq4xiexaGO9qWms57rm3KlA67BbqIvxRQHXGxpXxeR8j40JM6d5rduizut KZOqJ7+rDKkfk4AWhPJZd/pFuKhbMttz0myv5Dn10SlkuNWaNy1266Pbwj5IK2gMPL1u 2dwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348641; x=1716953441; 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=mUFH4nRROl/hP+2uPtXw4QtLIGv4zexlPmaUq4/gvsQ=; b=rcG6A7d/o7lstbJRPpl+4SYkaSxrVX53TCPcPOqB60TCP2vJHTDIbhljA/lR1kk2LP NP9y0ngghgW5dov7ORSGXU4path4BIA7xg+FKiXajxpMA7Kyir2xDw1yxQuzhosCHbVj 8wE0HrfYk66sUEJPabnOq5U0J5etmlTonFZBobeI/Pk6ppanBL3mjB3An0aVJSzUvStI Eor0MHxB6BjQKcXSnhD+2EIqnCPnJT3G1ejFDUeTsp3Q+p27OKlejrrbPUh4Vs6Nd2Mf v3vLyK7OHlA7uwColaXeBsCw1R7RfHfoSNGB9qz/yhZ+1NA9jmEt2FtbEwVl7BUmh3Zw SsJg== X-Gm-Message-State: AOJu0YwJalrSDRKA0XT62/sS4pZhVjTu1Vh4L2WAz+IbL6+ucVQOLgKm zNm9STGK7e5pfExF7ylQvNASyFpPS9t7BLmMZ/LdMZXCAzKFhuD2LKlNuUTtmSFMxoe+o+mmtJS I+K8= X-Google-Smtp-Source: AGHT+IGN+Ct1xSgk0D8sr9YeSgSx303GUNhfvyEYJNVmFQEYvaHueKcysYs3rJ4/+piYFRhvA0Ys5w== X-Received: by 2002:a05:6a20:3c91:b0:1ad:7e4d:5b81 with SMTP id adf61e73a8af0-1b1f874f99emr1042758637.5.1716348641237; Tue, 21 May 2024 20:30:41 -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.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:40 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Hemant Agrawal , Sunil Uttarwar , Ankur Dwivedi , Anoob Joseph , Tejasree Kondoj , Gagandeep Singh , Kai Ji , Pablo de Lara Subject: [PATCH v5 18/32] crypto: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:45 -0700 Message-ID: <20240522033009.143100-19-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 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 Acked-by: Hemant Agrawal --- drivers/crypto/ccp/ccp_crypto.c | 14 ++--- drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 2 +- drivers/crypto/cnxk/cnxk_se.h | 2 +- drivers/crypto/dpaa_sec/dpaa_sec.c | 2 +- drivers/crypto/ipsec_mb/pmd_snow3g.c | 4 +- drivers/crypto/qat/qat_sym_session.c | 52 +++++++++---------- .../scheduler/rte_cryptodev_scheduler.c | 6 +-- drivers/crypto/scheduler/scheduler_failover.c | 12 ++--- 8 files changed, 44 insertions(+), 50 deletions(-) diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c index 4b84b3303e..4a70bc5d6e 100644 --- a/drivers/crypto/ccp/ccp_crypto.c +++ b/drivers/crypto/ccp/ccp_crypto.c @@ -168,7 +168,7 @@ static int partial_hash_sha1(uint8_t *data_in, uint8_t *data_out) if (!SHA1_Init(&ctx)) return -EFAULT; SHA1_Transform(&ctx, data_in); - rte_memcpy(data_out, &ctx, SHA_DIGEST_LENGTH); + memcpy(data_out, &ctx, SHA_DIGEST_LENGTH); return 0; } @@ -179,8 +179,7 @@ static int partial_hash_sha224(uint8_t *data_in, uint8_t *data_out) if (!SHA224_Init(&ctx)) return -EFAULT; SHA256_Transform(&ctx, data_in); - rte_memcpy(data_out, &ctx, - SHA256_DIGEST_LENGTH); + memcpy(data_out, &ctx, SHA256_DIGEST_LENGTH); return 0; } @@ -191,8 +190,7 @@ static int partial_hash_sha256(uint8_t *data_in, uint8_t *data_out) if (!SHA256_Init(&ctx)) return -EFAULT; SHA256_Transform(&ctx, data_in); - rte_memcpy(data_out, &ctx, - SHA256_DIGEST_LENGTH); + memcpy(data_out, &ctx, SHA256_DIGEST_LENGTH); return 0; } @@ -203,8 +201,7 @@ static int partial_hash_sha384(uint8_t *data_in, uint8_t *data_out) if (!SHA384_Init(&ctx)) return -EFAULT; SHA512_Transform(&ctx, data_in); - rte_memcpy(data_out, &ctx, - SHA512_DIGEST_LENGTH); + memcpy(data_out, &ctx, SHA512_DIGEST_LENGTH); return 0; } @@ -215,8 +212,7 @@ static int partial_hash_sha512(uint8_t *data_in, uint8_t *data_out) if (!SHA512_Init(&ctx)) return -EFAULT; SHA512_Transform(&ctx, data_in); - rte_memcpy(data_out, &ctx, - SHA512_DIGEST_LENGTH); + memcpy(data_out, &ctx, SHA512_DIGEST_LENGTH); return 0; } diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c index 1dd1dbac9a..a67af3ec35 100644 --- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c +++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c @@ -959,7 +959,7 @@ cnxk_crypto_cn10k_submit(void *qptr, void *inst, uint16_t nb_inst) lmt_dst = PLT_PTR_CAST(lmt_base); for (j = 0; j < i; j++) { - rte_memcpy(lmt_dst, inst, sizeof(struct cpt_inst_s)); + memcpy(lmt_dst, inst, sizeof(struct cpt_inst_s)); inst = RTE_PTR_ADD(inst, sizeof(struct cpt_inst_s)); lmt_dst = RTE_PTR_ADD(lmt_dst, 2 * sizeof(struct cpt_inst_s)); } diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h index 6374718a82..1fcbf0669a 100644 --- a/drivers/crypto/cnxk/cnxk_se.h +++ b/drivers/crypto/cnxk/cnxk_se.h @@ -1161,7 +1161,7 @@ cpt_sm_prep(uint32_t flags, uint64_t d_offs, uint64_t d_lens, struct roc_se_fc_p void *dst = PLT_PTR_ADD(offset_vaddr, ROC_SE_OFF_CTRL_LEN); const uint64_t *src = fc_params->iv_buf; - rte_memcpy(dst, src, 16); + memcpy(dst, src, 16); } inst->w4.u64 = cpt_inst_w4.u64; } else { diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 44528eaf7f..3e7b78656b 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -676,7 +676,7 @@ dpaa_sec_dump(struct dpaa_sec_op_ctx *ctx, struct dpaa_sec_qp *qp) } cdb = &sess->cdb; - rte_memcpy(&c_cdb, cdb, sizeof(struct sec_cdb)); + memcpy(&c_cdb, cdb, sizeof(struct sec_cdb)); #ifdef RTE_LIB_SECURITY printf("\nsession protocol type = %d\n", sess->proto_alg); #endif diff --git a/drivers/crypto/ipsec_mb/pmd_snow3g.c b/drivers/crypto/ipsec_mb/pmd_snow3g.c index a96779f059..f3f519f2d4 100644 --- a/drivers/crypto/ipsec_mb/pmd_snow3g.c +++ b/drivers/crypto/ipsec_mb/pmd_snow3g.c @@ -291,8 +291,8 @@ process_snow3g_hash_op(struct ipsec_mb_qp *qp, struct rte_crypto_op **ops, /* Copy back digest from src to auth.digest.data */ if (digest_appended) - rte_memcpy(ops[i]->sym->auth.digest.data, - dst, SNOW3G_DIGEST_LENGTH); + memcpy(ops[i]->sym->auth.digest.data, dst, + SNOW3G_DIGEST_LENGTH); } processed_ops++; } diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c index 9e2dba5423..a93625b287 100644 --- a/drivers/crypto/qat/qat_sym_session.c +++ b/drivers/crypto/qat/qat_sym_session.c @@ -1439,7 +1439,7 @@ static int partial_hash_sha1(uint8_t *data_in, uint8_t *data_out) if (!SHA1_Init(&ctx)) return -EFAULT; SHA1_Transform(&ctx, data_in); - rte_memcpy(data_out, &ctx, SHA_DIGEST_LENGTH); + memcpy(data_out, &ctx, SHA_DIGEST_LENGTH); return 0; } @@ -1450,7 +1450,7 @@ static int partial_hash_sha224(uint8_t *data_in, uint8_t *data_out) if (!SHA224_Init(&ctx)) return -EFAULT; SHA256_Transform(&ctx, data_in); - rte_memcpy(data_out, &ctx, SHA256_DIGEST_LENGTH); + memcpy(data_out, &ctx, SHA256_DIGEST_LENGTH); return 0; } @@ -1461,7 +1461,7 @@ static int partial_hash_sha256(uint8_t *data_in, uint8_t *data_out) if (!SHA256_Init(&ctx)) return -EFAULT; SHA256_Transform(&ctx, data_in); - rte_memcpy(data_out, &ctx, SHA256_DIGEST_LENGTH); + memcpy(data_out, &ctx, SHA256_DIGEST_LENGTH); return 0; } @@ -1472,7 +1472,7 @@ static int partial_hash_sha384(uint8_t *data_in, uint8_t *data_out) if (!SHA384_Init(&ctx)) return -EFAULT; SHA512_Transform(&ctx, data_in); - rte_memcpy(data_out, &ctx, SHA512_DIGEST_LENGTH); + memcpy(data_out, &ctx, SHA512_DIGEST_LENGTH); return 0; } @@ -1483,7 +1483,7 @@ static int partial_hash_sha512(uint8_t *data_in, uint8_t *data_out) if (!SHA512_Init(&ctx)) return -EFAULT; SHA512_Transform(&ctx, data_in); - rte_memcpy(data_out, &ctx, SHA512_DIGEST_LENGTH); + memcpy(data_out, &ctx, SHA512_DIGEST_LENGTH); return 0; } @@ -1494,7 +1494,7 @@ static int partial_hash_md5(uint8_t *data_in, uint8_t *data_out) if (!MD5_Init(&ctx)) return -EFAULT; MD5_Transform(&ctx, data_in); - rte_memcpy(data_out, &ctx, MD5_DIGEST_LENGTH); + memcpy(data_out, &ctx, MD5_DIGEST_LENGTH); return 0; } @@ -1615,8 +1615,7 @@ static int qat_sym_do_precomputes(enum icp_qat_hw_auth_algo hash_alg, return -ENOMEM; } - rte_memcpy(in, AES_CMAC_SEED, - ICP_QAT_HW_AES_128_KEY_SZ); + memcpy(in, AES_CMAC_SEED, ICP_QAT_HW_AES_128_KEY_SZ); rte_memcpy(p_state_buf, auth_key, auth_keylen); if (AES_set_encrypt_key(auth_key, auth_keylen << 3, @@ -1660,8 +1659,8 @@ static int qat_sym_do_precomputes(enum icp_qat_hw_auth_algo hash_alg, return -ENOMEM; } - rte_memcpy(in, qat_aes_xcbc_key_seed, - ICP_QAT_HW_AES_XCBC_MAC_STATE2_SZ); + memcpy(in, qat_aes_xcbc_key_seed, + ICP_QAT_HW_AES_XCBC_MAC_STATE2_SZ); for (x = 0; x < HASH_XCBC_PRECOMP_KEY_NUM; x++) { if (AES_set_encrypt_key(auth_key, auth_keylen << 3, @@ -1924,8 +1923,8 @@ static int qat_sym_do_precomputes_ipsec_mb(enum icp_qat_hw_auth_algo hash_alg, uint8_t *input = in; uint8_t *out = p_state_buf; - rte_memcpy(input, qat_aes_xcbc_key_seed, - ICP_QAT_HW_AES_XCBC_MAC_STATE2_SZ); + memcpy(input, qat_aes_xcbc_key_seed, + ICP_QAT_HW_AES_XCBC_MAC_STATE2_SZ); for (i = 0; i < HASH_XCBC_PRECOMP_KEY_NUM; i++) { if (aes_ipsecmb_job(input, out, m, auth_key, auth_keylen)) { memset(input - @@ -2441,8 +2440,8 @@ int qat_sym_cd_auth_set(struct qat_sym_session *cdesc, cdesc->cd_cur_ptr += sizeof(struct icp_qat_hw_auth_setup); switch (cdesc->qat_hash_alg) { case ICP_QAT_HW_AUTH_ALGO_SM3: - rte_memcpy(cdesc->cd_cur_ptr, sm3InitialState, - sizeof(sm3InitialState)); + memcpy(cdesc->cd_cur_ptr, sm3InitialState, + sizeof(sm3InitialState)); state1_size = qat_hash_get_state1_size( cdesc->qat_hash_alg); state2_size = ICP_QAT_HW_SM3_STATE2_SZ; @@ -2453,9 +2452,8 @@ int qat_sym_cd_auth_set(struct qat_sym_session *cdesc, hash_2->auth_config.config = ICP_QAT_HW_AUTH_CONFIG_BUILD(ICP_QAT_HW_AUTH_MODE2, cdesc->qat_hash_alg, digestsize); - rte_memcpy(cdesc->cd_cur_ptr + state1_size + state2_size + - sizeof(*hash_2), sm3InitialState, - sizeof(sm3InitialState)); + memcpy(cdesc->cd_cur_ptr + state1_size + state2_size + sizeof(*hash_2), + sm3InitialState, sizeof(sm3InitialState)); hash_cd_ctrl->inner_state1_sz = state1_size; hash_cd_ctrl->inner_state2_sz = state2_size; hash_cd_ctrl->inner_state2_offset = @@ -2493,8 +2491,8 @@ int qat_sym_cd_auth_set(struct qat_sym_session *cdesc, case ICP_QAT_HW_AUTH_ALGO_SHA1: if (cdesc->auth_mode == ICP_QAT_HW_AUTH_MODE0) { /* Plain SHA-1 */ - rte_memcpy(cdesc->cd_cur_ptr, sha1InitialState, - sizeof(sha1InitialState)); + memcpy(cdesc->cd_cur_ptr, sha1InitialState, + sizeof(sha1InitialState)); state1_size = qat_hash_get_state1_size( cdesc->qat_hash_alg); break; @@ -2520,8 +2518,8 @@ int qat_sym_cd_auth_set(struct qat_sym_session *cdesc, case ICP_QAT_HW_AUTH_ALGO_SHA224: if (cdesc->auth_mode == ICP_QAT_HW_AUTH_MODE0) { /* Plain SHA-224 */ - rte_memcpy(cdesc->cd_cur_ptr, sha224InitialState, - sizeof(sha224InitialState)); + memcpy(cdesc->cd_cur_ptr, sha224InitialState, + sizeof(sha224InitialState)); state1_size = qat_hash_get_state1_size( cdesc->qat_hash_alg); break; @@ -2545,8 +2543,8 @@ int qat_sym_cd_auth_set(struct qat_sym_session *cdesc, case ICP_QAT_HW_AUTH_ALGO_SHA256: if (cdesc->auth_mode == ICP_QAT_HW_AUTH_MODE0) { /* Plain SHA-256 */ - rte_memcpy(cdesc->cd_cur_ptr, sha256InitialState, - sizeof(sha256InitialState)); + memcpy(cdesc->cd_cur_ptr, sha256InitialState, + sizeof(sha256InitialState)); state1_size = qat_hash_get_state1_size( cdesc->qat_hash_alg); break; @@ -2570,8 +2568,8 @@ int qat_sym_cd_auth_set(struct qat_sym_session *cdesc, case ICP_QAT_HW_AUTH_ALGO_SHA384: if (cdesc->auth_mode == ICP_QAT_HW_AUTH_MODE0) { /* Plain SHA-384 */ - rte_memcpy(cdesc->cd_cur_ptr, sha384InitialState, - sizeof(sha384InitialState)); + memcpy(cdesc->cd_cur_ptr, sha384InitialState, + sizeof(sha384InitialState)); state1_size = qat_hash_get_state1_size( cdesc->qat_hash_alg); break; @@ -2595,8 +2593,8 @@ int qat_sym_cd_auth_set(struct qat_sym_session *cdesc, case ICP_QAT_HW_AUTH_ALGO_SHA512: if (cdesc->auth_mode == ICP_QAT_HW_AUTH_MODE0) { /* Plain SHA-512 */ - rte_memcpy(cdesc->cd_cur_ptr, sha512InitialState, - sizeof(sha512InitialState)); + memcpy(cdesc->cd_cur_ptr, sha512InitialState, + sizeof(sha512InitialState)); state1_size = qat_hash_get_state1_size( cdesc->qat_hash_alg); break; diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c index 9a21edd32a..ed1833a7c6 100644 --- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c +++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c @@ -79,7 +79,7 @@ sync_caps(struct rte_cryptodev_capabilities *caps, /* remove a uncommon cap from the array */ for (j = i; j < sync_nb_caps - 1; j++) - rte_memcpy(&caps[j], &caps[j+1], sizeof(*cap)); + memcpy(&caps[j], &caps[j + 1], sizeof(*cap)); memset(&caps[sync_nb_caps - 1], 0, sizeof(*cap)); sync_nb_caps--; @@ -216,8 +216,8 @@ sync_sec_caps(uint32_t worker_idx, * caps, from the arrays */ for (j = i; j < nb_sec_caps - 1; j++) { - rte_memcpy(&sec_caps[j], &sec_caps[j+1], - sizeof(*sec_cap)); + memcpy(&sec_caps[j], &sec_caps[j + 1], + sizeof(*sec_cap)); rte_memcpy(&sec_crypto_caps[j][0], &sec_crypto_caps[j+1][0], diff --git a/drivers/crypto/scheduler/scheduler_failover.c b/drivers/crypto/scheduler/scheduler_failover.c index 52ff2ffbb7..e7c6d19d25 100644 --- a/drivers/crypto/scheduler/scheduler_failover.c +++ b/drivers/crypto/scheduler/scheduler_failover.c @@ -171,12 +171,12 @@ scheduler_start(struct rte_cryptodev *dev) sched_ctx->workers[PRIMARY_WORKER_IDX].qp_id = i; sched_ctx->workers[SECONDARY_WORKER_IDX].qp_id = i; - rte_memcpy(&qp_ctx->primary_worker, - &sched_ctx->workers[PRIMARY_WORKER_IDX], - sizeof(struct scheduler_worker)); - rte_memcpy(&qp_ctx->secondary_worker, - &sched_ctx->workers[SECONDARY_WORKER_IDX], - sizeof(struct scheduler_worker)); + memcpy(&qp_ctx->primary_worker, + &sched_ctx->workers[PRIMARY_WORKER_IDX], + sizeof(struct scheduler_worker)); + memcpy(&qp_ctx->secondary_worker, + &sched_ctx->workers[SECONDARY_WORKER_IDX], + sizeof(struct scheduler_worker)); } return 0; From patchwork Wed May 22 03:27:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140256 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 84E4044093; Wed, 22 May 2024 05:32:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 728B440ED1; Wed, 22 May 2024 05:30:57 +0200 (CEST) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mails.dpdk.org (Postfix) with ESMTP id DFDA940A84 for ; Wed, 22 May 2024 05:30:42 +0200 (CEST) Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1ecddf96313so96840335ad.2 for ; Tue, 21 May 2024 20:30:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348642; x=1716953442; 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=WbgpmogP3FPaLIN0WDHUZa0zf/FbCzUqRZKuA/auU+s=; b=0uDeGCFG3BtjXNIal7cK0e0KgL6xrouafdnXVf8nRX4fscP5nmKm4E6Ppj4N1787Ry aKnlkgAe5QiF4my4DlQ7YrO1WVEW++e7F8SbJqNzmC97JJZp+nkKJkJ5nTVgBgt+zRxf l9gFqGiy2OvbQ6evBuYhbJH1KeosR4PDn2gcpwnKmeyvFcr6tz7LiuxL7LsXHyYtM22f f/lI2KRAQwp7ccLI7blJ96CxeF2M7t1OZ4YLJf4DJ1WJpQut/2yDdIzKo40LWLRANryN ATOJ55w5hDPS9Y5HSHlIdzfJ/RpH3KkBpC6D7n699Oipl3CCyy1IryINJDukdcDIHjip sa+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348642; x=1716953442; 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=WbgpmogP3FPaLIN0WDHUZa0zf/FbCzUqRZKuA/auU+s=; b=WFQkBXiaeyxH5GyBVPFba7WvZewWfQnsY4cFz6DZGKVboE8E0STtVkCNQt0sj6uTC6 wYhaMOsXQwM4xHM+wT34bEiV1NayAW4aXh0kfda1BkfbuC/libSsZAyYrsUWFc0WpEfk QQntj9rEecEE5R/JSMaFOKHx7uPBjDLnhuDWSHBNxaV4qUUqM9+PD11CPTFqxCMwJxft WPxAbpXRY62uSOnXQoByTEBigsKuEioAmK9ZAKksxFgScyfOdKNW/FOIwgbhBE51i9Ou pTrsC9LXrUQE9D2++V89Wxm+5/tpEModljoFhsYi7PEGbRzjJKUTE5muJCuGu1KlUtJF tzYQ== X-Gm-Message-State: AOJu0YzvNz/x0myaIF0SClfLFNK+eMpUXyPklovbl08/e++QTBRAJ/jl Hz8HQD/EzwG9Y/i9ROG+Mup0D7PjodBRrhB/NY42ivSjZLjiWgajro2GiZGU67WbnI5Rf9409KA moAk= X-Google-Smtp-Source: AGHT+IGTWCMvmhIahpAgm8rk3mT3uc4vWZldBGA6e9x5RthXMYUeXLtHh3uvryt4KaP9GEjM9mSCHw== X-Received: by 2002:a17:902:f0d4:b0:1e4:b4f5:5cfa with SMTP id d9443c01a7336-1f31c98e7c6mr8817005ad.27.1716348642144; Tue, 21 May 2024 20:30:42 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:41 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Pavan Nikhilesh , Shijith Thotton , Abdullah Sevincer , Hemant Agrawal , Sachin Saxena , Jerin Jacob Subject: [PATCH v5 19/32] event: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:46 -0700 Message-ID: <20240522033009.143100-20-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 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 Also, remove unnecessary includes of rte_memcpy.h Signed-off-by: Stephen Hemminger --- drivers/event/cnxk/cnxk_eventdev_selftest.c | 1 - drivers/event/cnxk/cnxk_tim_evdev.c | 4 ++-- drivers/event/dlb2/dlb2.c | 4 ++-- drivers/event/dpaa/dpaa_eventdev.c | 1 - drivers/event/dpaa2/dpaa2_eventdev.c | 7 +++---- drivers/event/dpaa2/dpaa2_eventdev_selftest.c | 1 - drivers/event/dpaa2/dpaa2_hw_dpcon.c | 1 - drivers/event/octeontx/ssovf_evdev_selftest.c | 1 - drivers/event/octeontx/timvf_evdev.c | 4 ++-- 9 files changed, 9 insertions(+), 15 deletions(-) diff --git a/drivers/event/cnxk/cnxk_eventdev_selftest.c b/drivers/event/cnxk/cnxk_eventdev_selftest.c index 95c0f1b1f7..620f2a0d67 100644 --- a/drivers/event/cnxk/cnxk_eventdev_selftest.c +++ b/drivers/event/cnxk/cnxk_eventdev_selftest.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/event/cnxk/cnxk_tim_evdev.c b/drivers/event/cnxk/cnxk_tim_evdev.c index 6d59fdf909..2027c4644c 100644 --- a/drivers/event/cnxk/cnxk_tim_evdev.c +++ b/drivers/event/cnxk/cnxk_tim_evdev.c @@ -115,8 +115,8 @@ cnxk_tim_ring_info_get(const struct rte_event_timer_adapter *adptr, adptr_info->min_resolution_ns = tim_ring->ena_periodic ? tim_ring->max_tout : tim_ring->tck_nsec; - rte_memcpy(&adptr_info->conf, &adptr->data->conf, - sizeof(struct rte_event_timer_adapter_conf)); + memcpy(&adptr_info->conf, &adptr->data->conf, + sizeof(struct rte_event_timer_adapter_conf)); } static int diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c index 0b91f03956..dbd92c32ed 100644 --- a/drivers/event/dlb2/dlb2.c +++ b/drivers/event/dlb2/dlb2.c @@ -1668,7 +1668,7 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2, qm_port->issued_releases = 0; /* Save config message too. */ - rte_memcpy(&qm_port->cfg.ldb, &cfg, sizeof(qm_port->cfg.ldb)); + memcpy(&qm_port->cfg.ldb, &cfg, sizeof(qm_port->cfg.ldb)); /* update state */ qm_port->state = PORT_STARTED; /* enabled at create time */ @@ -1869,7 +1869,7 @@ dlb2_hw_create_dir_port(struct dlb2_eventdev *dlb2, qm_port->issued_releases = 0; /* Save config message too. */ - rte_memcpy(&qm_port->cfg.dir, &cfg, sizeof(qm_port->cfg.dir)); + memcpy(&qm_port->cfg.dir, &cfg, sizeof(qm_port->cfg.dir)); /* update state */ qm_port->state = PORT_STARTED; /* enabled at create time */ diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c index 919e922298..0d72fa7864 100644 --- a/drivers/event/dpaa/dpaa_eventdev.c +++ b/drivers/event/dpaa/dpaa_eventdev.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index 1273455673..490598cbc9 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -159,7 +158,7 @@ dpaa2_eventdev_enqueue_burst(void *port, const struct rte_event ev[], "Unable to allocate event object"); goto send_partial; } - rte_memcpy(ev_temp, event, sizeof(struct rte_event)); + memcpy(ev_temp, event, sizeof(struct rte_event)); DPAA2_SET_FD_ADDR((&fd_arr[loop]), (size_t)ev_temp); DPAA2_SET_FD_LEN((&fd_arr[loop]), sizeof(struct rte_event)); @@ -230,7 +229,7 @@ static void dpaa2_eventdev_process_parallel(struct qbman_swp *swp, RTE_SET_USED(rxq); - rte_memcpy(ev, ev_temp, sizeof(struct rte_event)); + memcpy(ev, ev_temp, sizeof(struct rte_event)); rte_free(ev_temp); qbman_swp_dqrr_consume(swp, dq); @@ -249,7 +248,7 @@ static void dpaa2_eventdev_process_atomic(struct qbman_swp *swp, RTE_SET_USED(swp); RTE_SET_USED(rxq); - rte_memcpy(ev, ev_temp, sizeof(struct rte_event)); + memcpy(ev, ev_temp, sizeof(struct rte_event)); rte_free(ev_temp); *dpaa2_seqn(ev->mbuf) = dqrr_index + 1; DPAA2_PER_LCORE_DQRR_SIZE++; diff --git a/drivers/event/dpaa2/dpaa2_eventdev_selftest.c b/drivers/event/dpaa2/dpaa2_eventdev_selftest.c index 9d4938efe6..8a9a14f628 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev_selftest.c +++ b/drivers/event/dpaa2/dpaa2_eventdev_selftest.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/event/dpaa2/dpaa2_hw_dpcon.c b/drivers/event/dpaa2/dpaa2_hw_dpcon.c index a68d3ac154..e07b473413 100644 --- a/drivers/event/dpaa2/dpaa2_hw_dpcon.c +++ b/drivers/event/dpaa2/dpaa2_hw_dpcon.c @@ -13,7 +13,6 @@ #include #include -#include #include #include #include diff --git a/drivers/event/octeontx/ssovf_evdev_selftest.c b/drivers/event/octeontx/ssovf_evdev_selftest.c index b54ae126d2..c0a0c789de 100644 --- a/drivers/event/octeontx/ssovf_evdev_selftest.c +++ b/drivers/event/octeontx/ssovf_evdev_selftest.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/event/octeontx/timvf_evdev.c b/drivers/event/octeontx/timvf_evdev.c index 090b3ed183..6409d6d161 100644 --- a/drivers/event/octeontx/timvf_evdev.c +++ b/drivers/event/octeontx/timvf_evdev.c @@ -42,8 +42,8 @@ timvf_ring_info_get(const struct rte_event_timer_adapter *adptr, struct timvf_ring *timr = adptr->data->adapter_priv; adptr_info->max_tmo_ns = timr->max_tout; adptr_info->min_resolution_ns = timr->tck_nsec; - rte_memcpy(&adptr_info->conf, &adptr->data->conf, - sizeof(struct rte_event_timer_adapter_conf)); + memcpy(&adptr_info->conf, &adptr->data->conf, + sizeof(struct rte_event_timer_adapter_conf)); } static int From patchwork Wed May 22 03:27:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140257 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0035C44093; Wed, 22 May 2024 05:32:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F0F4B40EDB; Wed, 22 May 2024 05:30:58 +0200 (CEST) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by mails.dpdk.org (Postfix) with ESMTP id CE48040A89 for ; Wed, 22 May 2024 05:30:43 +0200 (CEST) Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-2b12b52fbe0so880079a91.0 for ; Tue, 21 May 2024 20:30:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348643; x=1716953443; 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=hd6PR4HTQ6dXwXtRBhf/G6tcA8NMTwqnSGrx6zoaA4s=; b=AjAmdydm42Si4JAFP35u2FdnvCtXLtAHkI7jbyxIeLYBugSPNJnI58HBNzNEow7Hfe ADbU64wNRPjuO4S9xefJ83irtaIgw6Q+osdDkIssenf0xT3QcwxYbucQvC9GWAtuUu0z D/pwBkJh+z4nkrLuS+GtkvhpOP7UeO4NjGMAAwT9BcsHoQIf3zF78y6Zy2Vvl5oF2lvV PDvYg2w35OyquPWb9ks1dXbqP1qHxi4riDhUP95gB+e1aKo6fJgKgzkgM7fRj+ic6huK B9PZeoO89yTpcChkffRta2m0doM/8LZ0b7XkBk+biJ2tMrMKtNhCZ9yy8uE1j+0lcv4T hAig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348643; x=1716953443; 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=hd6PR4HTQ6dXwXtRBhf/G6tcA8NMTwqnSGrx6zoaA4s=; b=JzFd+OSurGdt7hGzNAn8hHRBaDM0SDl3KnsqQRiHV0dY1BCQ4CU7t0MeOxRwhB0XbW Fw3OzYvZI75Aq8WZFB5Q6FtwRYcdmZJZ3i4EuLlvKvvhM1mka5j6ze3sJDiXI5XflamM bstg4lrfRcmz+XpSMtpxQXKnVJlsnXGGnBrJGVYoX52SnsB2LchjEk15HIjE5sQifHsB O/01ztGXe7eGV/3EN7YaLfWZCRN2tEIDWnrAkiX+TZyimtJPsUuTHJ68rAi0P9rPfJih 5AqeTmLybeS88379VYAVg3g1cc/zq9QGrzSh2SrDb8dhsIuzmLkvu769masmhBF8j0So B2SA== X-Gm-Message-State: AOJu0YxPZt7x6YjTJOEfK4KDum8HaYIAcFJ6u2+UeCqC7Lr0tAX5HXzg f/0Z0dtpwd29DR0+/bOngusTtETeDNn/A+TnRKEAFiPaJBHj/xkl2GdfcIHSeiPYzms03iSA9st +Vik= X-Google-Smtp-Source: AGHT+IGxGeCWFaE43Fg5bywzQOBvzXTdK+h2SQ5+gKtJgqR9lrZWMcz9TA9cRjwHhzdO2+rgJ1fc6Q== X-Received: by 2002:a17:90b:903:b0:2bd:77c9:c577 with SMTP id 98e67ed59e1d1-2bd9f5a1766mr1215722a91.32.1716348642954; Tue, 21 May 2024 20:30:42 -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.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:42 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Hemant Agrawal , Sachin Saxena Subject: [PATCH v5 20/32] mempool: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:47 -0700 Message-ID: <20240522033009.143100-21-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 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 Acked-by: Hemant Agrawal --- drivers/mempool/dpaa/dpaa_mempool.c | 4 ++-- drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/mempool/dpaa/dpaa_mempool.c b/drivers/mempool/dpaa/dpaa_mempool.c index 0b484b3d9c..f72b51b472 100644 --- a/drivers/mempool/dpaa/dpaa_mempool.c +++ b/drivers/mempool/dpaa/dpaa_mempool.c @@ -115,8 +115,8 @@ dpaa_mbuf_create_pool(struct rte_mempool *mp) return -ENOMEM; } - rte_memcpy(bp_info, (void *)&rte_dpaa_bpid_info[bpid], - sizeof(struct dpaa_bp_info)); + memcpy(bp_info, (void *)&rte_dpaa_bpid_info[bpid], + sizeof(struct dpaa_bp_info)); mp->pool_data = (void *)bp_info; DPAA_MEMPOOL_INFO("BMAN pool created for bpid =%d", bpid); diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c index 4c9245cb81..c711de30e8 100644 --- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c +++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -125,8 +124,8 @@ rte_hw_mbuf_create_pool(struct rte_mempool *mp) rte_dpaa2_bpid_info[bpid].bp_list = bp_list; rte_dpaa2_bpid_info[bpid].bpid = bpid; - rte_memcpy(bp_info, (void *)&rte_dpaa2_bpid_info[bpid], - sizeof(struct dpaa2_bp_info)); + memcpy(bp_info, (void *)&rte_dpaa2_bpid_info[bpid], + sizeof(struct dpaa2_bp_info)); mp->pool_data = (void *)bp_info; DPAA2_MEMPOOL_DEBUG("BP List created for bpid =%d", dpbp_attr.bpid); From patchwork Wed May 22 03:27:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140258 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5026444093; Wed, 22 May 2024 05:32:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D60BE40EE5; Wed, 22 May 2024 05:31:00 +0200 (CEST) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mails.dpdk.org (Postfix) with ESMTP id 921A240C35 for ; Wed, 22 May 2024 05:30:44 +0200 (CEST) Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1eb0e08bfd2so113151915ad.1 for ; Tue, 21 May 2024 20:30:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348644; x=1716953444; 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=JT1+LxSV8JgSBxCPehFAlyvD29BqgR4SjbJ3MvTdQkU=; b=aNABF23ANiFL7ln4qY9bUz+iXr5WFJ72fzHUf84DCZf8w8c064G+qFMfu2IPuHu+Hq 5+Rh+uLb884IoYqIEcU6XhvUDBJ6hpMDsnPeZtKJOo2HjXTod1dWAW54FjQjVgy8+CpW 61pqav6D6WUNt2kPI0JUZELq6h8hZS9efWGWK/H8R0ZNIBlioOYwg1HP3td9vtIC24pe LlTBwo1EQsa1Z995VbKIGlpSaNRUC1WZmrUKl7nWSyHKFEIYN0qd7RC3B+R4F8MdoCAM 8CqwamQesGMSr9JdjiuJ4OqFqPVPrAlkkCk8n6cdmh2hk6KMvoMTAuJDuAeLvAuiYZkq rnbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348644; x=1716953444; 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=JT1+LxSV8JgSBxCPehFAlyvD29BqgR4SjbJ3MvTdQkU=; b=Z4KMGEfIZd228ooCNPdYs6va5ocJ+83jfeC0XnDzgMXZEQZ8Yo2tni4cjlcm/ZQYtQ hWNckLOPcMbUkXF8r0Drdtx1/itCLUz8Nh2qlGM38H8ieDhc8Nze4S2cZzUv9gLXBGP0 zFp0VRrDfuhGGMjmAb9lloonOT/qotXR9ndiAjMKJXsMFpxBtUthcWj7n9PnjMssB6Nb Sa9PxtHRUA2GqlkutcjWJNvZ5//SstwlU3JpdMShgEksDdyIOgJApjV8phHuEDinxEVw fnLOIi3iyp5OQK52eTg7Wc/wJVaDy4jW6MbfmMyhekh2/ae/3xWgN9iPRRvc8eWBbRLq wGlA== X-Gm-Message-State: AOJu0Yzn16rwlZbPMJ/m0/iKv5AMMftraFBVc0wj2560qeIgOThb0E4N QJUlSAqy8NNHWaB0wDZ07u0OB2IexbC4Cqd35IlyUvSUC94Sx3mLl436x+u1zLmNWiimtzTp/3b OsUM= X-Google-Smtp-Source: AGHT+IH06gs8mBxsgEXdOJtfVAAxJkicJfm5YQPlVF4ysyv/U8wtpLG0rGwPWyVRUHkD0XoJvWglJA== X-Received: by 2002:a17:902:f9d0:b0:1f0:8bb5:2ab with SMTP id d9443c01a7336-1f31c9a55d3mr6709695ad.41.1716348643737; Tue, 21 May 2024 20:30:43 -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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:43 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Srikanth Yalavarthi Subject: [PATCH v5 21/32] ml/cnxk: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:48 -0700 Message-ID: <20240522033009.143100-22-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 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/ml/cnxk/cn10k_ml_model.c | 8 +++++--- drivers/ml/cnxk/cn10k_ml_ops.c | 11 +++++++---- drivers/ml/cnxk/cnxk_ml_ops.c | 2 +- drivers/ml/cnxk/mvtvm_ml_model.c | 8 +++++--- drivers/ml/cnxk/mvtvm_ml_ops.c | 8 +++++--- 5 files changed, 23 insertions(+), 14 deletions(-) diff --git a/drivers/ml/cnxk/cn10k_ml_model.c b/drivers/ml/cnxk/cn10k_ml_model.c index 0325cd54f1..4e39a584fa 100644 --- a/drivers/ml/cnxk/cn10k_ml_model.c +++ b/drivers/ml/cnxk/cn10k_ml_model.c @@ -560,7 +560,7 @@ cn10k_ml_model_info_set(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_model *mo /* Set model info */ memset(info, 0, sizeof(struct rte_ml_model_info)); - rte_memcpy(info->name, metadata->model.name, MRVL_ML_MODEL_NAME_LEN); + memcpy(info->name, metadata->model.name, MRVL_ML_MODEL_NAME_LEN); snprintf(info->version, RTE_ML_STR_MAX, "%u.%u.%u.%u", metadata->model.version[0], metadata->model.version[1], metadata->model.version[2], metadata->model.version[3]); @@ -579,7 +579,8 @@ cn10k_ml_model_info_set(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_model *mo /* Set input info */ for (i = 0; i < info->nb_inputs; i++) { - rte_memcpy(input[i].name, io_info->input[i].name, MRVL_ML_INPUT_NAME_LEN); + memcpy(input[i].name, io_info->input[i].name, + MRVL_ML_INPUT_NAME_LEN); input[i].nb_dims = io_info->input[i].nb_dims; input[i].shape = &io_info->input[i].shape[0]; input[i].type = io_info->input[i].qtype; @@ -590,7 +591,8 @@ cn10k_ml_model_info_set(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_model *mo /* Set output info */ for (i = 0; i < info->nb_outputs; i++) { - rte_memcpy(output[i].name, io_info->output[i].name, MRVL_ML_INPUT_NAME_LEN); + memcpy(output[i].name, io_info->output[i].name, + MRVL_ML_INPUT_NAME_LEN); output[i].nb_dims = io_info->output[i].nb_dims; output[i].shape = &io_info->output[i].shape[0]; output[i].type = io_info->output[i].qtype; diff --git a/drivers/ml/cnxk/cn10k_ml_ops.c b/drivers/ml/cnxk/cn10k_ml_ops.c index 834e55e88e..e53ada7b1c 100644 --- a/drivers/ml/cnxk/cn10k_ml_ops.c +++ b/drivers/ml/cnxk/cn10k_ml_ops.c @@ -668,11 +668,13 @@ cn10k_ml_layer_load(void *device, uint16_t model_id, const char *layer_name, uin } /* Copy metadata to internal buffer */ - rte_memcpy(&layer->glow.metadata, buffer, sizeof(struct cn10k_ml_model_metadata)); + memcpy(&layer->glow.metadata, buffer, + sizeof(struct cn10k_ml_model_metadata)); cn10k_ml_model_metadata_update(&layer->glow.metadata); /* Set layer name */ - rte_memcpy(layer->name, layer->glow.metadata.model.name, MRVL_ML_MODEL_NAME_LEN); + memcpy(layer->name, layer->glow.metadata.model.name, + MRVL_ML_MODEL_NAME_LEN); /* Enable support for batch_size of 256 */ if (layer->glow.metadata.model.batch_size == 0) @@ -748,11 +750,12 @@ cn10k_ml_model_load(struct cnxk_ml_dev *cnxk_mldev, struct rte_ml_model_params * model->subtype = ML_CNXK_MODEL_SUBTYPE_GLOW_MRVL; /* Copy metadata to internal buffer */ - rte_memcpy(&model->glow.metadata, params->addr, sizeof(struct cn10k_ml_model_metadata)); + memcpy(&model->glow.metadata, params->addr, + sizeof(struct cn10k_ml_model_metadata)); cn10k_ml_model_metadata_update(&model->glow.metadata); /* Set model name */ - rte_memcpy(model->name, (char *)model->glow.metadata.model.name, 64); + memcpy(model->name, (char *)model->glow.metadata.model.name, 64); /* Enable support for batch_size of 256 */ if (model->glow.metadata.model.batch_size == 0) diff --git a/drivers/ml/cnxk/cnxk_ml_ops.c b/drivers/ml/cnxk/cnxk_ml_ops.c index 971362b242..f9d0f50e1f 100644 --- a/drivers/ml/cnxk/cnxk_ml_ops.c +++ b/drivers/ml/cnxk/cnxk_ml_ops.c @@ -1400,7 +1400,7 @@ cnxk_ml_model_info_get(struct rte_ml_dev *dev, uint16_t model_id, } info = (struct rte_ml_model_info *)model->info; - rte_memcpy(model_info, info, sizeof(struct rte_ml_model_info)); + memcpy(model_info, info, sizeof(struct rte_ml_model_info)); model_info->input_info = info->input_info; model_info->output_info = info->output_info; diff --git a/drivers/ml/cnxk/mvtvm_ml_model.c b/drivers/ml/cnxk/mvtvm_ml_model.c index e3234ae442..99b4774a2e 100644 --- a/drivers/ml/cnxk/mvtvm_ml_model.c +++ b/drivers/ml/cnxk/mvtvm_ml_model.c @@ -310,7 +310,7 @@ mvtvm_ml_model_info_set(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_model *mo goto tvm_mrvl_model; metadata = &model->mvtvm.metadata; - rte_memcpy(info->name, metadata->model.name, TVMDP_NAME_STRLEN); + memcpy(info->name, metadata->model.name, TVMDP_NAME_STRLEN); snprintf(info->version, RTE_ML_STR_MAX, "%u.%u.%u.%u", metadata->model.version[0], metadata->model.version[1], metadata->model.version[2], metadata->model.version[3]); @@ -327,7 +327,8 @@ mvtvm_ml_model_info_set(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_model *mo /* Set input info */ for (i = 0; i < info->nb_inputs; i++) { - rte_memcpy(input[i].name, metadata->input[i].name, MRVL_ML_INPUT_NAME_LEN); + memcpy(input[i].name, metadata->input[i].name, + MRVL_ML_INPUT_NAME_LEN); input[i].nb_dims = metadata->input[i].ndim; input[i].shape = &model->mvtvm.info.input[i].shape[0]; input[i].type = model->mvtvm.info.input[i].qtype; @@ -338,7 +339,8 @@ mvtvm_ml_model_info_set(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_model *mo /* Set output info */ for (i = 0; i < info->nb_outputs; i++) { - rte_memcpy(output[i].name, metadata->output[i].name, MRVL_ML_OUTPUT_NAME_LEN); + memcpy(output[i].name, metadata->output[i].name, + MRVL_ML_OUTPUT_NAME_LEN); output[i].nb_dims = metadata->output[i].ndim; output[i].shape = &model->mvtvm.info.output[i].shape[0]; output[i].type = model->mvtvm.info.output[i].qtype; diff --git a/drivers/ml/cnxk/mvtvm_ml_ops.c b/drivers/ml/cnxk/mvtvm_ml_ops.c index e825c3fb23..fca7e0c3c0 100644 --- a/drivers/ml/cnxk/mvtvm_ml_ops.c +++ b/drivers/ml/cnxk/mvtvm_ml_ops.c @@ -194,7 +194,7 @@ mvtvm_ml_model_load(struct cnxk_ml_dev *cnxk_mldev, struct rte_ml_model_params * /* Copy mod.so */ model->mvtvm.object.so.addr = mz->addr; model->mvtvm.object.so.size = object[0].size; - rte_memcpy(model->mvtvm.object.so.name, object[0].name, TVMDP_NAME_STRLEN); + memcpy(model->mvtvm.object.so.name, object[0].name, TVMDP_NAME_STRLEN); rte_memcpy(model->mvtvm.object.so.addr, object[0].buffer, object[0].size); rte_free(object[0].buffer); @@ -203,7 +203,8 @@ mvtvm_ml_model_load(struct cnxk_ml_dev *cnxk_mldev, struct rte_ml_model_params * RTE_PTR_ADD(model->mvtvm.object.so.addr, RTE_ALIGN_CEIL(model->mvtvm.object.so.size, RTE_CACHE_LINE_MIN_SIZE)); model->mvtvm.object.json.size = object[1].size; - rte_memcpy(model->mvtvm.object.json.name, object[1].name, TVMDP_NAME_STRLEN); + memcpy(model->mvtvm.object.json.name, object[1].name, + TVMDP_NAME_STRLEN); rte_memcpy(model->mvtvm.object.json.addr, object[1].buffer, object[1].size); rte_free(object[1].buffer); @@ -212,7 +213,8 @@ mvtvm_ml_model_load(struct cnxk_ml_dev *cnxk_mldev, struct rte_ml_model_params * RTE_PTR_ADD(model->mvtvm.object.json.addr, RTE_ALIGN_CEIL(model->mvtvm.object.json.size, RTE_CACHE_LINE_MIN_SIZE)); model->mvtvm.object.params.size = object[2].size; - rte_memcpy(model->mvtvm.object.params.name, object[2].name, TVMDP_NAME_STRLEN); + memcpy(model->mvtvm.object.params.name, object[2].name, + TVMDP_NAME_STRLEN); rte_memcpy(model->mvtvm.object.params.addr, object[2].buffer, object[2].size); rte_free(object[2].buffer); From patchwork Wed May 22 03:27:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140259 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 050E944093; Wed, 22 May 2024 05:33:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C44F410D0; Wed, 22 May 2024 05:31:06 +0200 (CEST) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mails.dpdk.org (Postfix) with ESMTP id A6EEE40DCE for ; Wed, 22 May 2024 05:30:45 +0200 (CEST) Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-2b5f3e20615so1925105a91.1 for ; Tue, 21 May 2024 20:30:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348645; x=1716953445; 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=6vyZnwMQ85VNmiZ7SeoROosshHH4iQ1mXI8UQAr+eIc=; b=zzDUtiCCf4n1/9c67eZ7SVmf4WpnjdgMNCQjdZm+hru2VcVCSWYWrLeBJ2XfJraPL4 OKuRNGZvuWp8MPaf0jiNXb5j3Ao3SF1nnP5bOIVaWy6uSezsEN98zFPAXo2AmfT14w0c y3t2l2zbtnx3PV3NcLpMOb0V7M4ZqRXIBJLGjnzdF43jmF/qNXR8/M/xf6AIxTPGA0Ml IDO0yjDL1c8e/0chYy2hBwmYsKVXP3kcW/DJGB2LNbRcT8NrYQ4NP1lwCEVCC2pzRKxR LS9UQJm+P3Ra09SltkIJXMoV+XNdmshYhDvWpUHF8//JKAa33s9OdolVrbBwYf85zwOn 9q6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348645; x=1716953445; 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=6vyZnwMQ85VNmiZ7SeoROosshHH4iQ1mXI8UQAr+eIc=; b=WC7nMASFkMXRCoEqhWw7AUc9c1w5ONs7cxjKOpYBRxSDvDjiJqppVbUlX88r1CZpg+ slZS4f82egX90FZ7sdI+U6mHmlleyNJKpGbNpirFu7klaDz8uvngDUqtbGzI+2/PNYKV 0l0iHyjqNH1UEH11aA9gIaAHuojTAGp8jUlmvf+7hlHHkbJbfzpNpldGrpRa68N1Z6+R ACEK4GiHB8kYK+pGaxkUbLnndD6MAZCQE8C9uVCM5VqkYXYPCfCHIO9ZbRNy7VgRWUwB zRAUKv47iTWFKLov5qjtOUf0Ipu8HN9PvFDhlL6ffbVNOWiWgYLWqJqOHKUuqP95xzr+ utvg== X-Gm-Message-State: AOJu0YwVxrQhz4MxRQA7gq/iRpi+9VwyU1diy5VDTLB99j04rIigaZt0 7dP9NRvQxWuNofnUgK5caZErThsRSWD2YACFWSkcdqClyr4ig3bpRqyVP/a4b9SIXFTKcSlg8sS gz1c= X-Google-Smtp-Source: AGHT+IF828WnB/MG7x13apJFvKbXwRhGudJvU+nlUaN3MDfykuDoKSCmapgRcGK1gSb5PmrzfrE98w== X-Received: by 2002:a17:90a:9908:b0:2bd:8378:af81 with SMTP id 98e67ed59e1d1-2bd9f46e4b4mr942541a91.4.1716348644837; Tue, 21 May 2024 20:30:44 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:44 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Aman Singh , Yuying Zhang , Ori Kam Subject: [PATCH v5 22/32] app/test-pmd: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:49 -0700 Message-ID: <20240522033009.143100-23-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 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 --- app/test-pmd/cmdline.c | 48 ++++++++++++++++++------------------- app/test-pmd/cmdline_flow.c | 24 +++++++++---------- app/test-pmd/config.c | 8 +++---- app/test-pmd/csumonly.c | 1 - app/test-pmd/flowgen.c | 1 - app/test-pmd/iofwd.c | 1 - app/test-pmd/macfwd.c | 1 - app/test-pmd/macswap.c | 1 - app/test-pmd/noisy_vnf.c | 1 - app/test-pmd/rxonly.c | 1 - app/test-pmd/testpmd.c | 1 - 11 files changed, 40 insertions(+), 48 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index b7759e38a8..5e0740348a 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -9534,7 +9534,7 @@ static void cmd_set_vxlan_parsed(void *parsed_result, vxlan_encap_conf.select_ipv4 = 0; else return; - rte_memcpy(vxlan_encap_conf.vni, &id.vni[1], 3); + memcpy(vxlan_encap_conf.vni, &id.vni[1], 3); vxlan_encap_conf.udp_src = rte_cpu_to_be_16(res->udp_src); vxlan_encap_conf.udp_dst = rte_cpu_to_be_16(res->udp_dst); vxlan_encap_conf.ip_tos = res->tos; @@ -9548,10 +9548,10 @@ static void cmd_set_vxlan_parsed(void *parsed_result, } if (vxlan_encap_conf.select_vlan) vxlan_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci); - rte_memcpy(vxlan_encap_conf.eth_src, res->eth_src.addr_bytes, - RTE_ETHER_ADDR_LEN); - rte_memcpy(vxlan_encap_conf.eth_dst, res->eth_dst.addr_bytes, - RTE_ETHER_ADDR_LEN); + memcpy(vxlan_encap_conf.eth_src, res->eth_src.addr_bytes, + RTE_ETHER_ADDR_LEN); + memcpy(vxlan_encap_conf.eth_dst, res->eth_dst.addr_bytes, + RTE_ETHER_ADDR_LEN); } static cmdline_parse_inst_t cmd_set_vxlan = { @@ -9729,7 +9729,7 @@ static void cmd_set_nvgre_parsed(void *parsed_result, nvgre_encap_conf.select_ipv4 = 0; else return; - rte_memcpy(nvgre_encap_conf.tni, &id.tni[1], 3); + memcpy(nvgre_encap_conf.tni, &id.tni[1], 3); if (nvgre_encap_conf.select_ipv4) { IPV4_ADDR_TO_UINT(res->ip_src, nvgre_encap_conf.ipv4_src); IPV4_ADDR_TO_UINT(res->ip_dst, nvgre_encap_conf.ipv4_dst); @@ -9739,10 +9739,10 @@ static void cmd_set_nvgre_parsed(void *parsed_result, } if (nvgre_encap_conf.select_vlan) nvgre_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci); - rte_memcpy(nvgre_encap_conf.eth_src, res->eth_src.addr_bytes, - RTE_ETHER_ADDR_LEN); - rte_memcpy(nvgre_encap_conf.eth_dst, res->eth_dst.addr_bytes, - RTE_ETHER_ADDR_LEN); + memcpy(nvgre_encap_conf.eth_src, res->eth_src.addr_bytes, + RTE_ETHER_ADDR_LEN); + memcpy(nvgre_encap_conf.eth_dst, res->eth_dst.addr_bytes, + RTE_ETHER_ADDR_LEN); } static cmdline_parse_inst_t cmd_set_nvgre = { @@ -9856,10 +9856,10 @@ static void cmd_set_l2_encap_parsed(void *parsed_result, return; if (l2_encap_conf.select_vlan) l2_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci); - rte_memcpy(l2_encap_conf.eth_src, res->eth_src.addr_bytes, - RTE_ETHER_ADDR_LEN); - rte_memcpy(l2_encap_conf.eth_dst, res->eth_dst.addr_bytes, - RTE_ETHER_ADDR_LEN); + memcpy(l2_encap_conf.eth_src, res->eth_src.addr_bytes, + RTE_ETHER_ADDR_LEN); + memcpy(l2_encap_conf.eth_dst, res->eth_dst.addr_bytes, + RTE_ETHER_ADDR_LEN); } static cmdline_parse_inst_t cmd_set_l2_encap = { @@ -10038,7 +10038,7 @@ static void cmd_set_mplsogre_encap_parsed(void *parsed_result, mplsogre_encap_conf.select_ipv4 = 0; else return; - rte_memcpy(mplsogre_encap_conf.label, &id.label, 3); + memcpy(mplsogre_encap_conf.label, &id.label, 3); if (mplsogre_encap_conf.select_ipv4) { IPV4_ADDR_TO_UINT(res->ip_src, mplsogre_encap_conf.ipv4_src); IPV4_ADDR_TO_UINT(res->ip_dst, mplsogre_encap_conf.ipv4_dst); @@ -10048,10 +10048,10 @@ static void cmd_set_mplsogre_encap_parsed(void *parsed_result, } if (mplsogre_encap_conf.select_vlan) mplsogre_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci); - rte_memcpy(mplsogre_encap_conf.eth_src, res->eth_src.addr_bytes, - RTE_ETHER_ADDR_LEN); - rte_memcpy(mplsogre_encap_conf.eth_dst, res->eth_dst.addr_bytes, - RTE_ETHER_ADDR_LEN); + memcpy(mplsogre_encap_conf.eth_src, res->eth_src.addr_bytes, + RTE_ETHER_ADDR_LEN); + memcpy(mplsogre_encap_conf.eth_dst, res->eth_dst.addr_bytes, + RTE_ETHER_ADDR_LEN); } static cmdline_parse_inst_t cmd_set_mplsogre_encap = { @@ -10274,7 +10274,7 @@ static void cmd_set_mplsoudp_encap_parsed(void *parsed_result, mplsoudp_encap_conf.select_ipv4 = 0; else return; - rte_memcpy(mplsoudp_encap_conf.label, &id.label, 3); + memcpy(mplsoudp_encap_conf.label, &id.label, 3); mplsoudp_encap_conf.udp_src = rte_cpu_to_be_16(res->udp_src); mplsoudp_encap_conf.udp_dst = rte_cpu_to_be_16(res->udp_dst); if (mplsoudp_encap_conf.select_ipv4) { @@ -10286,10 +10286,10 @@ static void cmd_set_mplsoudp_encap_parsed(void *parsed_result, } if (mplsoudp_encap_conf.select_vlan) mplsoudp_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci); - rte_memcpy(mplsoudp_encap_conf.eth_src, res->eth_src.addr_bytes, - RTE_ETHER_ADDR_LEN); - rte_memcpy(mplsoudp_encap_conf.eth_dst, res->eth_dst.addr_bytes, - RTE_ETHER_ADDR_LEN); + memcpy(mplsoudp_encap_conf.eth_src, res->eth_src.addr_bytes, + RTE_ETHER_ADDR_LEN); + memcpy(mplsoudp_encap_conf.eth_dst, res->eth_dst.addr_bytes, + RTE_ETHER_ADDR_LEN); } static cmdline_parse_inst_t cmd_set_mplsoudp_encap = { diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 60ee9337cf..95d9133ecb 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -13768,7 +13768,7 @@ cmd_set_raw_parsed_sample(const struct buffer *in) fprintf(stderr, "Error - Not supported action\n"); return; } - rte_memcpy(data, action, sizeof(struct rte_flow_action)); + memcpy(data, action, sizeof(struct rte_flow_action)); data++; } } @@ -13929,8 +13929,8 @@ cmd_set_raw_parsed(const struct buffer *in) /* We have to add GTP header extra word. */ *total_size += sizeof(ext_word); - rte_memcpy(data_tail - (*total_size), - &ext_word, sizeof(ext_word)); + memcpy(data_tail - (*total_size), &ext_word, + sizeof(ext_word)); } size = sizeof(struct rte_gtp_hdr); break; @@ -13975,21 +13975,21 @@ cmd_set_raw_parsed(const struct buffer *in) if (opt->checksum_rsvd.checksum) { *total_size += sizeof(opt->checksum_rsvd); - rte_memcpy(data_tail - (*total_size), - &opt->checksum_rsvd, - sizeof(opt->checksum_rsvd)); + memcpy(data_tail - (*total_size), + &opt->checksum_rsvd, + sizeof(opt->checksum_rsvd)); } if (opt->key.key) { *total_size += sizeof(opt->key.key); - rte_memcpy(data_tail - (*total_size), - &opt->key.key, - sizeof(opt->key.key)); + memcpy(data_tail - (*total_size), + &opt->key.key, + sizeof(opt->key.key)); } if (opt->sequence.sequence) { *total_size += sizeof(opt->sequence.sequence); - rte_memcpy(data_tail - (*total_size), - &opt->sequence.sequence, - sizeof(opt->sequence.sequence)); + memcpy(data_tail - (*total_size), + &opt->sequence.sequence, + sizeof(opt->sequence.sequence)); } } proto = 0x2F; diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index ba1007ace6..8b201f2104 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -2639,8 +2639,8 @@ port_flow_template_table_create(portid_t port_id, uint32_t id, } pt->nb_pattern_templates = nb_pattern_templates; pt->nb_actions_templates = nb_actions_templates; - rte_memcpy(&pt->flow_attr, &table_attr->flow_attr, - sizeof(struct rte_flow_attr)); + memcpy(&pt->flow_attr, &table_attr->flow_attr, + sizeof(struct rte_flow_attr)); printf("Template table #%u created\n", pt->id); return 0; } @@ -3259,8 +3259,8 @@ port_queue_action_handle_update(portid_t port_id, update = action->conf; break; case RTE_FLOW_ACTION_TYPE_METER_MARK: - rte_memcpy(&mtr_update.meter_mark, action->conf, - sizeof(struct rte_flow_action_meter_mark)); + memcpy(&mtr_update.meter_mark, action->conf, + sizeof(struct rte_flow_action_meter_mark)); if (mtr_update.meter_mark.profile) mtr_update.profile_valid = 1; if (mtr_update.meter_mark.policy) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index 6711dda42e..0db26902a1 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c index 53b5f24f11..d9454a4d22 100644 --- a/app/test-pmd/flowgen.c +++ b/app/test-pmd/flowgen.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/app/test-pmd/iofwd.c b/app/test-pmd/iofwd.c index ba06fae4a6..c9727d2856 100644 --- a/app/test-pmd/iofwd.c +++ b/app/test-pmd/iofwd.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/app/test-pmd/macfwd.c b/app/test-pmd/macfwd.c index d19ace7395..ba63aedd79 100644 --- a/app/test-pmd/macfwd.c +++ b/app/test-pmd/macfwd.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/app/test-pmd/macswap.c b/app/test-pmd/macswap.c index 57f77003fe..e1f9be4901 100644 --- a/app/test-pmd/macswap.c +++ b/app/test-pmd/macswap.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/app/test-pmd/noisy_vnf.c b/app/test-pmd/noisy_vnf.c index 81d1187cfe..cf951e9532 100644 --- a/app/test-pmd/noisy_vnf.c +++ b/app/test-pmd/noisy_vnf.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c index 315f9286cd..cc73cf4ebf 100644 --- a/app/test-pmd/rxonly.c +++ b/app/test-pmd/rxonly.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 70ea257fda..9dd3ffa850 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include From patchwork Wed May 22 03:27:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140260 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9012444093; Wed, 22 May 2024 05:33:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2EF7A40E96; Wed, 22 May 2024 05:31:10 +0200 (CEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id 870F540A77 for ; Wed, 22 May 2024 05:30:46 +0200 (CEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-6f693fb0ad4so1344611b3a.1 for ; Tue, 21 May 2024 20:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348646; x=1716953446; 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=yvucQJz/gko6lXTpBEBmFPTA0Kk+mXAVhtt8hqjoBBk=; b=burJtDzjQzc9u9uJ/qiRLoKmlveP5KfeNTjniyCpmHXWCzQB/WlwlTHdT3r5RjyDsU O3JpQ89uHm1SW+599/iH50SXqdcYseJL9q8uHYqtTdKcncix932UYMln7p2czGnM9t4d 4BNtd6uuu1kWSaiFfRYb+FCmceLNFQ2AVfBjDVKNQc9+EJg2pJgRdZtdMmZhTwn0igu+ 7DKqGJ/RA4WD7QZ/zpZbCRBr9yJLkPcfSJglGv6ihguGGosJ0pYmsICRfnNvY2FCQCep muE6hsp/GH+g70SeIqvfh1odsGhTWgqPWZfRQL8SwXkVDFF1qNYQ783ZjhaOImPgC6rQ vxHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348646; x=1716953446; 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=yvucQJz/gko6lXTpBEBmFPTA0Kk+mXAVhtt8hqjoBBk=; b=VIsMXYO06pZfItDCQupIvNZU8E+acva8Mzs8/72i5NIBuz033dvm8rROAynea6xpZp FpSNj0yL3o4fORosPuRr4fqrFoGZhdetNS5Ot5u6dOlk0qSDKCVA1k8LzSumXM1vowOA JOUPpzBhM40lvXuZattqYUm27vJIgqAnPe/uB5WbE1ghBBBLYt++9HgXKrjQ6iyJN799 AYbcT6COr31f0B+osRAClAaCUJsdLdM3dbUhTWfc2H8S6WyceLZ110IJ6JSJ8CXtJqvZ P13BrqyhU+2tycAyWJ6U1P6IqwRhRgwEkTv0fzPElribOI4MNcJA9uUNU12y4wIsDQU9 OWtg== X-Gm-Message-State: AOJu0YxJE9tEl9hajEhyVBPJ2zXSYOHoeN+tTpe2QDOvoIhnLus051RT KgpGBJTmMA4TnkMEIVnFOXx2Ogs38oSh1kzyYEuu4S9ygXxO3TdiFjW7+4/zWYOJECZv7mWPag3 3c7c= X-Google-Smtp-Source: AGHT+IE2Q3azAJIR/pSzVlAn5tmTsDDXBqZ8VCe3dpQVhhnwS+UbYsKEvodeDVdKqUnZe1H24lrnRA== X-Received: by 2002:a05:6a20:3d83:b0:1a9:ffa0:d007 with SMTP id adf61e73a8af0-1b1f8b66903mr1082610637.58.1716348645625; Tue, 21 May 2024 20:30:45 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:45 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Sunil Kumar Kori , Rakesh Kudurumalla Subject: [PATCH v5 23/32] app/graph: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:50 -0700 Message-ID: <20240522033009.143100-24-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 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 --- app/graph/neigh.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/graph/neigh.c b/app/graph/neigh.c index 79fd542c89..77f0766133 100644 --- a/app/graph/neigh.c +++ b/app/graph/neigh.c @@ -91,14 +91,14 @@ ip6_rewrite_node_add(struct neigh_ipv6_config *v6_config) memset(data, 0, len); /* Copy dst mac */ - rte_memcpy((void *)&data[0], (void *)&v6_config->mac, RTE_ETHER_ADDR_LEN); + memcpy((void *)&data[0], (void *)&v6_config->mac, RTE_ETHER_ADDR_LEN); /* Copy src mac */ rc = rte_eth_macaddr_get(portid, &smac); if (rc < 0) return rc; - rte_memcpy(&data[RTE_ETHER_ADDR_LEN], smac.addr_bytes, RTE_ETHER_ADDR_LEN); + memcpy(&data[RTE_ETHER_ADDR_LEN], smac.addr_bytes, RTE_ETHER_ADDR_LEN); return rte_node_ip6_rewrite_add(portid, data, len, portid); } @@ -121,7 +121,7 @@ ip4_rewrite_node_add(struct neigh_ipv4_config *v4_config) memset(data, 0, len); /* Copy dst mac */ - rte_memcpy((void *)&data[0], (void *)&v4_config->mac, RTE_ETHER_ADDR_LEN); + memcpy((void *)&data[0], (void *)&v4_config->mac, RTE_ETHER_ADDR_LEN); /* Copy src mac */ rc = rte_eth_macaddr_get(portid, &smac); @@ -130,7 +130,7 @@ ip4_rewrite_node_add(struct neigh_ipv4_config *v4_config) return rc; } - rte_memcpy(&data[RTE_ETHER_ADDR_LEN], smac.addr_bytes, RTE_ETHER_ADDR_LEN); + memcpy(&data[RTE_ETHER_ADDR_LEN], smac.addr_bytes, RTE_ETHER_ADDR_LEN); return rte_node_ip4_rewrite_add(portid, data, len, portid); } From patchwork Wed May 22 03:27:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140261 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4C21F44093; Wed, 22 May 2024 05:33:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CD32B4064A; Wed, 22 May 2024 05:31:12 +0200 (CEST) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id 2263440A6E for ; Wed, 22 May 2024 05:30:47 +0200 (CEST) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-1e3c3aa8938so108856885ad.1 for ; Tue, 21 May 2024 20:30:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348646; x=1716953446; 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=NdOJNRYtaFn8OJnWxtmxRcBu/Ukdz8oDuSwGn+xcQ3w=; b=w48SxPEu7uWlg9M6EWk2Bqw+7w2upvifHYTQl/vgVTD9V0v9qfqRipi5628eJLTnnQ 4/tIqDNzFj+wg686A4eI5PGiyd65VWiiin6rtLpqDDuDItk9rwwrVRzrFzlhdCg7iTKh BRqTdAN0HumPcUvETC4/EentmWqZSBgOyIZzkhafoG8MLp2tj0otiVnJCCiOgWIpF+Wm 0wSCZ9WVA6jda13Q4cghVsS7AfwKmlH0yfk2YMLfFZEgNPLP0Sfi3HEJyIyaz91tpO0I 30Y64/IHqmu36SNQEjV9l3AwIrXGunYv14g1C1T5i3B7HOP+94g34cdpIYMF2YHlicF+ 6W1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348646; x=1716953446; 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=NdOJNRYtaFn8OJnWxtmxRcBu/Ukdz8oDuSwGn+xcQ3w=; b=HxLiNf7XUWecOfDLvqFnzthgKhDnU4ya/RA+DcoLMjxR4vq06RWvmcAYfmBpPdzh5n uD7S5okm3Z7zgBmyDsEgIawlUr2Y+hlcCWTBdiKOfFlB/fKFEXcHalxHAIqc0BJijCsz 4GMpFcjI7NmeaMZNFjFJ9/pTqQxXm+APZ1HPjVZq8h1Onco3jCD+URR0ieYQMX9VoD88 fLV5qrdTsUIrgQsn6A1QgcetB8sC+h9F5LulylRanwu2S85YRbx33GxxReTub25qnC0B GIXVvBLFdzPXbPYi5NVdT8llPJ+uFmOdkXy4Lvt+9AZd+Ln1OeJfvjJXyjW08JEy/e+k KupA== X-Gm-Message-State: AOJu0Yxy9BYKBR7zIJMApUySV5CZVjnKBZH9RrGm52sxCGFjGouNIYQk kUle8jYab29LWTG3jdVY5kEwZZYKXo0j8mWpVZ2DMbpzFHyyFrmsXpdoAxm2+j1hMKZZKU9nTR/ exvA= X-Google-Smtp-Source: AGHT+IFEpL/30jqD/VY4uR1X9EmZ5p4gLNLHv/MZ0dBQjOlwGXNGePuP+3MDSMPFruJxUkgBUMDQFg== X-Received: by 2002:a17:903:2111:b0:1ee:b25c:1a8 with SMTP id d9443c01a7336-1f31c9f4f4amr6977745ad.47.1716348646335; Tue, 21 May 2024 20:30:46 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:46 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jerin Jacob Subject: [PATCH v5 24/32] app/test-eventdev: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:51 -0700 Message-ID: <20240522033009.143100-25-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 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 --- app/test-eventdev/test_pipeline_common.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c index b111690b7c..49bfd0c363 100644 --- a/app/test-eventdev/test_pipeline_common.c +++ b/app/test-eventdev/test_pipeline_common.c @@ -177,22 +177,17 @@ pipeline_tx_first(struct test_pipeline *t, struct evt_options *opt) mbuf->pkt_len = pkt_sz; /* Copy Ethernet header */ - rte_memcpy(rte_pktmbuf_mtod_offset(mbuf, char *, 0), - ð_hdr, sizeof(struct rte_ether_hdr)); + memcpy(rte_pktmbuf_mtod_offset(mbuf, char *, 0), + ð_hdr, sizeof(struct rte_ether_hdr)); /* Copy Ipv4 header */ - rte_memcpy(rte_pktmbuf_mtod_offset( - mbuf, char *, - sizeof(struct rte_ether_hdr)), - &ip_hdr, sizeof(struct rte_ipv4_hdr)); + memcpy(rte_pktmbuf_mtod_offset(mbuf, char *, sizeof(struct rte_ether_hdr)), + &ip_hdr, sizeof(struct rte_ipv4_hdr)); /* Copy UDP header */ - rte_memcpy( - rte_pktmbuf_mtod_offset( - mbuf, char *, - sizeof(struct rte_ipv4_hdr) + - sizeof(struct rte_ether_hdr)), - &udp_hdr, sizeof(struct rte_udp_hdr)); + memcpy(rte_pktmbuf_mtod_offset(mbuf, char *, sizeof(struct rte_ipv4_hdr) + + sizeof(struct rte_ether_hdr)), + &udp_hdr, sizeof(struct rte_udp_hdr)); pkt_udp_hdr = rte_pktmbuf_mtod_offset( mbuf, struct rte_udp_hdr *, sizeof(struct rte_ipv4_hdr) + From patchwork Wed May 22 03:27:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140262 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E17BE44093; Wed, 22 May 2024 05:33:22 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3CABA410D5; Wed, 22 May 2024 05:31:14 +0200 (CEST) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mails.dpdk.org (Postfix) with ESMTP id 5B5A240DF6 for ; Wed, 22 May 2024 05:30:48 +0200 (CEST) Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-5f80aa2d4a3so1008436a12.0 for ; Tue, 21 May 2024 20:30:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348647; x=1716953447; 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=1KPE71GIzaRj4QiwMYVj9+BqXhgDAuHoqq/fKTB5Byo=; b=r4U83nGy+D3AS4X+JEUssextYtblgaSGWSPMz+KaScp9EVrpA2SEwfvscSCnw6jmhD 7xR7euy93e1W06YOPj0cJ+ioToB/2c9dbBmlXu3UhaHT9mdK/Q4WJrQavgaZSp8PNnq+ 2MGmTln1SN2XgrtEzU61uNg2bvU1/fUsr1De52ivLJK4zYaRy/gI32JA8K4seCL9UyTe hsyKhE7mVW3msYCkNUzZclcZru6g9r+M5Pdra5qcoM1jlTQv42PFHkngqq6Hpv/DxMG0 WKEabkI21YgODuR0Sn60Kjy0sVLOJZdfMM+SCDthCmfCf430+El3RM4S8ZTkL67+a+iW 7VFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348647; x=1716953447; 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=1KPE71GIzaRj4QiwMYVj9+BqXhgDAuHoqq/fKTB5Byo=; b=NswZiq4P59TLmHnvkXeNdsWAo34cBuvbeKvG3YYFNrmMle02KPLL/07mEr//mqdxBB Ux5QQcm7NPT3u4xsx5zN7K0PumhZvJIr5U/sSGluVkoNbezBKeJSPjtILV+ZiowzsfZf r2H4kEeG8fkoBG2W7fUaRomBDLLPh7zCyfeBmK2acnHk4bgKkUF0BT+a15iJUwYCLuzt C/4i1O9dZQI0DxZn/vIHUmnsBuL1EosizX76Bx3Hd/n9n/DnHonXcw5bJKFlMUk7zTR/ W4c7DdfUNZB88BAx4zGLtTOdBgUsjkVFz6B2pFIpgsuZhAqDJ/amLS2jBRTUGSb4tHJn DYfQ== X-Gm-Message-State: AOJu0YwYHsP6AtvUs1WWV2H+52t/xDjaNkruQlq/HwUlJOJ9NwdXFnGr C9qMTt1GyvOBaIg1cK7RIoVOBnH2Zf3fM0aezSDgLRCT5gQHdwne5sqWx1kkBjnWyMt9nMJqMn2 XpXU= X-Google-Smtp-Source: AGHT+IFtfYxVyvG7oLwvqMDwzFJoFTRwi9EFQCj0gbxsY9A75Ff8a4WqobezQlpx8MXb7Gw6fjapJg== X-Received: by 2002:a17:90a:d705:b0:2bd:82a5:e465 with SMTP id 98e67ed59e1d1-2bd9f460b2cmr943687a91.28.1716348647543; Tue, 21 May 2024 20:30:47 -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.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:47 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jasvinder Singh , Akhil Goyal , Fan Zhang , Byron Marohn , Yipeng Wang , Abhinandan Gujjar , Amit Prakash Shukla , Jerin Jacob , Konstantin Ananyev , Vladimir Medvedkin , Chas Williams , "Min Hu (Connor)" , Sameh Gobriel , Sachin Saxena , Hemant Agrawal , Anoob Joseph , Harry van Haaren Subject: [PATCH v5 25/32] app/test: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:52 -0700 Message-ID: <20240522033009.143100-26-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 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 --- app/test/commands.c | 1 - app/test/packet_burst_generator.c | 4 +-- app/test/test_crc.c | 5 ++-- app/test/test_cryptodev.c | 18 ++++++------- app/test/test_cryptodev_asym.c | 1 - app/test/test_cryptodev_security_pdcp.c | 1 - app/test/test_efd.c | 1 - app/test/test_efd_perf.c | 1 - app/test/test_event_crypto_adapter.c | 12 ++++----- app/test/test_event_dma_adapter.c | 4 +-- app/test/test_eventdev.c | 1 - app/test/test_ipsec.c | 6 ++--- app/test/test_link_bonding_mode4.c | 8 +++--- app/test/test_mbuf.c | 1 - app/test/test_member.c | 1 - app/test/test_member_perf.c | 1 - app/test/test_rawdev.c | 1 - app/test/test_security_inline_proto.c | 36 ++++++++++++------------- app/test/test_service_cores.c | 1 - app/test/virtual_pmd.c | 3 +-- 20 files changed, 46 insertions(+), 61 deletions(-) diff --git a/app/test/commands.c b/app/test/commands.c index 497d8e9952..74494a0ef4 100644 --- a/app/test/commands.c +++ b/app/test/commands.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c index 867a88da00..fcca2d238e 100644 --- a/app/test/packet_burst_generator.c +++ b/app/test/packet_burst_generator.c @@ -148,8 +148,8 @@ initialize_ipv6_header(struct rte_ipv6_hdr *ip_hdr, uint8_t *src_addr, ip_hdr->proto = IPPROTO_UDP; ip_hdr->hop_limits = IP_DEFTTL; - rte_memcpy(ip_hdr->src_addr, src_addr, sizeof(ip_hdr->src_addr)); - rte_memcpy(ip_hdr->dst_addr, dst_addr, sizeof(ip_hdr->dst_addr)); + memcpy(ip_hdr->src_addr, src_addr, sizeof(ip_hdr->src_addr)); + memcpy(ip_hdr->dst_addr, dst_addr, sizeof(ip_hdr->dst_addr)); return (uint16_t) (pkt_data_len + sizeof(struct rte_ipv6_hdr)); } diff --git a/app/test/test_crc.c b/app/test/test_crc.c index b85fca35fe..30fe004506 100644 --- a/app/test/test_crc.c +++ b/app/test/test_crc.c @@ -6,7 +6,6 @@ #include #include -#include #include #define CRC_VEC_LEN 32 @@ -83,7 +82,7 @@ test_crc_calc(void) return -7; for (i = 0; i < CRC32_VEC_LEN1; i += 12) - rte_memcpy(&test_data[i], crc32_vec1, 12); + memcpy(&test_data[i], crc32_vec1, 12); result = crc_calc(test_data, CRC32_VEC_LEN1, type); if (result != crc32_vec1_res) { @@ -93,7 +92,7 @@ test_crc_calc(void) /* 32-bit ethernet CRC: Test 3 */ for (i = 0; i < CRC32_VEC_LEN2; i += 12) - rte_memcpy(&test_data[i], crc32_vec1, 12); + memcpy(&test_data[i], crc32_vec1, 12); result = crc_calc(test_data, CRC32_VEC_LEN2, type); if (result != crc32_vec2_res) { diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 1703ebccf1..97651cdb6c 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -2479,8 +2479,8 @@ test_AES_CBC_HMAC_SHA1_encrypt_digest(void) sym_op->auth.data.length = QUOTE_512_BYTES; /* Copy IV at the end of the crypto operation */ - rte_memcpy(rte_crypto_op_ctod_offset(ut_params->op, uint8_t *, IV_OFFSET), - aes_cbc_iv, CIPHER_IV_LENGTH_AES_CBC); + memcpy(rte_crypto_op_ctod_offset(ut_params->op, uint8_t *, IV_OFFSET), + aes_cbc_iv, CIPHER_IV_LENGTH_AES_CBC); /* Set crypto operation cipher parameters */ sym_op->cipher.data.offset = 0; @@ -2614,9 +2614,7 @@ test_AES_CBC_HMAC_SHA512_decrypt_perform(void *sess, DIGEST_BYTE_LENGTH_SHA512); TEST_ASSERT_NOT_NULL(ut_params->digest, "no room to append digest"); - rte_memcpy(ut_params->digest, - digest, - DIGEST_BYTE_LENGTH_SHA512); + memcpy(ut_params->digest, digest, DIGEST_BYTE_LENGTH_SHA512); /* Generate Crypto op data structure */ ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool, @@ -2639,8 +2637,8 @@ test_AES_CBC_HMAC_SHA512_decrypt_perform(void *sess, sym_op->auth.data.length = QUOTE_512_BYTES; /* Copy IV at the end of the crypto operation */ - rte_memcpy(rte_crypto_op_ctod_offset(ut_params->op, uint8_t *, IV_OFFSET), - iv, CIPHER_IV_LENGTH_AES_CBC); + memcpy(rte_crypto_op_ctod_offset(ut_params->op, uint8_t *, IV_OFFSET), + iv, CIPHER_IV_LENGTH_AES_CBC); sym_op->cipher.data.offset = 0; sym_op->cipher.data.length = QUOTE_512_BYTES; @@ -8997,7 +8995,7 @@ create_aead_operation(enum rte_crypto_aead_operation op, uint8_t *, IV_OFFSET); if (tdata->iv.len == 0) { - rte_memcpy(iv_ptr, tdata->iv.data, AES_GCM_J0_LENGTH); + memcpy(iv_ptr, tdata->iv.data, AES_GCM_J0_LENGTH); debug_hexdump(stdout, "iv:", iv_ptr, AES_GCM_J0_LENGTH); } else { @@ -14337,8 +14335,8 @@ test_multi_session_random_usage(void) for (i = 0; i < MB_SESSION_NUMBER; i++) { - rte_memcpy(&ut_paramz[i].ut_params, &unittest_params, - sizeof(struct crypto_unittest_params)); + memcpy(&ut_paramz[i].ut_params, &unittest_params, + sizeof(struct crypto_unittest_params)); test_AES_CBC_HMAC_SHA512_decrypt_create_session_params( &ut_paramz[i].ut_params, diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c index 17daf734e8..88561a8f25 100644 --- a/app/test/test_cryptodev_asym.c +++ b/app/test/test_cryptodev_asym.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include diff --git a/app/test/test_cryptodev_security_pdcp.c b/app/test/test_cryptodev_security_pdcp.c index a7641bab7a..39926cbee3 100644 --- a/app/test/test_cryptodev_security_pdcp.c +++ b/app/test/test_cryptodev_security_pdcp.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/app/test/test_efd.c b/app/test/test_efd.c index 1c0986b9bc..306f851c52 100644 --- a/app/test/test_efd.c +++ b/app/test/test_efd.c @@ -13,7 +13,6 @@ test_efd(void) #else -#include #include #include #include diff --git a/app/test/test_efd_perf.c b/app/test/test_efd_perf.c index b212e96767..7f5a8b9a56 100644 --- a/app/test/test_efd_perf.c +++ b/app/test/test_efd_perf.c @@ -22,7 +22,6 @@ test_efd_perf(void) #include #include #include -#include #include #define NUM_KEYSIZES 10 diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index 0c56744ba0..4992c5bc50 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -454,7 +454,7 @@ test_op_forward_mode(uint8_t session_less) m_data.request_info.cdev_id = request_info.cdev_id; m_data.request_info.queue_pair_id = request_info.queue_pair_id; m_data.response_info.event = response_info.event; - rte_memcpy((uint8_t *)op + len, &m_data, sizeof(m_data)); + memcpy((uint8_t *)op + len, &m_data, sizeof(m_data)); } sym_op->m_src = m; @@ -653,8 +653,8 @@ test_asym_op_forward_mode(uint8_t session_less) m_data.request_info.cdev_id = request_info.cdev_id; m_data.request_info.queue_pair_id = request_info.queue_pair_id; m_data.response_info.event = response_info.event; - rte_memcpy((uint8_t *)op + op->private_data_offset, - &m_data, sizeof(m_data)); + memcpy((uint8_t *)op + op->private_data_offset, &m_data, + sizeof(m_data)); } /* Fill in event info and update event_ptr with rte_crypto_op */ memset(&ev, 0, sizeof(ev)); @@ -820,7 +820,7 @@ test_op_new_mode(uint8_t session_less) op->private_data_offset = len; /* Fill in private data information */ m_data.response_info.event = response_info.event; - rte_memcpy((uint8_t *)op + len, &m_data, sizeof(m_data)); + memcpy((uint8_t *)op + len, &m_data, sizeof(m_data)); } sym_op->m_src = m; @@ -977,8 +977,8 @@ test_asym_op_new_mode(uint8_t session_less) sizeof(struct rte_crypto_asym_xform)); /* Fill in private data information */ m_data.response_info.event = response_info.event; - rte_memcpy((uint8_t *)op + op->private_data_offset, - &m_data, sizeof(m_data)); + memcpy((uint8_t *)op + op->private_data_offset, &m_data, + sizeof(m_data)); } ret = send_op_recv_ev(op); diff --git a/app/test/test_event_dma_adapter.c b/app/test/test_event_dma_adapter.c index 35b417b69f..af2e44a703 100644 --- a/app/test/test_event_dma_adapter.c +++ b/app/test/test_event_dma_adapter.c @@ -269,8 +269,8 @@ test_op_forward_mode(void) op->vchan = TEST_DMA_VCHAN_ID; response_info.event = dma_response_info.event; - rte_memcpy((uint8_t *)op + sizeof(struct rte_event_dma_adapter_op), &response_info, - sizeof(struct rte_event)); + memcpy((uint8_t *)op + sizeof(struct rte_event_dma_adapter_op), + &response_info, sizeof(struct rte_event)); /* Fill in event info and update event_ptr with rte_event_dma_adapter_op */ memset(&ev[i], 0, sizeof(struct rte_event)); diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c index e4e234dc98..d2ae9b4930 100644 --- a/app/test/test_eventdev.c +++ b/app/test/test_eventdev.c @@ -8,7 +8,6 @@ #include #include #include -#include #ifdef RTE_EXEC_ENV_WINDOWS static int diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c index 6cb1bac1e7..25aabdb616 100644 --- a/app/test/test_ipsec.c +++ b/app/test/test_ipsec.c @@ -601,10 +601,10 @@ setup_test_string_tunneled(struct rte_mempool *mpool, const char *string, /* copy outer IP and ESP header */ ipv4_outer.total_length = rte_cpu_to_be_16(t_len); ipv4_outer.packet_id = rte_cpu_to_be_16(seq); - rte_memcpy(dst, &ipv4_outer, sizeof(ipv4_outer)); + memcpy(dst, &ipv4_outer, sizeof(ipv4_outer)); dst += sizeof(ipv4_outer); m->l3_len = sizeof(ipv4_outer); - rte_memcpy(dst, &esph, sizeof(esph)); + memcpy(dst, &esph, sizeof(esph)); dst += sizeof(esph); if (string != NULL) { @@ -616,7 +616,7 @@ setup_test_string_tunneled(struct rte_mempool *mpool, const char *string, sizeof(esp_pad_bytes))); dst += padlen; /* copy ESP tail header */ - rte_memcpy(dst, &espt, sizeof(espt)); + memcpy(dst, &espt, sizeof(espt)); } else memset(dst, 0, t_len); diff --git a/app/test/test_link_bonding_mode4.c b/app/test/test_link_bonding_mode4.c index ff13dbed93..e4827c1e80 100644 --- a/app/test/test_link_bonding_mode4.c +++ b/app/test/test_link_bonding_mode4.c @@ -1399,8 +1399,8 @@ test_mode4_ext_ctrl(void) for (i = 0; i < MEMBER_COUNT; i++) { lacp_tx_buf[i] = rte_pktmbuf_alloc(test_params.mbuf_pool); - rte_memcpy(rte_pktmbuf_mtod(lacp_tx_buf[i], char *), - &lacpdu, sizeof(lacpdu)); + memcpy(rte_pktmbuf_mtod(lacp_tx_buf[i], char *), &lacpdu, + sizeof(lacpdu)); rte_pktmbuf_pkt_len(lacp_tx_buf[i]) = sizeof(lacpdu); } @@ -1453,8 +1453,8 @@ test_mode4_ext_lacp(void) for (i = 0; i < MEMBER_COUNT; i++) { lacp_tx_buf[i] = rte_pktmbuf_alloc(test_params.mbuf_pool); - rte_memcpy(rte_pktmbuf_mtod(lacp_tx_buf[i], char *), - &lacpdu, sizeof(lacpdu)); + memcpy(rte_pktmbuf_mtod(lacp_tx_buf[i], char *), &lacpdu, + sizeof(lacpdu)); rte_pktmbuf_pkt_len(lacp_tx_buf[i]) = sizeof(lacpdu); } diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index 17be977f31..e1fa5b0f7f 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/app/test/test_member.c b/app/test/test_member.c index 5a4d2750db..7281a644bd 100644 --- a/app/test/test_member.c +++ b/app/test/test_member.c @@ -7,7 +7,6 @@ #include #include "test.h" -#include #include #ifdef RTE_EXEC_ENV_WINDOWS diff --git a/app/test/test_member_perf.c b/app/test/test_member_perf.c index db6b8a18ef..f40fdba91e 100644 --- a/app/test/test_member_perf.c +++ b/app/test/test_member_perf.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include diff --git a/app/test/test_rawdev.c b/app/test/test_rawdev.c index d34691dacf..120e61dcc2 100644 --- a/app/test/test_rawdev.c +++ b/app/test/test_rawdev.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #ifdef RTE_EXEC_ENV_WINDOWS diff --git a/app/test/test_security_inline_proto.c b/app/test/test_security_inline_proto.c index 10f7e58caa..03eaf29305 100644 --- a/app/test/test_security_inline_proto.c +++ b/app/test/test_security_inline_proto.c @@ -245,8 +245,8 @@ create_inline_ipsec_session(struct ipsec_test_data *sa, uint16_t portid, /* Copy cipher session parameters */ if (sa->aead) { - rte_memcpy(sess_conf->crypto_xform, &sa->xform.aead, - sizeof(struct rte_crypto_sym_xform)); + memcpy(sess_conf->crypto_xform, &sa->xform.aead, + sizeof(struct rte_crypto_sym_xform)); sess_conf->crypto_xform->aead.key.data = sa->key.data; /* Verify crypto capabilities */ if (test_sec_crypto_caps_aead_verify(sec_cap, sess_conf->crypto_xform) != 0) { @@ -256,13 +256,13 @@ create_inline_ipsec_session(struct ipsec_test_data *sa, uint16_t portid, } } else { if (dir == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) { - rte_memcpy(&sess_conf->crypto_xform->cipher, - &sa->xform.chain.cipher.cipher, - sizeof(struct rte_crypto_cipher_xform)); + memcpy(&sess_conf->crypto_xform->cipher, + &sa->xform.chain.cipher.cipher, + sizeof(struct rte_crypto_cipher_xform)); - rte_memcpy(&sess_conf->crypto_xform->next->auth, - &sa->xform.chain.auth.auth, - sizeof(struct rte_crypto_auth_xform)); + memcpy(&sess_conf->crypto_xform->next->auth, + &sa->xform.chain.auth.auth, + sizeof(struct rte_crypto_auth_xform)); sess_conf->crypto_xform->cipher.key.data = sa->key.data; sess_conf->crypto_xform->next->auth.key.data = @@ -282,12 +282,12 @@ create_inline_ipsec_session(struct ipsec_test_data *sa, uint16_t portid, return TEST_SKIPPED; } } else { - rte_memcpy(&sess_conf->crypto_xform->next->cipher, - &sa->xform.chain.cipher.cipher, - sizeof(struct rte_crypto_cipher_xform)); - rte_memcpy(&sess_conf->crypto_xform->auth, - &sa->xform.chain.auth.auth, - sizeof(struct rte_crypto_auth_xform)); + memcpy(&sess_conf->crypto_xform->next->cipher, + &sa->xform.chain.cipher.cipher, + sizeof(struct rte_crypto_cipher_xform)); + memcpy(&sess_conf->crypto_xform->auth, + &sa->xform.chain.auth.auth, + sizeof(struct rte_crypto_auth_xform)); sess_conf->crypto_xform->auth.key.data = sa->auth_key.data; sess_conf->crypto_xform->next->cipher.key.data = @@ -463,12 +463,12 @@ init_packet(struct rte_mempool *mp, const uint8_t *data, unsigned int len, bool return NULL; if (outer_ipv4) { - rte_memcpy(rte_pktmbuf_append(pkt, RTE_ETHER_HDR_LEN), - &dummy_ipv4_eth_hdr, RTE_ETHER_HDR_LEN); + memcpy(rte_pktmbuf_append(pkt, RTE_ETHER_HDR_LEN), + &dummy_ipv4_eth_hdr, RTE_ETHER_HDR_LEN); pkt->l3_len = sizeof(struct rte_ipv4_hdr); } else { - rte_memcpy(rte_pktmbuf_append(pkt, RTE_ETHER_HDR_LEN), - &dummy_ipv6_eth_hdr, RTE_ETHER_HDR_LEN); + memcpy(rte_pktmbuf_append(pkt, RTE_ETHER_HDR_LEN), + &dummy_ipv6_eth_hdr, RTE_ETHER_HDR_LEN); pkt->l3_len = sizeof(struct rte_ipv6_hdr); } pkt->l2_len = RTE_ETHER_HDR_LEN; diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c index 010ab82893..6d0618c447 100644 --- a/app/test/test_service_cores.c +++ b/app/test/test_service_cores.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c index b7d74a467a..ae48923df7 100644 --- a/app/test/virtual_pmd.c +++ b/app/test/virtual_pmd.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include @@ -186,7 +185,7 @@ virtual_ethdev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) struct virtual_ethdev_private *dev_private = dev->data->dev_private; if (stats) - rte_memcpy(stats, &dev_private->eth_stats, sizeof(*stats)); + memcpy(stats, &dev_private->eth_stats, sizeof(*stats)); return 0; } From patchwork Wed May 22 03:27:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140263 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9313044093; Wed, 22 May 2024 05:33:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8EA3A410ED; Wed, 22 May 2024 05:31:15 +0200 (CEST) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mails.dpdk.org (Postfix) with ESMTP id 03AB440DF6 for ; Wed, 22 May 2024 05:30:48 +0200 (CEST) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1ed96772f92so7130695ad.0 for ; Tue, 21 May 2024 20:30:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348648; x=1716953448; 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=Z9FUfuO95egBTo4uDUTEL8K4PBgpv2V81T0KdWkbRGY=; b=dFOFKVWbsxPLUWphiW3VH+yAqBVpQm16QUtwP9Rt5BJcS7A9MExBjY7fI1f4/Dlrs1 1X9XhlnVvD3QjqnhrTlfDlcOH3zc0NodrC9hHFoIQ1PHiWN7ZzbwvtHvK3yYIpqXHa2W VjDD1JJ8KkVcRSH8nWsxa29Y+WbjfdML4wn9hdBzp57rC+AouZXL9jqck0ixa1fXeZxX jVpSunn9KTHl/l/Az82Jj9Riwqmb7uMxZswyO1ZinOFF38GWrd10mYxGyPFDfzs+Zpcn w1m74WtRK5iGaOguBU9c6taYa7IJn8t/+GLS0RIO9Dnct1EIR7Ro7w/xiQ1lp9mUJSXc 6DqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348648; x=1716953448; 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=Z9FUfuO95egBTo4uDUTEL8K4PBgpv2V81T0KdWkbRGY=; b=rRFLZRkuygV+BmOjczfTb5D2bpnfldyqmwLeegGVrZ/ujYbW9H6aQ/wIDDsRcNdqqF xJzWcNI2soUFSbZS7+cW9jWPeue5cWhqchXNHWj5W8VwB4vdoovoRwMZ90R/BsfmucAx jiPX8aL/N0zpj1ElWoYWW2Lw9eJiSaDJ1QhzfaGo+Xi14VUe4991dxE9zCPOC4V17XH8 Q9PxXUof6eWRZvqHo5L1yZkYMUa825KWmLoO/bUceGJf9/zsKVFiMAZpp/qqI7keD2tE G0cStxB9/VlQbYCsFUuhyihpKVLYbbrL0pYLUGlupINSh1DcdL+S2xK68nuV5b2yra20 gVGA== X-Gm-Message-State: AOJu0YwAOcacUix+Wi1iEDoRDN77KTWS7L+xkrZ4iMs0tUlux9xLsq87 ouDfrT1FG8NDFK+/ICNTHYHPGT6BJ8wJJT+mIEIMX8sahTsD8FpJ+U5LvWvgWRCXaLFWUkGxjFS 6ZJs= X-Google-Smtp-Source: AGHT+IG23ef78Ee6JZCoFBBOSO9uZAoAgq8TobcssT02WkEzd0v6d0/0Scj8qPvUkCqcBGouFVWclg== X-Received: by 2002:a17:903:40cc:b0:1e3:c610:597d with SMTP id d9443c01a7336-1f31c9e17a9mr8620695ad.60.1716348648269; Tue, 21 May 2024 20:30:48 -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.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:47 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Cristian Dumitrescu Subject: [PATCH v5 26/32] app/test-pipeline: remove unused rte_memcpy.h include Date: Tue, 21 May 2024 20:27:53 -0700 Message-ID: <20240522033009.143100-27-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 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 This included but never used here. Signed-off-by: Stephen Hemminger --- app/test-pipeline/config.c | 1 - app/test-pipeline/init.c | 1 - app/test-pipeline/main.c | 1 - app/test-pipeline/runtime.c | 1 - 4 files changed, 4 deletions(-) diff --git a/app/test-pipeline/config.c b/app/test-pipeline/config.c index daf838948b..f4d5d435ad 100644 --- a/app/test-pipeline/config.c +++ b/app/test-pipeline/config.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/app/test-pipeline/init.c b/app/test-pipeline/init.c index 558f0e428d..8028192306 100644 --- a/app/test-pipeline/init.c +++ b/app/test-pipeline/init.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/app/test-pipeline/main.c b/app/test-pipeline/main.c index 4cc098d7ac..ca0bc9d9d1 100644 --- a/app/test-pipeline/main.c +++ b/app/test-pipeline/main.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/app/test-pipeline/runtime.c b/app/test-pipeline/runtime.c index 752f783370..a6457488c0 100644 --- a/app/test-pipeline/runtime.c +++ b/app/test-pipeline/runtime.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include From patchwork Wed May 22 03:27:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140264 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9674A44093; Wed, 22 May 2024 05:33:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DAF8440E54; Wed, 22 May 2024 05:31:16 +0200 (CEST) Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by mails.dpdk.org (Postfix) with ESMTP id E2B5640A84 for ; Wed, 22 May 2024 05:30:49 +0200 (CEST) Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-60585faa69fso319493a12.1 for ; Tue, 21 May 2024 20:30:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348649; x=1716953449; 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=BNF43FGWT2y5RW9sD5lCwVrXPoYR3bJS2Yx9rw6CcdY=; b=YCZJE6TUUf7gzqhlgKxf+CeHGS45f+IgrKrZplmE5HZais4DEMoNjQMrHh5J2PtSMR O9JYx7WSJI/VHTU7wmNx1nEa5A6LZ16j2beiAhn7q8QnJ2Xt49xhUWM5UO0GTcdgHK6X aHdvjY/HRwiGs5SmoBLiwN2jYFbNg5lVMU3WKpHMmNmsN6Bde6bpzRmO/OGv0AjgCmsq IW1HW/N/xz4epOF7GUm9BuUvAnw5kHJRLmaqJ8pdZAsFh2+tNZXZ707dkW3Cg0b+QQH4 /rrsNDD+76bK/4jcwO0mPP8AAEPcZR4hFGceGWm0c3YSF3CTNYzxb/mMQoTnVK1AeWe9 gknQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348649; x=1716953449; 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=BNF43FGWT2y5RW9sD5lCwVrXPoYR3bJS2Yx9rw6CcdY=; b=KA6M1pNjmd3LX+5SNbMHO0gVEqVgZ001ueA6HNfxJ/sMriOpMRl7hqswUfTOlZv7p/ 0va4jW4lX/xah8MEUclezJwuUoj95O0s0ntjKwade3hFSoyzFwtW5iYuJYuFKelZYkYO THRJtiyJ/qcWxhbB55KMnkBYCAu40SfeYbupivE5rbKcvaGt+Gnj7yQLapEe9nyMGryn xKeOwm+HLCvm2CtnBS4BMgaeCBeQhkmiEZBAQ2PFGcEen+ZmwuQ5AfvLwTGuIRU5Rxn2 EuvR6Ae3tZDMRz6aB/avXVFnVRI2+eo+K2AW//WIzdrWtyNGOwDa1XtVGctXwffonLeg HuAw== X-Gm-Message-State: AOJu0YxVE4OGbEjxOtgQggVDWD+9lHxHiBwPYz9ejKwagCvxCDjP9+KN m3qt9ffBEY+uswGCAxh/J8KwpP/sWD0MCtHVpnuQWGLsOqG8gPTHGlVePBgYDbuIAHAuAEmHjLX 8UvU= X-Google-Smtp-Source: AGHT+IEuewQ2C+SKI2BN7VVAQ5WBzztLq28Uta3Yo1lTpN81yoZ/SQVHVwmPX2QMrjkmvAn1T+EKgw== X-Received: by 2002:a17:902:d505:b0:1f3:650:ce57 with SMTP id d9443c01a7336-1f31ace302amr13286755ad.3.1716348649140; Tue, 21 May 2024 20:30:49 -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.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:48 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Nicolas Chautru Subject: [PATCH v5 27/32] app/test-bbdev: remove unnecessary include of rte_memcpy.h Date: Tue, 21 May 2024 20:27:54 -0700 Message-ID: <20240522033009.143100-28-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 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 Includes rte_memcpy.h but no rte_memcpy used. Signed-off-by: Stephen Hemminger --- app/test-bbdev/test_bbdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/app/test-bbdev/test_bbdev.c b/app/test-bbdev/test_bbdev.c index cf224dca5d..7309d85bc5 100644 --- a/app/test-bbdev/test_bbdev.c +++ b/app/test-bbdev/test_bbdev.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include From patchwork Wed May 22 03:27:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140265 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0782144093; Wed, 22 May 2024 05:33:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 92250410F9; Wed, 22 May 2024 05:31:18 +0200 (CEST) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mails.dpdk.org (Postfix) with ESMTP id C620A40E36 for ; Wed, 22 May 2024 05:30:51 +0200 (CEST) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-6f447976de7so1927357b3a.1 for ; Tue, 21 May 2024 20:30:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348651; x=1716953451; 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=vLVeEFpdSR4pk5I1tjXnbHt8E6LU3qIUxX0LlZ2QdSY=; b=dxH5Hi6imE7UKM7Cd5sz/V+9kfutT03f4yUQvIPCLtzf8riBAfycI6Ig1SQGB56yqI YtPGey0M8+58/OptuOMPb7y+4l+pjXkGdWZ87PpD/BfvdQDjjFcVAOzyjzVZzoE4CCHc mdTzHDt4Nbf6F+bnd9aF8mtE/38NDL7ehgIf1EH4m24bo0bkLWAMYkMHc5z25NawMTYa mijMl6YKQP5VYfaOWGLYxELAFBAHsTgcMkg3iCSsJb3LQ2EwtHDvoohNqEBDUg3zpbto wE+5BKPQskUZnuIrIlfNplHTCqqcCRMRpsOQ0tOrW6Wdnq+Ce2fNXCdyUt0JjMF8cJTf 6jnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348651; x=1716953451; 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=vLVeEFpdSR4pk5I1tjXnbHt8E6LU3qIUxX0LlZ2QdSY=; b=leJgzkbdS7O3lfpjbilxBSak1pQB/3MREf68yXQT2fERrigbtgT5Qm5Q/WwXw7RsSy KimM1LcZL6TV6MATYMlZ59mw4XF+KD6ZJ6jdwCPawyBxQ9IuR5qY+JRDAuJBlC7mvQU6 GRC2MDVLaVZlQgJYnSbI8+yh6kLjaUVsxYqWOXZNyaEgJZ2aOuVOYaJSFLW7kogezz2i 6BJsnuBz0mLCrnQOESdC4exftMS5+de0Er7tygm/duwWp4CEbl85eUfOEgmuoV+B7h5+ ovHrAGD5b2b7LzXdFzjfAF2yUD6jOA4CRD2Tn/HhqZt0zcDnCqOXKphMxxGOrl1jj8D2 VacQ== X-Gm-Message-State: AOJu0YzhxRXlls3XQT7TU+FVVdGv7B5j3jXaS8pychJeK9KJ3+LmVqvB gDG3oOhkkSEieVbAJf/SHrfMSXJJ87IkpGV0iIOW2q1JGVFaquRROzDAJnZi7diaKKQwrYR8bS1 GzhA= X-Google-Smtp-Source: AGHT+IG9kX4wfn0IY9pBrDUdVnuoDpPA5fyty8NbhBZt4d46k5QxC8wO1IafWApL9285/qkfkYQd/g== X-Received: by 2002:a05:6a20:438f:b0:1af:f717:e017 with SMTP id adf61e73a8af0-1b1f87f977bmr933308637.27.1716348650945; Tue, 21 May 2024 20:30:50 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:50 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Nicolas Chautru , Chas Williams , "Min Hu (Connor)" , Konstantin Ananyev , Tomasz Kantecki , Akhil Goyal , Bruce Richardson , Anatoly Burakov , David Hunt , Sivaprasad Tummala , Kirill Rybalchenko , Cristian Dumitrescu , Byron Marohn , Yipeng Wang , Maxime Coquelin , Chenbo Xia Subject: [PATCH v5 28/32] examples: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:55 -0700 Message-ID: <20240522033009.143100-29-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 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 Use structure assignment where possible. Signed-off-by: Stephen Hemminger --- examples/bbdev_app/main.c | 2 +- examples/bond/main.c | 1 - examples/ip_fragmentation/main.c | 1 - examples/ip_reassembly/main.c | 1 - examples/ipv4_multicast/main.c | 1 - examples/l2fwd-cat/cat.c | 4 +--- examples/l2fwd-jobstats/main.c | 1 - examples/l2fwd-keepalive/main.c | 1 - examples/l2fwd-macsec/main.c | 1 - examples/l2fwd/main.c | 1 - examples/l3fwd-power/main.c | 1 - examples/l3fwd/main.c | 1 - examples/link_status_interrupt/main.c | 1 - .../client_server_mp/mp_server/init.c | 1 - .../client_server_mp/mp_server/main.c | 1 - examples/multi_process/symmetric_mp/main.c | 1 - examples/ptpclient/ptpclient.c | 11 +++++------ examples/qos_sched/app_thread.c | 1 - examples/qos_sched/main.c | 1 - examples/server_node_efd/efd_server/init.c | 1 - examples/server_node_efd/efd_server/main.c | 1 - examples/vhost/main.c | 6 +++--- examples/vmdq/main.c | 7 +++---- examples/vmdq_dcb/main.c | 15 +++++---------- 24 files changed, 18 insertions(+), 45 deletions(-) diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c index 46f20238db..772963fc9b 100644 --- a/examples/bbdev_app/main.c +++ b/examples/bbdev_app/main.c @@ -360,7 +360,7 @@ add_ether_hdr(struct rte_mbuf *pkt_src, struct rte_mbuf *pkt_dst) eth_to = rte_pktmbuf_mtod(pkt_dst, struct rte_ether_hdr *); /* copy header */ - rte_memcpy(eth_to, eth_from, sizeof(struct rte_ether_hdr)); + memcpy(eth_to, eth_from, sizeof(struct rte_ether_hdr)); } static inline void diff --git a/examples/bond/main.c b/examples/bond/main.c index 9f38b63cbb..4e8eeb7a5e 100644 --- a/examples/bond/main.c +++ b/examples/bond/main.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c index 736eae6f05..e1f27498c0 100644 --- a/examples/ip_fragmentation/main.c +++ b/examples/ip_fragmentation/main.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c index c7019078f7..e770ade798 100644 --- a/examples/ip_reassembly/main.c +++ b/examples/ip_reassembly/main.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c index 1eed645d02..bd4c3f335b 100644 --- a/examples/ipv4_multicast/main.c +++ b/examples/ipv4_multicast/main.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/l2fwd-cat/cat.c b/examples/l2fwd-cat/cat.c index 00e4cde48b..d1689fca29 100644 --- a/examples/l2fwd-cat/cat.c +++ b/examples/l2fwd-cat/cat.c @@ -12,7 +12,6 @@ #include #include -#include #include @@ -314,8 +313,7 @@ parse_l3ca(const char *l3ca) if (cmask != 0 && is_contiguous(cmask) == 0) goto err; - rte_memcpy(&m_config[idx].cpumask, - &cpuset, sizeof(rte_cpuset_t)); + memcpy(&m_config[idx].cpumask, &cpuset, sizeof(rte_cpuset_t)); if (cmask != 0) { m_config[idx].cdp = 1; diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c index 308b8edd20..a7cd5b4840 100644 --- a/examples/l2fwd-jobstats/main.c +++ b/examples/l2fwd-jobstats/main.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c index c3ead9e8b7..010d727086 100644 --- a/examples/l2fwd-keepalive/main.c +++ b/examples/l2fwd-keepalive/main.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/l2fwd-macsec/main.c b/examples/l2fwd-macsec/main.c index 294ee113e3..2088115fb1 100644 --- a/examples/l2fwd-macsec/main.c +++ b/examples/l2fwd-macsec/main.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index c6fafdd019..59ea3172ae 100644 --- a/examples/l2fwd/main.c +++ b/examples/l2fwd/main.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index fba11da7ca..fc0f6b21ec 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index ad28ba9d2e..d16d21f956 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c index ac9c7f6217..aa33e71d7a 100644 --- a/examples/link_status_interrupt/main.c +++ b/examples/link_status_interrupt/main.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/multi_process/client_server_mp/mp_server/init.c b/examples/multi_process/client_server_mp/mp_server/init.c index 65713dbea8..f3b9b49380 100644 --- a/examples/multi_process/client_server_mp/mp_server/init.c +++ b/examples/multi_process/client_server_mp/mp_server/init.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/multi_process/client_server_mp/mp_server/main.c b/examples/multi_process/client_server_mp/mp_server/main.c index ebfc2febc5..691d453d0e 100644 --- a/examples/multi_process/client_server_mp/mp_server/main.c +++ b/examples/multi_process/client_server_mp/mp_server/main.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c index f7d8439cd4..7314a9c6ea 100644 --- a/examples/multi_process/symmetric_mp/main.c +++ b/examples/multi_process/symmetric_mp/main.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c index afb61bba51..7edf235bfb 100644 --- a/examples/ptpclient/ptpclient.c +++ b/examples/ptpclient/ptpclient.c @@ -362,9 +362,9 @@ parse_sync(struct ptpv2_data_slave_ordinary *ptp_data, uint16_t rx_tstamp_idx) ptp_data->seqID_SYNC = rte_be_to_cpu_16(ptp_hdr->seq_id); if (ptp_data->ptpset == 0) { - rte_memcpy(&ptp_data->master_clock_id, - &ptp_hdr->source_port_id.clock_id, - sizeof(struct clock_id)); + memcpy(&ptp_data->master_clock_id, + &ptp_hdr->source_port_id.clock_id, + sizeof(struct clock_id)); ptp_data->ptpset = 1; } @@ -469,9 +469,8 @@ parse_fup(struct ptpv2_data_slave_ordinary *ptp_data) client_clkid->id[6] = eth_hdr->src_addr.addr_bytes[4]; client_clkid->id[7] = eth_hdr->src_addr.addr_bytes[5]; - rte_memcpy(&ptp_data->client_clock_id, - client_clkid, - sizeof(struct clock_id)); + memcpy(&ptp_data->client_clock_id, client_clkid, + sizeof(struct clock_id)); /* Enable flag for hardware timestamping. */ created_pkt->ol_flags |= RTE_MBUF_F_TX_IEEE1588_TMST; diff --git a/examples/qos_sched/app_thread.c b/examples/qos_sched/app_thread.c index e50cc33fde..e9db70bb3c 100644 --- a/examples/qos_sched/app_thread.c +++ b/examples/qos_sched/app_thread.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/qos_sched/main.c b/examples/qos_sched/main.c index b3c2c9ef23..e756ce0da2 100644 --- a/examples/qos_sched/main.c +++ b/examples/qos_sched/main.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include diff --git a/examples/server_node_efd/efd_server/init.c b/examples/server_node_efd/efd_server/init.c index 9c89f6b60d..9a20831a0d 100644 --- a/examples/server_node_efd/efd_server/init.c +++ b/examples/server_node_efd/efd_server/init.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/server_node_efd/efd_server/main.c b/examples/server_node_efd/efd_server/main.c index 75ff0ea532..8cb1b33111 100644 --- a/examples/server_node_efd/efd_server/main.c +++ b/examples/server_node_efd/efd_server/main.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 4391d88c3d..876b09f515 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -405,9 +405,9 @@ get_eth_conf(struct rte_eth_conf *eth_conf, uint32_t num_devices) conf.pool_map[i].pools = (1UL << i); } - (void)(rte_memcpy(eth_conf, &vmdq_conf_default, sizeof(*eth_conf))); - (void)(rte_memcpy(ð_conf->rx_adv_conf.vmdq_rx_conf, &conf, - sizeof(eth_conf->rx_adv_conf.vmdq_rx_conf))); + memcpy(eth_conf, &vmdq_conf_default, sizeof(*eth_conf)); + memcpy(ð_conf->rx_adv_conf.vmdq_rx_conf, &conf, + sizeof(eth_conf->rx_adv_conf.vmdq_rx_conf)); return 0; } diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c index 4a3ce6884c..12ef5bffc2 100644 --- a/examples/vmdq/main.c +++ b/examples/vmdq/main.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -151,9 +150,9 @@ get_eth_conf(struct rte_eth_conf *eth_conf, uint32_t num_pools) conf.pool_map[i].pools = (1UL << (i % num_pools)); } - (void)(rte_memcpy(eth_conf, &vmdq_conf_default, sizeof(*eth_conf))); - (void)(rte_memcpy(ð_conf->rx_adv_conf.vmdq_rx_conf, &conf, - sizeof(eth_conf->rx_adv_conf.vmdq_rx_conf))); + *eth_conf = vmdq_conf_default; + eth_conf->rx_adv_conf.vmdq_rx_conf = conf; + if (rss_enable) { eth_conf->rxmode.mq_mode = RTE_ETH_MQ_RX_VMDQ_RSS; eth_conf->rx_adv_conf.rss_conf.rss_hf = RTE_ETH_RSS_IP | diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c index 4ccc2fe4b0..f93eca5936 100644 --- a/examples/vmdq_dcb/main.c +++ b/examples/vmdq_dcb/main.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -161,15 +160,11 @@ get_eth_conf(struct rte_eth_conf *eth_conf) tx_conf.dcb_tc[i] = i % num_tcs; } dcb_conf.nb_tcs = (enum rte_eth_nb_tcs)num_tcs; - (void)(rte_memcpy(eth_conf, &vmdq_dcb_conf_default, sizeof(*eth_conf))); - (void)(rte_memcpy(ð_conf->rx_adv_conf.vmdq_dcb_conf, &conf, - sizeof(conf))); - (void)(rte_memcpy(ð_conf->rx_adv_conf.dcb_rx_conf, &dcb_conf, - sizeof(dcb_conf))); - (void)(rte_memcpy(ð_conf->rx_adv_conf.vmdq_rx_conf, &vmdq_conf, - sizeof(vmdq_conf))); - (void)(rte_memcpy(ð_conf->tx_adv_conf.vmdq_dcb_tx_conf, &tx_conf, - sizeof(tx_conf))); + (void)(memcpy(eth_conf, &vmdq_dcb_conf_default, sizeof(*eth_conf))); + (void)(memcpy(ð_conf->rx_adv_conf.vmdq_dcb_conf, &conf, sizeof(conf))); + (void)(memcpy(ð_conf->rx_adv_conf.dcb_rx_conf, &dcb_conf, sizeof(dcb_conf))); + (void)(memcpy(ð_conf->rx_adv_conf.vmdq_rx_conf, &vmdq_conf, sizeof(vmdq_conf))); + (void)(memcpy(ð_conf->tx_adv_conf.vmdq_dcb_tx_conf, &tx_conf, sizeof(tx_conf))); if (rss_enable) { eth_conf->rxmode.mq_mode = RTE_ETH_MQ_RX_VMDQ_DCB_RSS; eth_conf->rx_adv_conf.rss_conf.rss_hf = RTE_ETH_RSS_IP | From patchwork Wed May 22 03:27:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140266 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 914B144093; Wed, 22 May 2024 05:33:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D2F7A41104; Wed, 22 May 2024 05:31:19 +0200 (CEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id B596840E64 for ; Wed, 22 May 2024 05:30:52 +0200 (CEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-6f447976de7so1927362b3a.1 for ; Tue, 21 May 2024 20:30:52 -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=zNS7aLtyCDli24heg8Dm4wy3jnSbwozzV2yM3fsLcFc=; b=MnMtT6SiULNHsEUVi8opeD0pvKVX28oJkm2XF5BUoGET+DlyDcOa31tKLfTLHeUecR rY337t+uaxnzOx1Qkn/XC1DsDqNNrMonaXjy/gFKkjr9g77QhE9vhXmdrUOz3iyqICTl 0iBWtrqw5zpfYNSJg8O4vXx+assTBtfsJwxkHe/z/Crky8OC0n6yzyFn65GzVjqipyn7 fsgQzdskthn7uiJxkon/J+s0rlzkP2ZMhow/fXyudjjFW8fDjS3tpi3UCz37CAvCmrvQ Ug4T9XkgasStofa4hL1UcTW11pOgXYv0MavxhXJ4sr7C1QiPZaAYr3CefQ7XmIkLJmYd KPsQ== 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=zNS7aLtyCDli24heg8Dm4wy3jnSbwozzV2yM3fsLcFc=; b=oGwidUMIl5PiG9zsY/Owf0PTyJ9M6Behd0HrGul4KqFKAMalYZEOk1mMt4n37XNTYS DygKa/3zdjThLs0F7c9bBvZzFKB6V4QCKKaiZdS19zao02piNpkd3FpMJrFNYCv+g8SY hnux69M2Z/C5XSo5eDvELis7v0fQgDtlR6z1alWOLV3tfcNBvaiSX2Vk0dSq9uMMIUBD Zd/tQTqJGEhbgL5NLC9l1yqn2yNcFKuo1W+4iICU36KVCq5VfkAt84PxXYyggYjiGkgV 7khsHyiSmSgNoFa6GcflLmOGHpa7Ma++qjcpnGomlXe0DR/9O3tG+h8oW6pi2RveQky5 nBDA== X-Gm-Message-State: AOJu0YynlZMs77aGzhptpR6rwOT12UGLFAVlgqJZPNlEz/RrUhptw1Jh /0zXLqu7ZVMIUH6oAYqSWSKSOI7C57g8t/6uV3hiTIrQoRlXMJjssX6bE3R+ke872bpkJpoGYlO TBSU= X-Google-Smtp-Source: AGHT+IE/wJVAo//gBTrEVQUXLSAju7ESKtgfHFvIoqRgXmKwAW9g/vSTXfKRtqWPs4X83I30bW69yA== X-Received: by 2002:a05:6a20:5a95:b0:1b0:278e:34a6 with SMTP id adf61e73a8af0-1b1f8a594fbmr791906637.49.1716348651792; Tue, 21 May 2024 20:30:51 -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.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:51 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tetsuya Mukawa Subject: [PATCH v5 29/32] net/null: replace use of fixed size memcpy Date: Tue, 21 May 2024 20:27:56 -0700 Message-ID: <20240522033009.143100-30-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 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/null/rte_eth_null.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index f4ed3b8a7f..82249cbe19 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -465,7 +465,7 @@ eth_rss_hash_update(struct rte_eth_dev *dev, struct rte_eth_rss_conf *rss_conf) rss_conf->rss_hf & internal->flow_type_rss_offloads; if (rss_conf->rss_key) - rte_memcpy(internal->rss_key, rss_conf->rss_key, 40); + memcpy(internal->rss_key, rss_conf->rss_key, 40); rte_spinlock_unlock(&internal->rss_lock); @@ -482,7 +482,7 @@ eth_rss_hash_conf_get(struct rte_eth_dev *dev, rss_conf->rss_hf = dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf; if (rss_conf->rss_key) - rte_memcpy(rss_conf->rss_key, internal->rss_key, 40); + memcpy(rss_conf->rss_key, internal->rss_key, 40); rte_spinlock_unlock(&internal->rss_lock); @@ -577,7 +577,7 @@ eth_dev_null_create(struct rte_vdev_device *dev, struct pmd_options *args) internals->flow_type_rss_offloads = RTE_ETH_RSS_PROTO_MASK; internals->reta_size = RTE_DIM(internals->reta_conf) * RTE_ETH_RETA_GROUP_SIZE; - rte_memcpy(internals->rss_key, default_rss_key, 40); + memcpy(internals->rss_key, default_rss_key, 40); data = eth_dev->data; data->nb_rx_queues = (uint16_t)nb_rx_queues; From patchwork Wed May 22 03:27:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140267 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org 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 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.", From patchwork Wed May 22 03:27:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140268 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7A4D944093; Wed, 22 May 2024 05:34:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3DE85427D7; Wed, 22 May 2024 05:31:24 +0200 (CEST) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id 031EB40ED1 for ; Wed, 22 May 2024 05:30:55 +0200 (CEST) Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1ecddf96313so96840955ad.2 for ; Tue, 21 May 2024 20:30:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348655; x=1716953455; 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=4rGr4piL63algCZdB0mHhiNEAEWnec1biLb7c+3SEa0=; b=iCZsDLOdHb0K5ZEz3D3HmcXGCDF6lkgyE000TsIPDsWDWrUA6aNBSB8XG+uKTDmsXG V/ThULDIzoro4fRo7qTLzVdtdT9eUk4TWT7ZCKnYdpKeSRRud4hbuVmAJp3T4SZn+9CX WybIQE+nXcuOHxbMw/m6Lw9NJo6WAwDKjR/gvNTVjJCIqMYSw2tsXREbfLE9KIiu22E+ 0ne/5ZEOeFduTvXSTuLc1jvdqyIwxK7+jtFIBONN0rgkNvkwcjIYZhjuJLKbvCPvI6Rp GHwp3aa92ZJutSP37TXCQ2uKjKX7CiZ3obrKpVCXWkZemSmBPwbQAiD1FMrvEZmBUHcJ KGgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348655; x=1716953455; 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=4rGr4piL63algCZdB0mHhiNEAEWnec1biLb7c+3SEa0=; b=pngChzM9P07+fl4Qjt40QDVL1xkhxUu4+e/3i3gqFotkZ/jfCWKCRY4KHDA2+VsSdg mgo8buljLR5sWgh/esXXBSD+VMzTA9UZje/zsqjnzl30fLRx432Za5OFDCHk4VdNOdjL zJ4y/KhaH/0F0pU9NeNOVYavRM79pv14Hlc8fMks1gZBgTJcFG67oqFyltQV7ME7dZRT uRGbqYKvlnzdQRDx3Prvi6JPjykS7DFJhpwksMQU4BkZVkQ3M2Y3QS8B/4s+ldM8e98O P6yWnEK2U7+b79S/eEJMX3RTa7yiMDe9/Tp+NoI6ti87VE+nNoBAMyJhIRw8/Zk2s1s0 y5ZQ== X-Gm-Message-State: AOJu0Yzt51xE5E2xWjwm55n7OahJD0R1JeAEhky2xfbg42xIihVodd9Q FdlRy9SnpQy4jXig62rf7xATgajMzgY8aXNlBHCGd+9V3i2yjnWhamlJBAApXmR+2bNyi8ozuk2 L5NY= X-Google-Smtp-Source: AGHT+IHlPQ7T0JrJ1rsY+iHOV2Z1mPyxncJxuPXH2D63NV1nGZh48CPC5PglTm9UHNRNRvKDnTEbQg== X-Received: by 2002:a17:902:ce91:b0:1f2:fd49:9fcc with SMTP id d9443c01a7336-1f31c990bbbmr11121855ad.34.1716348653272; Tue, 21 May 2024 20:30:53 -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 31/32] net/pcap: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:58 -0700 Message-ID: <20240522033009.143100-32-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 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 bfec085045..54f0dfffbd 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 20556b3e92..d395a5957d 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 97033f57c5..fc79ad6cdf 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; From patchwork Wed May 22 03:27:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 140269 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4564244093; Wed, 22 May 2024 05:34:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8C53440EE4; Wed, 22 May 2024 05:31:25 +0200 (CEST) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mails.dpdk.org (Postfix) with ESMTP id AE56740E54 for ; Wed, 22 May 2024 05:30:56 +0200 (CEST) Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1edfc57ac0cso6549285ad.3 for ; Tue, 21 May 2024 20:30:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348656; x=1716953456; 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=o4Y6MUo/S6WXe45zI9bdnmnOgez9fmJ8RCTxIxpifsk=; b=WOptJwOmDrCVTTtOCnTGUOWbgTYpPZYAGOBpCN50Ko+wJXQVac74mMqtmSaun5KLQQ VBGnHr97ODZ44WpxUeCwzgAi4hMI/KChGa2vvfJMkEwUuINglF0Ik6oJ5ZFUMA2RJf+1 VK1rrAiA4ma5vGDJmYEBzkNyU5oNvrkGGMg1H8a0U7RfhTQPQLvDOBQJlzaPXQRpwApS aR4ZbifgABcbNxKdJ0VyigGbY62pYKAkx9/aEGtRqckeBRdzwm4txPcdH/AnTMqJ4a4n ifp8dXBrgXmUPcGeqNq8MEHWWzVYfC4ri02EVeqzK5FXKam0TwU3GOVsAb4eURoX3RHR 5fXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348656; x=1716953456; 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=o4Y6MUo/S6WXe45zI9bdnmnOgez9fmJ8RCTxIxpifsk=; b=PL/u8j/UA69+ZYmWN6BwGrp1c+QiMuDlufcZ2wYNyHQkihQzURclBL3Q6jqKBk+2iV TZH9iEHqHs1YlugjEHK729hm4eqsMtzGrhrLSygTf9v56rhKSCLSc94zdqpgdMgkj2q+ dsm2tl+5BBdBTokP6VMBWannwKny+HDwsKbFOayjpq6mqZqRIkD0rAze5hdop2xU+4Lv bZUBpwvcU9NXCngF8K84vWhecW8OwAWfSrDbSqr7xuy7dQBPM0cQ1zHaea1bmgVmi3nq EuhGQsydsRW5KZHWOFxhZ10OwUQ6+7wKX3fBk47Duvn4TT+cdTrnEIrf5SEZ1IQ08qVz e2Lg== X-Gm-Message-State: AOJu0YzUGbBbh7cCFunX0JohCzC+ZvpzGIIaSJIzs8TfSjAcJdy8pduY XKTUNX+dpFrTccjoPv21mq1WD4ZwSY2r0NEwZGq0mSoFKMNctoY3yGoxZuNXYGxyB2CETI3oLpf 3lKk= X-Google-Smtp-Source: AGHT+IH1nMyauq7BZ10xW/ucwnVE26uT0awtibp2yzMwdMjS+nZyo1aGXoJgzl68kfpPw/9QjRy20w== X-Received: by 2002:a17:902:c20d:b0:1f2:f107:5a71 with SMTP id d9443c01a7336-1f31c9f4ddamr7674485ad.44.1716348655961; Tue, 21 May 2024 20:30:55 -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.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:55 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Ciara Loftus Subject: [PATCH v5 32/32] net/af_xdp:: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:59 -0700 Message-ID: <20240522033009.143100-33-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 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/af_xdp/rte_eth_af_xdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 6ba455bb9b..afaf358019 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c @@ -2096,7 +2096,7 @@ get_iface_info(const char *if_name, if (ioctl(sock, SIOCGIFHWADDR, &ifr)) goto error; - rte_memcpy(eth_addr, ifr.ifr_hwaddr.sa_data, RTE_ETHER_ADDR_LEN); + memcpy(eth_addr, ifr.ifr_hwaddr.sa_data, RTE_ETHER_ADDR_LEN); close(sock); return 0;