All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Cc: dev@dpdk.org, gakhil@marvell.com, brian.dooley@intel.com
Subject: Re: [PATCH v6 2/3] crypto/qat: add sm2 encryption/decryption function
Date: Tue, 22 Oct 2024 17:46:51 -0700	[thread overview]
Message-ID: <20241022174651.7cc003ff@hermes.local> (raw)
In-Reply-To: <20241022190600.81169-3-arkadiuszx.kusztal@intel.com>

On Tue, 22 Oct 2024 20:05:59 +0100
Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com> 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.

  reply	other threads:[~2024-10-23  0:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22 19:05 [PATCH v6 0/3] add ec points to sm2 op Arkadiusz Kusztal
2024-10-22 19:05 ` [PATCH v6 1/3] cryptodev: " Arkadiusz Kusztal
2024-10-22 19:05 ` [PATCH v6 2/3] crypto/qat: add sm2 encryption/decryption function Arkadiusz Kusztal
2024-10-23  0:46   ` Stephen Hemminger [this message]
2024-10-31 17:24     ` Kusztal, ArkadiuszX
2024-10-23  7:55   ` [EXTERNAL] " Akhil Goyal
2024-10-22 19:06 ` [PATCH v6 3/3] app/test: add test sm2 C1/Kp test cases Arkadiusz Kusztal
2024-10-23  1:19 ` [PATCH v6 0/3] add ec points to sm2 op Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241022174651.7cc003ff@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=arkadiuszx.kusztal@intel.com \
    --cc=brian.dooley@intel.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.