aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dev_octeon/crypto.h
diff options
context:
space:
mode:
authorNithinsen Kaithakadan <nkaithakadan@marvell.com>2024-12-04 14:28:41 +0530
committerDamjan Marion <dmarion@0xa5.net>2025-01-21 13:00:26 +0000
commitd3df84523b69241af5d55983065326497e733344 (patch)
treeda5a17946724d61d37c74dee6878a676e523133e /src/plugins/dev_octeon/crypto.h
parent957ce524fb21d7267f712f7145977c75c3c55c33 (diff)
octeon: add direct mode changes in crypto datapath
This patch introduces support for direct mode crypto submission on CPT. For multi-segmented buffers, scatter-gather submission mode will be utilized. Type: feature Signed-off-by: Nithinsen Kaithakadan <nkaithakadan@marvell.com> Change-Id: Idb99e6c9ea49028e11d3bf530c9559719c988252
Diffstat (limited to 'src/plugins/dev_octeon/crypto.h')
-rw-r--r--src/plugins/dev_octeon/crypto.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/plugins/dev_octeon/crypto.h b/src/plugins/dev_octeon/crypto.h
index d7a501eb931..b003a605e0c 100644
--- a/src/plugins/dev_octeon/crypto.h
+++ b/src/plugins/dev_octeon/crypto.h
@@ -120,6 +120,17 @@ typedef struct
vnet_crypto_async_frame_t *frame;
/** Async frame element */
vnet_crypto_async_frame_elt_t *fe;
+ /** AAD meta data */
+ u8 aad[8];
+ /** IV meta data */
+ u8 iv[16];
+ /** Digest len */
+ u8 mac_len;
+ /** aead */
+ bool aead_algo;
+ /** Set when encrypting linked algo with esn.
+ * To move digest data */
+ bool esn_enabled;
/** Set if this is last element in frame */
bool last_elts;
/** Index of element in frame */
@@ -153,6 +164,13 @@ typedef struct
u8 started;
} oct_crypto_main_t;
+static_always_inline bool
+oct_hw_ctx_cache_enable (void)
+{
+ return roc_errata_cpt_hang_on_mixed_ctx_val () ||
+ roc_model_is_cn10ka_b0 () || roc_model_is_cn10kb_a0 ();
+}
+
extern oct_crypto_main_t oct_crypto_main;
void oct_crypto_key_del_handler (vlib_main_t *vm,