DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ashwin Sekhar T K <asekhar@marvell.com>
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
Date: Thu, 30 Jun 2022 21:11:23 +0530	[thread overview]
Message-ID: <20220630154123.2565439-1-asekhar@marvell.com> (raw)
In-Reply-To: <20220610162836.1828084-1-asekhar@marvell.com>

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(-)

diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_private.c b/drivers/crypto/ipsec_mb/ipsec_mb_private.c
index aab42c360c..b555a28a0b 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_private.c
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_private.c
@@ -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;
diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_private.h b/drivers/crypto/ipsec_mb/ipsec_mb_private.h
index e2c240dfc0..d0a1bcc360 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_private.h
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_private.h
@@ -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;
-- 
2.25.1


  parent reply	other threads:[~2022-06-30 15:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 16:28 [PATCH] crypto/openssl: support cmac operations Ashwin Sekhar T K
2022-06-17 10:11 ` Zhang, Roy Fan
2022-07-18  6:07   ` [PATCH v2 0/1] crypto/openssl: add aes cmac support Ashwin Sekhar T K
2022-07-18  6:07     ` [PATCH v2 1/1] crypto/openssl: support aes cmac operations Ashwin Sekhar T K
2022-07-18  9:12       ` [PATCH v3 0/1] crypto/openssl: add aes cmac support Ashwin Sekhar T K
2022-07-18  9:12         ` [PATCH v3 1/1] crypto/openssl: support aes cmac operations Ashwin Sekhar T K
2022-07-18  9:18           ` [PATCH v4 0/1] crypto/openssl: add aes cmac support Ashwin Sekhar T K
2022-07-18  9:18             ` [PATCH v4 1/1] crypto/openssl: support aes cmac operations Ashwin Sekhar T K
2022-07-18 16:25               ` [PATCH v5 0/1] crypto/openssl: add aes cmac support Ashwin Sekhar T K
2022-07-18 16:25                 ` [PATCH v5 1/1] crypto/openssl: support aes cmac operations Ashwin Sekhar T K
2022-07-18 16:54                   ` Ji, Kai
2022-08-26  8:52                     ` Akhil Goyal
2022-07-18 13:57             ` [PATCH v4 0/1] crypto/openssl: add aes cmac support Ji, Kai
2022-07-18 16:18               ` Ashwin Sekhar Thalakalath Kottilveetil
2022-06-30 15:41 ` Ashwin Sekhar T K [this message]
2022-07-04 14:47   ` [PATCH v2] crypto/ipsec_mb: enable support for arm64 Zhang, Roy Fan
2022-07-27  8:29   ` Ruifeng Wang
2022-07-27  8:48     ` Ashwin Sekhar Thalakalath Kottilveetil
2022-08-26  8:45     ` Akhil Goyal

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=20220630154123.2565439-1-asekhar@marvell.com \
    --to=asekhar@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=hkalra@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=pbhagavatula@marvell.com \
    --cc=psatheesh@marvell.com \
    --cc=roy.fan.zhang@intel.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@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 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).