FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
main.c File Reference
+ Include dependency graph for main.c:

Go to the source code of this file.

Data Structures

struct  openssl_per_thread_data_t
 

Macros

#define foreach_openssl_aes_evp_op
 
#define foreach_openssl_chacha20_evp_op   _ (chacha20_poly1305, CHACHA20_POLY1305, EVP_chacha20_poly1305, 8)
 
#define foreach_openssl_evp_op
 
#define foreach_openssl_hash_op
 
#define foreach_openssl_hmac_op
 

Functions

static_always_inline u32 openssl_ops_enc_cbc (vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops, const EVP_CIPHER *cipher, const int iv_len)
 
static_always_inline u32 openssl_ops_dec_cbc (vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops, const EVP_CIPHER *cipher, const int iv_len)
 
static_always_inline u32 openssl_ops_enc_aead (vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops, const EVP_CIPHER *cipher, int is_gcm, const int iv_len)
 
static_always_inline u32 openssl_ops_enc_gcm (vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops, const EVP_CIPHER *cipher, const int iv_len)
 
static_always_inline __clib_unused u32 openssl_ops_enc_chacha20_poly1305 (vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops, const EVP_CIPHER *cipher, const int iv_len)
 
static_always_inline u32 openssl_ops_dec_aead (vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops, const EVP_CIPHER *cipher, int is_gcm, const int iv_len)
 
static_always_inline u32 openssl_ops_dec_gcm (vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops, const EVP_CIPHER *cipher, const int iv_len)
 
static_always_inline __clib_unused u32 openssl_ops_dec_chacha20_poly1305 (vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops, const EVP_CIPHER *cipher, const int iv_len)
 
static_always_inline u32 openssl_ops_hash (vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops, const EVP_MD *md)
 
static_always_inline u32 openssl_ops_hmac (vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops, const EVP_MD *md)
 
clib_error_tcrypto_openssl_init (vlib_main_t *vm)
 
 VLIB_PLUGIN_REGISTER ()
 

Variables

static openssl_per_thread_data_tper_thread_data = 0
 
 foreach_openssl_evp_op
 
 foreach_openssl_hash_op
 
 foreach_openssl_hmac_op
 

Macro Definition Documentation

◆ foreach_openssl_aes_evp_op

#define foreach_openssl_aes_evp_op
Value:
_ (cbc, DES_CBC, EVP_des_cbc, 8) \
_ (cbc, 3DES_CBC, EVP_des_ede3_cbc, 8) \
_ (cbc, AES_128_CBC, EVP_aes_128_cbc, 16) \
_ (cbc, AES_192_CBC, EVP_aes_192_cbc, 16) \
_ (cbc, AES_256_CBC, EVP_aes_256_cbc, 16) \
_ (gcm, AES_128_GCM, EVP_aes_128_gcm, 8) \
_ (gcm, AES_192_GCM, EVP_aes_192_gcm, 8) \
_ (gcm, AES_256_GCM, EVP_aes_256_gcm, 8) \
_ (cbc, AES_128_CTR, EVP_aes_128_ctr, 8) \
_ (cbc, AES_192_CTR, EVP_aes_192_ctr, 8) \
_ (cbc, AES_256_CTR, EVP_aes_256_ctr, 8)

Definition at line 41 of file main.c.

◆ foreach_openssl_chacha20_evp_op

#define foreach_openssl_chacha20_evp_op   _ (chacha20_poly1305, CHACHA20_POLY1305, EVP_chacha20_poly1305, 8)

Definition at line 54 of file main.c.

◆ foreach_openssl_evp_op

#define foreach_openssl_evp_op
Value:
foreach_openssl_aes_evp_op \
foreach_openssl_chacha20_evp_op

Definition at line 58 of file main.c.

◆ foreach_openssl_hash_op

#define foreach_openssl_hash_op
Value:
_ (SHA1, EVP_sha1) \
_ (SHA224, EVP_sha224) \
_ (SHA256, EVP_sha256) \
_ (SHA384, EVP_sha384) \
_ (SHA512, EVP_sha512)

Definition at line 72 of file main.c.

◆ foreach_openssl_hmac_op

