[v2] crypto/ipsec_mb: enable support for arm64
Checks
Commit Message
Enable support for arm64 architecture in ipsec_mb. x86
specific code is conditionally compiled only for x86
architecture builds. Other architectures will be unsupported.
Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
---
drivers/crypto/ipsec_mb/ipsec_mb_private.c | 7 +++++++
drivers/crypto/ipsec_mb/ipsec_mb_private.h | 3 ++-
2 files changed, 9 insertions(+), 1 deletion(-)
Comments
> -----Original Message-----
> From: Ashwin Sekhar T K <asekhar@marvell.com>
> Sent: Thursday, June 30, 2022 4:41 PM
> To: dev@dpdk.org; Zhang, Roy Fan <roy.fan.zhang@intel.com>; De Lara Guarch,
> Pablo <pablo.de.lara.guarch@intel.com>
> Cc: jerinj@marvell.com; skori@marvell.com; skoteshwar@marvell.com;
> pbhagavatula@marvell.com; kirankumark@marvell.com;
> psatheesh@marvell.com; asekhar@marvell.com; anoobj@marvell.com;
> gakhil@marvell.com; hkalra@marvell.com; ndabilpuram@marvell.com
> Subject: [PATCH v2] crypto/ipsec_mb: enable support for arm64
>
> Enable support for arm64 architecture in ipsec_mb. x86
> specific code is conditionally compiled only for x86
> architecture builds. Other architectures will be unsupported.
>
> Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
> ---
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
> -----Original Message-----
> From: Ashwin Sekhar T K <asekhar@marvell.com>
> Sent: Thursday, June 30, 2022 11:41 PM
> To: dev@dpdk.org; Fan Zhang <roy.fan.zhang@intel.com>; Pablo de Lara
> <pablo.de.lara.guarch@intel.com>
> Cc: jerinj@marvell.com; skori@marvell.com; skoteshwar@marvell.com;
> pbhagavatula@marvell.com; kirankumark@marvell.com;
> psatheesh@marvell.com; asekhar@marvell.com; anoobj@marvell.com;
> gakhil@marvell.com; hkalra@marvell.com; ndabilpuram@marvell.com
> Subject: [PATCH v2] crypto/ipsec_mb: enable support for arm64
Code change looks good to me.
Arm64 support is not fully enabled with this patch alone.
There is a patch to fix the remaining:
http://patches.dpdk.org/project/dpdk/patch/20220727081352.1333695-3-ruifeng.wang@arm.com/
Appreciate it if you can review that one.
Thanks.
>
> Enable support for arm64 architecture in ipsec_mb. x86 specific code is
> conditionally compiled only for x86 architecture builds. Other architectures
> will be unsupported.
>
> Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
> ---
> drivers/crypto/ipsec_mb/ipsec_mb_private.c | 7 +++++++
> drivers/crypto/ipsec_mb/ipsec_mb_private.h | 3 ++-
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
<snip>
Hi Ruifeng,
Thanks for this. Initially, I had made a local hack to my IPSEC MB build script which was creating intel-ipsec-mb.h as a softlink to ipsec-mb.h .
Later I forgot to remove this hack. So I didn't catch this.
Regards,
Ashwin Sekhar T K
> -----Original Message-----
> From: Ruifeng Wang <Ruifeng.Wang@arm.com>
> Sent: Wednesday, July 27, 2022 1:59 PM
> To: Ashwin Sekhar Thalakalath Kottilveetil <asekhar@marvell.com>;
> dev@dpdk.org; Fan Zhang <roy.fan.zhang@intel.com>; Pablo de Lara
> <pablo.de.lara.guarch@intel.com>
> Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Sunil Kumar Kori
> <skori@marvell.com>; Satha Koteswara Rao Kottidi
> <skoteshwar@marvell.com>; Pavan Nikhilesh Bhagavatula
> <pbhagavatula@marvell.com>; Kiran Kumar Kokkilagadda
> <kirankumark@marvell.com>; Satheesh Paul Antonysamy
> <psatheesh@marvell.com>; Anoob Joseph <anoobj@marvell.com>; Akhil
> Goyal <gakhil@marvell.com>; Harman Kalra <hkalra@marvell.com>; Nithin
> Kumar Dabilpuram <ndabilpuram@marvell.com>; nd <nd@arm.com>
> Subject: [EXT] RE: [PATCH v2] crypto/ipsec_mb: enable support for arm64
>
> External Email
>
> ----------------------------------------------------------------------
> > -----Original Message-----
> > From: Ashwin Sekhar T K <asekhar@marvell.com>
> > Sent: Thursday, June 30, 2022 11:41 PM
> > To: dev@dpdk.org; Fan Zhang <roy.fan.zhang@intel.com>; Pablo de Lara
> > <pablo.de.lara.guarch@intel.com>
> > Cc: jerinj@marvell.com; skori@marvell.com; skoteshwar@marvell.com;
> > pbhagavatula@marvell.com; kirankumark@marvell.com;
> > psatheesh@marvell.com; asekhar@marvell.com; anoobj@marvell.com;
> > gakhil@marvell.com; hkalra@marvell.com; ndabilpuram@marvell.com
> > Subject: [PATCH v2] crypto/ipsec_mb: enable support for arm64
>
> Code change looks good to me.
> Arm64 support is not fully enabled with this patch alone.
> There is a patch to fix the remaining:
> https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__patches.dpdk.org_project_dpdk_patch_20220727081352.1333695-2D3-
> 2Druifeng.wang-
> 40arm.com_&d=DwIFAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=pYk-QOhvnkU-
> _75y0NKSn535ZotEGI_E69Py3Ppondk&m=nIGG87_fioLU92q775kMzq4KXXGT
> 5MnFSBch7NESxGBy-cjDWvDRIxpVc-
> 1bktjm&s=cMiUUrOKfZfSMCLVfjm77R8K0aIB6lhpWhmNh_o0SGM&e=
> Appreciate it if you can review that one.
>
> Thanks.
> >
> > Enable support for arm64 architecture in ipsec_mb. x86 specific code
> > is conditionally compiled only for x86 architecture builds. Other
> > architectures will be unsupported.
> >
> > Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
> > ---
> > drivers/crypto/ipsec_mb/ipsec_mb_private.c | 7 +++++++
> > drivers/crypto/ipsec_mb/ipsec_mb_private.h | 3 ++-
> > 2 files changed, 9 insertions(+), 1 deletion(-)
> >
>
> <snip>
> > Subject: [PATCH v2] crypto/ipsec_mb: enable support for arm64
>
> Code change looks good to me.
> Arm64 support is not fully enabled with this patch alone.
> There is a patch to fix the remaining:
> http://patches.dpdk.org/project/dpdk/patch/20220727081352.1333695-3-ruifeng.wang@arm.com/
> Appreciate it if you can review that one.
>
> Thanks.
> >
> > Enable support for arm64 architecture in ipsec_mb. x86 specific code is
> > conditionally compiled only for x86 architecture builds. Other architectures
> > will be unsupported.
> >
> > Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Applied to dpdk-next-crypto
Above patchset from Ruifeng is also merged.
Thanks.
@@ -53,6 +53,9 @@ ipsec_mb_create(struct rte_vdev_device *vdev,
const char *name, *args;
int retval;
+#if defined(RTE_ARCH_ARM64)
+ vector_mode = IPSEC_MB_ARM64;
+#elif defined(RTE_ARCH_X86_64)
if (vector_mode == IPSEC_MB_NOT_SUPPORTED) {
/* Check CPU for supported vector instruction set */
if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F))
@@ -64,6 +67,10 @@ ipsec_mb_create(struct rte_vdev_device *vdev,
else
vector_mode = IPSEC_MB_SSE;
}
+#else
+ /* Unsupported architecture */
+ return -ENOTSUP;
+#endif
init_params.private_data_size = sizeof(struct ipsec_mb_dev_private) +
pmd_data->internals_priv_size;
@@ -26,7 +26,8 @@ enum ipsec_mb_vector_mode {
IPSEC_MB_SSE,
IPSEC_MB_AVX,
IPSEC_MB_AVX2,
- IPSEC_MB_AVX512
+ IPSEC_MB_AVX512,
+ IPSEC_MB_ARM64,
};
extern enum ipsec_mb_vector_mode vector_mode;