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 6F53745BA6; Wed, 23 Oct 2024 02:46:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2FADD40272; Wed, 23 Oct 2024 02:46:56 +0200 (CEST) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mails.dpdk.org (Postfix) with ESMTP id 8E17540151 for ; Wed, 23 Oct 2024 02:46:54 +0200 (CEST) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-71e5a1c9071so4457875b3a.0 for ; Tue, 22 Oct 2024 17:46:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1729644414; x=1730249214; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=JlvrwhKNsIwUW1juwfip7UvYVyxna3HExjjaZZvm5e0=; b=lGCaxJSOyeSjkqkG/qWq3D7mtwYWHduGbvC4aufj5C6hDER6TcL35T+wgBLMbiMsiU K4HkICgEckeflXKRB/PEugC/k9FZL5DA9k5/w2tg0nIcHkLABN5VGYNMwhnFCgkd2CWw bs4j3TIxrDRx0uGphmdxU8+pCfK/YkSFlzIfRrF9RHkrZcIzb9xFI19fFCEhNDqu9bUY d4U0R11zdnTZg9ZsF3snTFr5yz0gE7DIRUjsOregwIUwR4YFplE0IEgI5E09uqixzYwI yt32z930hl0RZwpFd3YwQjV3yrIo61xoZvvnurpaABxkTHrM6YKuEZRt1gAQqgpo1FGV 2zGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729644414; x=1730249214; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JlvrwhKNsIwUW1juwfip7UvYVyxna3HExjjaZZvm5e0=; b=X/soadTYpCc/3wIk1wuVbQ1vUsRKUDjWnx8mxoGQMgoc0as4J3YaYeYFbRgMhhUzP+ KKJmA9GXaCl/bpiXRJzL0qcW3s12UQxjRDX8fEhaNJ4g/EEVSwARThyg+Npkc0tt6hhN 2LweT3NmfvwfLm/5vI9Jbja6maSIkjMizw7tiyO6Hkj5EaMjIOyCXTVDlve/buSgVJ7F Ug89Zu0I/B4jO2BGl1dHiaCEHZBIebbTGK7e5AhXAixRoavlsaDrowfLBhTZpEWEhl+Z hse5m829EStX2d6ozgvh6cpLGj+/+hRA2qFK0QA7SZv2bUOBIhb+dnjBNQRd28B+L3ga stoQ== X-Gm-Message-State: AOJu0YwQJJ4tNjDCAeyt89ihY7ROGoq6f7YDQryAh6ZurWYMlmgfg0gO 8RNfmgAWnXRFt+3f0jHaiH+wTb8GXBv7yv8vGdKU74YFYwqZ6vHIwBbnWN7t7Eo= X-Google-Smtp-Source: AGHT+IHJdyiMWHTRSZnslcRkUIheuOtqIcgGStTzkfzAr+hXJZXJozJz3a6nZ5+W0X57t12RhTicWA== X-Received: by 2002:aa7:888e:0:b0:71e:6489:d06 with SMTP id d2e1a72fcca58-7203088ba84mr1926945b3a.0.1729644413710; Tue, 22 Oct 2024 17:46:53 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71ec13ea0e8sm5469000b3a.145.2024.10.22.17.46.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 17:46:53 -0700 (PDT) Date: Tue, 22 Oct 2024 17:46:51 -0700 From: Stephen Hemminger To: Arkadiusz Kusztal Cc: dev@dpdk.org, gakhil@marvell.com, brian.dooley@intel.com Subject: Re: [PATCH v6 2/3] crypto/qat: add sm2 encryption/decryption function Message-ID: <20241022174651.7cc003ff@hermes.local> In-Reply-To: <20241022190600.81169-3-arkadiuszx.kusztal@intel.com> References: <20241022190600.81169-1-arkadiuszx.kusztal@intel.com> <20241022190600.81169-3-arkadiuszx.kusztal@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Tue, 22 Oct 2024 20:05:59 +0100 Arkadiusz Kusztal wrote: > + uint32_t alg_bytesize = cookie->alg_bytesize; > + > + rte_memcpy(asym_op->sm2.c1.x.data, cookie->output_array[0], alg_bytesize); > + rte_memcpy(asym_op->sm2.c1.y.data, cookie->output_array[1], alg_bytesize); > + rte_memcpy(asym_op->sm2.kp.x.data, cookie->output_array[2], alg_bytesize); > + rte_memcpy(asym_op->sm2.kp.y.data, cookie->output_array[3], alg_bytesize); Since the copy is small and not in the fast path, there is no reason to use rte_memcpy(). The memcpy() function is as fast inlines and has more checking from gcc, coverity, ASAN so it is preferred.