[PATCH v4] crypto/ipsec_mb: unified IPsec MB interface
Akhil Goyal
gakhil at marvell.com
Thu Feb 29 17:32:21 CET 2024
> Hi folks,
>
> The introduction of a more unified IPsec MB library for DPDK is causing the
> snow3g tests to fail on ARM. Artifact here:
> https://lab.dpdk.org/results/dashboard/patchsets/29315/
> PMDs using the direct API (KASUMI, CHACHA, ZUC, SNOW3G) will use the job API,
> from the AESNI MB PMD code.
> We have come across a similar issue in the past that related to an offset issue as
> SNOW3G uses bits instead of bytes.
The above link does not seem to be working.
I believe from now on, since we continue to maintain two separate repos,
it would be better to get ack from ARM folks as well
before merging anything onto crypto/ipsec_mb PMD.
Arm folks, Could you please get the below change tested/incorporated in the repo.
>
> commit a501609ea6466ed8526c0dfadedee332a4d4a451
> Author: Pablo de Lara pablo.de.lara.guarch at intel.com
> Date: Wed Feb 23 16:01:16 2022 +0000
>
> crypto/ipsec_mb: fix length and offset settings
>
> KASUMI, SNOW3G and ZUC require lengths and offsets to
> be set in bits or bytes depending on the algorithm.
> There were some algorithms that were mixing these two,
> so this commit is fixing this issue.
>
> This bug only appeared recently when the ARM ipsec version was bumped to 1.4.
> It appears there could be a similar scenario happening now and this is a potential
> fix that needs to be made in the ARM IPsec-mb repo:
>
> diff --git a/lib/aarch64/mb_mgr_snow3g_submit_flush_common_aarch64.h
> b/lib/aarch64/mb_mgr_snow3g_submit_flush_common_aarch64.h
> index 13bca11b..de284ade 100644
> --- a/lib/aarch64/mb_mgr_snow3g_submit_flush_common_aarch64.h
> +++ b/lib/aarch64/mb_mgr_snow3g_submit_flush_common_aarch64.h
> @@ -94,8 +94,8 @@ static void
> snow3g_mb_mgr_insert_uea2_job(MB_MGR_SNOW3G_OOO *state, IMB_JOB
> *job
> state->num_lanes_inuse++;
> state->args.iv[used_lane_idx] = job->iv;
> state->args.keys[used_lane_idx] = job->enc_keys;
> - state->args.in[used_lane_idx] = job->src + job-
> >cipher_start_src_offset_in_bytes;
> - state->args.out[used_lane_idx] = job->dst;
> + state->args.in[used_lane_idx] = job->src + (job-
> >cipher_start_src_offset_in_bits / 8);
> + state->args.out[used_lane_idx] = job->dst + (job-
> >cipher_start_src_offset_in_bits / 8);
> state->args.byte_length[used_lane_idx] = job->msg_len_to_cipher_in_bits / 8;
> state->args.INITIALIZED[used_lane_idx] = 0;
> state->lens[used_lane_idx] = job->msg_len_to_cipher_in_bits / 8;
>
> Thanks,
> Brian
>
> > -----Original Message-----
> > From: Dooley, Brian <brian.dooley at intel.com>
> > Sent: Wednesday, February 28, 2024 11:33 AM
> > To: Ji, Kai <kai.ji at intel.com>; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch at intel.com>
> > Cc: dev at dpdk.org; gakhil at marvell.com; Dooley, Brian
> > <brian.dooley at intel.com>
> > Subject: [PATCH v4] crypto/ipsec_mb: unified IPsec MB interface
> >
> > Currently IPsec MB provides both the JOB API and direct API.
> > AESNI_MB PMD is using the JOB API codepath while ZUC, KASUMI, SNOW3G
> > and CHACHA20_POLY1305 are using the direct API.
> > Instead of using the direct API for these PMDs, they should now make
> > use of the JOB API codepath. This would remove all use of the IPsec MB
> > direct API for these PMDs.
> >
> > Signed-off-by: Brian Dooley <brian.dooley at intel.com>
> > ---
> > v2:
> > - Fix compilation failure
> > v3:
> > - Remove session configure pointer for each PMD
> > v4:
> > - Keep AES GCM PMD and fix extern issue
> > ---
> > doc/guides/rel_notes/release_24_03.rst | 6 +
> > drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 10 +-
> > drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h | 15 +-
> > drivers/crypto/ipsec_mb/pmd_chacha_poly.c | 338 +----------
> > .../crypto/ipsec_mb/pmd_chacha_poly_priv.h | 28 -
> > drivers/crypto/ipsec_mb/pmd_kasumi.c | 410 +------------
> > drivers/crypto/ipsec_mb/pmd_kasumi_priv.h | 20 -
> > drivers/crypto/ipsec_mb/pmd_snow3g.c | 543 +-----------------
> > drivers/crypto/ipsec_mb/pmd_snow3g_priv.h | 21 -
> > drivers/crypto/ipsec_mb/pmd_zuc.c | 347 +----------
> > drivers/crypto/ipsec_mb/pmd_zuc_priv.h | 20 -
> > 11 files changed, 48 insertions(+), 1710 deletions(-)
> >
> <snip>
More information about the dev
mailing list