DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Kusztal, ArkadiuszX" <arkadiuszx.kusztal@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"gakhil@marvell.com" <gakhil@marvell.com>,
	 "Dooley, Brian" <brian.dooley@intel.com>
Subject: RE: [PATCH v6 2/3] crypto/qat: add sm2 encryption/decryption function
Date: Thu, 31 Oct 2024 17:24:52 +0000	[thread overview]
Message-ID: <PH0PR11MB50137DB079ADE52294002D119F552@PH0PR11MB5013.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20241022174651.7cc003ff@hermes.local>



> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Wednesday, October 23, 2024 2:47 AM
> To: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Cc: dev@dpdk.org; gakhil@marvell.com; Dooley, Brian
> <brian.dooley@intel.com>
> Subject: Re: [PATCH v6 2/3] crypto/qat: add sm2 encryption/decryption function
> 
> 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.

This function is called by the crypto_dequeue_op_burst function and in some other cases (like RSA) there may be a 1024 bytes per copy operation.
If you think that a regular memcpy will do no worse there, I may change it.

  reply	other threads:[~2024-10-31 17:25 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
2024-10-31 17:24     ` Kusztal, ArkadiuszX [this message]
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=PH0PR11MB50137DB079ADE52294002D119F552@PH0PR11MB5013.namprd11.prod.outlook.com \
    --to=arkadiuszx.kusztal@intel.com \
    --cc=brian.dooley@intel.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=stephen@networkplumber.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).