From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6BD8D43BAE; Fri, 1 Mar 2024 00:05:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 92EA5433AB; Fri, 1 Mar 2024 00:01:30 +0100 (CET) Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by mails.dpdk.org (Postfix) with ESMTP id 6BBAE42FE9 for ; Fri, 1 Mar 2024 00:00:37 +0100 (CET) Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-5c6bd3100fcso1133012a12.3 for ; Thu, 29 Feb 2024 15:00:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709247636; x=1709852436; 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=kr1WKZncDCsMZXScbKAM4rAgqfeNUJlqgLjmJ+Cu/Xo=; b=WMNdEvKHn2+8jJ8ohjDry/KzJdXS2+yMJJD7Zqv0LflFtD9HE1J9wmMBlIUL1wrq3D tzJjkAKgxdA9KYDN1KUSkWnoutlT1q33yHUuBD8Z0SngTzz/0/8Xzp+ncw1F+r1Ih24e VV85KFxwY3Dw7MyEIzp9tE7mamjx2gKMXp4jvapJ+IvcY4PXihWF1E3d9gJ3QKxATAE7 TSel4/YKpgkVrKU7iNw8XR9/ByJr+PsBcwHbvme1qMljrCEAisiJFIiNmOSSTM9LRQ1w wPjG6FdU7h9C1kby0IjrxXzZ3C4F6lOFuhm5STAKxExzrN5kvZHxMbjjwBEGDQwAcUUK hj3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709247636; x=1709852436; 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=kr1WKZncDCsMZXScbKAM4rAgqfeNUJlqgLjmJ+Cu/Xo=; b=DFy1WP+kkTkamN2vggmIo+vcL6dASQW3svGdSoQUMrv1eRmc3tMTIX9Ryp4sGp0o37 3Pjj3ki8RybjC376fhUsYsoYjW5sHwo1vybl94WUaZpuUvkylTMaPRLmtPcy1zU0ObQR k07z6LAnYLwh1cetAvQwflIC592+yn99WE4yMLFNNR2ph2RSJShNFIlylqmBrFHTQQeL tsmWlZ002QKLoELVig2HkQ5VZ9Fh/H4vyvYpRwNo9BlZpvi057qa+QFxrtQt3hg0+G1/ 0nUFNouR1u7IyFHcyuWFBBN3EzFRkDFuc9dwsZsewxl4mb9M1gArmjpAG/2Wudlx2AX/ 4ZLQ== X-Gm-Message-State: AOJu0Ywg6ZKzPZQcnOWTC340b29C+hUjDOj+S/bUcnafsy1UXPe7sA0c 1gX1IKeXg146HfSp9eyN7KcJcVk8coz649hEw2/cBbDwIOqPPQ25Dg7KWtE/Wso61itQadIrmvw 3 X-Google-Smtp-Source: AGHT+IEWtXmIchbOi9W8rq6F3udTnNyhFq09+i3+tel5mj9DwmNMWSpzGajZGN3t78EpWafdF0RbpQ== X-Received: by 2002:a17:90a:4d8f:b0:29b:2268:3349 with SMTP id m15-20020a17090a4d8f00b0029b22683349mr38531pjh.18.1709247636477; Thu, 29 Feb 2024 15:00:36 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id l22-20020a17090b079600b0029a8e5355fcsm1965578pjz.53.2024.02.29.15.00.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 15:00:36 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Kai Ji Subject: [PATCH 43/71] crypto/scheduler: replace use of fixed size rte_memcpy Date: Thu, 29 Feb 2024 14:58:30 -0800 Message-ID: <20240229225936.483472-44-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240229225936.483472-1-stephen@networkplumber.org> References: <20240229225936.483472-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- drivers/crypto/scheduler/rte_cryptodev_scheduler.c | 6 +++--- drivers/crypto/scheduler/scheduler_failover.c | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c index 9a21edd32a9c..ed1833a7c61d 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 52ff2ffbb7f6..e7c6d19d25b8 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; -- 2.43.0