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 DC1BA43C12; Fri, 1 Mar 2024 18:22:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 951D143490; Fri, 1 Mar 2024 18:18:15 +0100 (CET) Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by mails.dpdk.org (Postfix) with ESMTP id 4B52343413 for ; Fri, 1 Mar 2024 18:17:51 +0100 (CET) Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-6e5a50d91b4so1803897b3a.2 for ; Fri, 01 Mar 2024 09:17:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709313470; x=1709918270; 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=3Ha5aktoVzg4UdQ2h1vGwKjki2QRkC/K6acTbdFMhm6JiNHJFxOMX3IxKwcOqz6P/l tlwLzPa0e3LnJkPi9C8bgCCvcZoGC8ZRwlke2P5tRq3jPWUNT8dvh5TuOWTbmM/HGJnX Db1SMOTEaz9j8Do5rKV80z5044s31ivNueNVvJirVj+U/eY75gd70dT3TqkeyTRPA/Pz b2+0SWzVE40HubjOude3CiecvydtLmJc7xiXPUSkrn/MHKJsuHEoOnEv3a9tKaY4sj3Z Ng05ATnUxgIWiBItF5xHOKHtiD7/lbAPinASZTP7jyadWz59D74GMA52cPOOGqszbW32 tCDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709313470; x=1709918270; 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=IlZ/iLFk3QYVVzmhSa3h5EA/Q7gRfPBeON9eXYEj5dfZ14zJ/DvOQQkQZ9cWuYWM/N eDmhMrzt4yEepo9wGsCmH0JAP+kRPq3EooYDzYCtQwp1X5PRWgjbta8OMyy/z9+4p58T clN5nXxFHZ6+Y4nKtLjlf7Cj/L33GwI2ShV1HuBVf8XeiLAiF4HPBymqsxVDtcE+Wg31 Z9XeggiIns588K38kCoFZu3GCeXXGDgVOxw9AO2xeiRtRJcPK/fLhx0hWMvyYDpvduV+ c4kl+ajrx4cZd4Azf3k5RKpdsf6CVfJQYnrOre0gZfYnEzo8AnGCOBNYSNpkwOWDdCLS /nhQ== X-Gm-Message-State: AOJu0YxVTuSSJScX3HWvLzA0Orqawyw1hX8MHeFm7ToKi4gR6umbA4h3 +ox6yFMUZE+6r8mkKvfZh07yqqbcJeixwYhBKJeXal6XUquqG/MWU+Ju0BTKuV+PLD4RTb7/cVd ly8lmww== X-Google-Smtp-Source: AGHT+IFowmhBWuMhDyoXN6M4PQg4P9kdpoBOwLqZXA6/vJEHykzUPvelUaxqelWroPGWsCoKZIflJw== X-Received: by 2002:a05:6a20:3c8d:b0:19e:3a94:6309 with SMTP id b13-20020a056a203c8d00b0019e3a946309mr2611281pzj.5.1709313470510; Fri, 01 Mar 2024 09:17:50 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id j14-20020a170902da8e00b001dc8d6a9d40sm3695764plx.144.2024.03.01.09.17.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:17:50 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Kai Ji Subject: [PATCH v2 43/71] crypto/scheduler: replace use of fixed size rte_memcpy Date: Fri, 1 Mar 2024 09:15:39 -0800 Message-ID: <20240301171707.95242-44-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240301171707.95242-1-stephen@networkplumber.org> References: <20240229225936.483472-1-stephen@networkplumber.org> <20240301171707.95242-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- drivers/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