From: "Morten Brørup" <mb@smartsharesystems.com>
To: "David Marchand" <david.marchand@redhat.com>
Cc: <dev@dpdk.org>, <thomas@monjalon.net>, <ferruh.yigit@amd.com>,
<stephen@networkplumber.org>, <mattias.ronnblom@ericsson.com>,
<stable@dpdk.org>, "Kai Ji" <kai.ji@intel.com>,
"Slawomir Mrozowicz" <slawomirx.mrozowicz@intel.com>,
"Tomasz Kulasek" <tomaszx.kulasek@intel.com>,
"Daniel Mrzyglod" <danielx.t.mrzyglod@intel.com>,
"Pablo de Lara" <pablo.de.lara.guarch@intel.com>,
"Michal Kobylinski" <michalx.kobylinski@intel.com>
Subject: RE: [PATCH 4/6] crypto/openssl: fix 3DES-CTR with big endian CPUs
Date: Thu, 24 Oct 2024 16:21:50 +0200 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F81B@smartserver.smartshare.dk> (raw)
In-Reply-To: <CAJFAV8zhmnpTadV--zjFTNW=0-zBvmwoMgG7abv61+yZu0ODxA@mail.gmail.com>
> From: David Marchand [mailto:david.marchand@redhat.com]
> Sent: Thursday, 24 October 2024 15.30
>
> On Thu, Oct 24, 2024 at 3:17 PM David Marchand
> <david.marchand@redhat.com> wrote:
> > @@ -1209,14 +1195,16 @@ process_openssl_cipher_des3ctr(struct
> rte_mbuf
> > *mbuf_src, uint8_t *dst,
> > l = rte_pktmbuf_data_len(m) - offset;
> >
> > memcpy(ctr, iv, 8);
> > + host_ctr = rte_be_64_to_cpu(ctr);
> >
> > for (n = 0; n < srclen; n++) {
> > if (n % 8 == 0) {
> > + ctr = rte_cpu_to_be_64(host_ctr);
>
> Moving this here adds one uneeded extra conversion on the first
> iteration.
> So I would keep the conversion around the host_ctr variable increment,
> if you get the idea.
>
>
> > if (EVP_EncryptUpdate(ctx,
> > (unsigned char *)&ebuf,
> &unused,
> > (const unsigned char *)&ctr,
> 8) <= 0)
> > goto process_cipher_des3ctr_err;
> > - ctr_inc(ctr);
> > + host_ctr++;
> > }
> > dst[n] = *(src++) ^ ebuf[n % 8];
>
> --
> David Marchand
LGTM.
For the next version,
Acked-by: Morten Brørup <mb@smartsharesystems.com>
next prev parent reply other threads:[~2024-10-24 14:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20241024120535.2722316-1-david.marchand@redhat.com>
2024-10-24 12:05 ` David Marchand
2024-10-24 12:54 ` Morten Brørup
2024-10-24 13:10 ` David Marchand
2024-10-24 13:17 ` David Marchand
2024-10-24 13:30 ` David Marchand
2024-10-24 14:21 ` Morten Brørup [this message]
[not found] ` <20241025070424.3916007-1-david.marchand@redhat.com>
2024-10-25 7:04 ` [PATCH v2 " David Marchand
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=98CBD80474FA8B44BF855DF32C47DC35E9F81B@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=danielx.t.mrzyglod@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=kai.ji@intel.com \
--cc=mattias.ronnblom@ericsson.com \
--cc=michalx.kobylinski@intel.com \
--cc=pablo.de.lara.guarch@intel.com \
--cc=slawomirx.mrozowicz@intel.com \
--cc=stable@dpdk.org \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
--cc=tomaszx.kulasek@intel.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 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).