#define foreach_openssl_hmac_op
Value:
_(MD5, EVP_md5) \
_(SHA1, EVP_sha1) \
_(SHA224, EVP_sha224) \
_(SHA256, EVP_sha256) \
_(SHA384, EVP_sha384) \
_(SHA512, EVP_sha512)

Definition at line 79 of file main.c.

Function Documentation

◆ crypto_openssl_init()

clib_error_t* crypto_openssl_init ( vlib_main_t vm)

Definition at line 473 of file main.c.

+ Here is the call graph for this function:

◆ openssl_ops_dec_aead()

static_always_inline u32 openssl_ops_dec_aead ( vlib_main_t vm,
vnet_crypto_op_t ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops,
const EVP_CIPHER *  cipher,
int  is_gcm,
const int  iv_len 
)

Definition at line 268 of file main.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ openssl_ops_dec_cbc()

static_always_inline u32 openssl_ops_dec_cbc ( vlib_main_t vm,
vnet_crypto_op_t ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops,
const EVP_CIPHER *  cipher,
const int  iv_len 
)

Definition at line 149 of file main.c.

+ Here is the call graph for this function:

◆ openssl_ops_dec_chacha20_poly1305()

static_always_inline __clib_unused u32 openssl_ops_dec_chacha20_poly1305 ( vlib_main_t vm,
vnet_crypto_op_t ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops,
const EVP_CIPHER *  cipher,
const int  iv_len 
)

Definition at line 323 of file main.c.

+ Here is the call graph for this function:

◆ openssl_ops_dec_gcm()

static_always_inline u32 openssl_ops_dec_gcm ( vlib_main_t vm,
vnet_crypto_op_t ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops,
const EVP_CIPHER *  cipher,
const int  iv_len 
)

Definition at line 314 of file main.c.

+ Here is the call graph for this function:

◆ openssl_ops_enc_aead()

static_always_inline u32 openssl_ops_enc_aead ( vlib_main_t vm,
vnet_crypto_op_t ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops,
const EVP_CIPHER *  cipher,
int  is_gcm,
const int  iv_len 
)

Definition at line 207 of file main.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ openssl_ops_enc_cbc()

static_always_inline u32 openssl_ops_enc_cbc ( vlib_main_t vm,
vnet_crypto_op_t ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops,
const EVP_CIPHER *  cipher,
const int  iv_len 
)

Definition at line 88 of file main.c.

+ Here is the call graph for this function:

◆ openssl_ops_enc_chacha20_poly1305()

static_always_inline __clib_unused u32 openssl_ops_enc_chacha20_poly1305 ( vlib_main_t vm,
vnet_crypto_op_t ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops,
const EVP_CIPHER *  cipher,
const int  iv_len 
)

Definition at line 259 of file main.c.

+ Here is the call graph for this function:

◆ openssl_ops_enc_gcm()

static_always_inline u32 openssl_ops_enc_gcm ( vlib_main_t vm,
vnet_crypto_op_t ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops,
const EVP_CIPHER *  cipher,
const int  iv_len 
)

Definition at line 250 of file main.c.

+ Here is the call graph for this function:

◆ openssl_ops_hash()

static_always_inline u32 openssl_ops_hash ( vlib_main_t vm,
vnet_crypto_op_t ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops,
const EVP_MD *  md 
)

Definition at line 332 of file main.c.

◆ openssl_ops_hmac()

static_always_inline u32 openssl_ops_hmac ( vlib_main_t vm,
vnet_crypto_op_t ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops,
const EVP_MD *  md 
)

Definition at line 366 of file main.c.

+ Here is the call graph for this function:

◆ VLIB_PLUGIN_REGISTER()

VLIB_PLUGIN_REGISTER ( )

Variable Documentation

◆ foreach_openssl_evp_op

foreach_openssl_evp_op

Definition at line 440 of file main.c.

◆ foreach_openssl_hash_op

foreach_openssl_hash_op

Definition at line 456 of file main.c.

◆ foreach_openssl_hmac_op

foreach_openssl_hmac_op

Definition at line 468 of file main.c.

◆ per_thread_data

Definition at line 39 of file main.c.