diff options
author | Damjan Marion <dmarion@me.com> | 2024-12-16 09:06:42 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2024-12-18 12:34:55 +0000 |
commit | 0cf4eef73a4c1bd2831a4618af50939a2aab01c6 (patch) | |
tree | 809caae588fa1e12556cb180bc4b253120627134 /src/vnet/crypto/engine.h | |
parent | 4358a18dea319b590da5b64e263439136bd8f806 (diff) |
crypto: move crypto engines outside of plugins
This is first step in process of making crypto engine binaries
less dependant on specific VPP version.
Type: improvement
Change-Id: Ib08135688be409049b660e2b2ac435578b63be65
Signed-off-by: Damjan Marion <dmarion@me.com>
Diffstat (limited to 'src/vnet/crypto/engine.h')
-rw-r--r-- | src/vnet/crypto/engine.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/vnet/crypto/engine.h b/src/vnet/crypto/engine.h new file mode 100644 index 00000000000..993befb393a --- /dev/null +++ b/src/vnet/crypto/engine.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: Apache-2.0 + * Copyright (c) 2024 Cisco Systems, Inc. + */ + +#ifndef included_vnet_crypto_engine_h +#define included_vnet_crypto_engine_h + +#ifndef included_clib_types_h +typedef unsigned int u32; +#endif + +typedef struct +{ + vnet_crypto_op_id_t opt; + vnet_crypto_ops_handler_t *fn; + vnet_crypto_chained_ops_handler_t *cfn; +} vnet_crypto_engine_op_handlers_t; + +struct vnet_crypto_engine_registration; + +typedef char *( + vnet_crypto_engine_init_fn_t) (struct vnet_crypto_engine_registration *); + +typedef struct vnet_crypto_engine_registration +{ + char name[32]; /* backend name */ + char desc[128]; /* backend name */ + int prio; + u32 version; + u32 per_thread_data_sz; + u32 num_threads; + void *per_thread_data; + vnet_crypto_engine_init_fn_t *init_fn; + vnet_crypto_key_handler_t *key_handler; + vnet_crypto_engine_op_handlers_t *op_handlers; +} vnet_crypto_engine_registration_t; + +#define VNET_CRYPTO_ENGINE_REGISTRATION() \ + __clib_export vnet_crypto_engine_registration_t __vnet_crypto_engine + +#endif |