FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
ipsecmb.c File Reference
+ Include dependency graph for ipsecmb.c:

Go to the source code of this file.

Data Structures

struct  ipsecmb_per_thread_data_t
 
struct  ipsecmb_alg_data_t
 
struct  ipsecmb_main_t_
 
struct  ipsecmb_aes_cbc_key_data_t
 

Macros

#define HMAC_MAX_BLOCK_SIZE   SHA_512_BLOCK_SIZE
 
#define EXPANDED_KEY_N_BYTES   (16 * 15)
 
#define foreach_ipsecmb_hmac_op
 
#define foreach_ipsecmb_cbc_cipher_op
 
#define foreach_ipsecmb_gcm_cipher_op
 

Typedefs

typedef struct ipsecmb_main_t_ ipsecmb_main_t
 

Functions

static void ipsecmb_retire_hmac_job (JOB_AES_HMAC *job, u32 *n_fail, u32 digest_size)
 
static_always_inline u32 ipsecmb_ops_hmac_inline (vlib_main_t *vm, vnet_crypto_op_t *ops[], u32 n_ops, u32 block_size, u32 hash_size, u32 digest_size, JOB_HASH_ALG alg)
 
static void ipsecmb_retire_cipher_job (JOB_AES_HMAC *job, u32 *n_fail)
 
static_always_inline u32 ipsecmb_ops_cbc_cipher_inline (vlib_main_t *vm, vnet_crypto_op_t *ops[], u32 n_ops, u32 key_len, JOB_CIPHER_DIRECTION direction)
 
static void ipsecmb_retire_gcm_cipher_job (JOB_AES_HMAC *job, u32 *n_fail, JOB_CIPHER_DIRECTION direction)
 
static_always_inline u32 ipsecmb_ops_gcm_cipher_inline (vlib_main_t *vm, vnet_crypto_op_t *ops[], u32 n_ops, u32 key_len, JOB_CIPHER_DIRECTION direction)
 
clib_error_tcrypto_ipsecmb_iv_init (ipsecmb_main_t *imbm)
 
static void crypto_ipsecmb_key_handler (vlib_main_t *vm, vnet_crypto_key_op_t kop, vnet_crypto_key_index_t idx)
 
static clib_error_tcrypto_ipsecmb_init (vlib_main_t *vm)
 
 VLIB_PLUGIN_REGISTER ()
 

Variables

static ipsecmb_main_t ipsecmb_main = { }
 
 foreach_ipsecmb_hmac_op
 
 foreach_ipsecmb_cbc_cipher_op
 
 foreach_ipsecmb_gcm_cipher_op
 

Macro Definition Documentation

◆ EXPANDED_KEY_N_BYTES

#define EXPANDED_KEY_N_BYTES   (16 * 15)

Definition at line 29 of file ipsecmb.c.

◆ foreach_ipsecmb_cbc_cipher_op

#define foreach_ipsecmb_cbc_cipher_op
Value:
_(AES_128_CBC, 128) \
_(AES_192_CBC, 192) \
_(AES_256_CBC, 256)

Definition at line 75 of file ipsecmb.c.

◆ foreach_ipsecmb_gcm_cipher_op

#define foreach_ipsecmb_gcm_cipher_op
Value:
_(AES_128_GCM, 128) \
_(AES_192_GCM, 192) \
_(AES_256_GCM, 256)

Definition at line 83 of file ipsecmb.c.

◆ foreach_ipsecmb_hmac_op

#define foreach_ipsecmb_hmac_op
Value:
_(SHA1, SHA1, sha1, 64, 20, 20) \
_(SHA224, SHA_224, sha224, 64, 32, 28) \
_(SHA256, SHA_256, sha256, 64, 32, 32) \
_(SHA384, SHA_384, sha384, 128, 64, 48) \
_(SHA512, SHA_512, sha512, 128, 64, 64)

Definition at line 65 of file ipsecmb.c.

◆ HMAC_MAX_BLOCK_SIZE

#define HMAC_MAX_BLOCK_SIZE   SHA_512_BLOCK_SIZE

Definition at line 28 of file ipsecmb.c.

Typedef Documentation

◆ ipsecmb_main_t

Function Documentation

◆ crypto_ipsecmb_init()

static clib_error_t* crypto_ipsecmb_init ( vlib_main_t vm)
static

Definition at line 463 of file ipsecmb.c.

+ Here is the call graph for this function:

◆ crypto_ipsecmb_iv_init()

clib_error_t* crypto_ipsecmb_iv_init ( ipsecmb_main_t imbm)

Definition at line 364 of file ipsecmb.c.

+ Here is the caller graph for this function:

◆ crypto_ipsecmb_key_handler()

static void crypto_ipsecmb_key_handler ( vlib_main_t vm,
vnet_crypto_key_op_t  kop,
vnet_crypto_key_index_t  idx 
)
static

Definition at line 388 of file ipsecmb.c.

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

◆ ipsecmb_ops_cbc_cipher_inline()

static_always_inline u32 ipsecmb_ops_cbc_cipher_inline ( vlib_main_t vm,
vnet_crypto_op_t ops[],
u32  n_ops,
u32  key_len,
JOB_CIPHER_DIRECTION  direction 
)

Definition at line 192 of file ipsecmb.c.

+ Here is the call graph for this function:

◆ ipsecmb_ops_gcm_cipher_inline()

static_always_inline u32 ipsecmb_ops_gcm_cipher_inline ( vlib_main_t vm,
vnet_crypto_op_t ops[],
u32  n_ops,
u32  key_len,
JOB_CIPHER_DIRECTION  direction 
)

Definition at line 290 of file ipsecmb.c.

+ Here is the call graph for this function:

◆ ipsecmb_ops_hmac_inline()

static_always_inline u32 ipsecmb_ops_hmac_inline ( vlib_main_t vm,
vnet_crypto_op_t ops[],
u32  n_ops,
u32  block_size,
u32  hash_size,
u32  digest_size,
JOB_HASH_ALG  alg 
)

Definition at line 119 of file ipsecmb.c.

+ Here is the call graph for this function:

◆ ipsecmb_retire_cipher_job()

static void ipsecmb_retire_cipher_job ( JOB_AES_HMAC *  job,
u32 n_fail 
)
inlinestatic

Definition at line 178 of file ipsecmb.c.

+ Here is the caller graph for this function:

◆ ipsecmb_retire_gcm_cipher_job()

static void ipsecmb_retire_gcm_cipher_job ( JOB_AES_HMAC *  job,
u32 n_fail,
JOB_CIPHER_DIRECTION  direction 
)
inlinestatic

Definition at line 265 of file ipsecmb.c.

+ Here is the caller graph for this function:

◆ ipsecmb_retire_hmac_job()

static void ipsecmb_retire_hmac_job ( JOB_AES_HMAC *  job,
u32 n_fail,
u32  digest_size 
)
inlinestatic

Definition at line 89 of file ipsecmb.c.

+ Here is the caller graph for this function:

◆ VLIB_PLUGIN_REGISTER()

VLIB_PLUGIN_REGISTER ( )

Variable Documentation

◆ foreach_ipsecmb_cbc_cipher_op

foreach_ipsecmb_cbc_cipher_op

Definition at line 261 of file ipsecmb.c.

◆ foreach_ipsecmb_gcm_cipher_op

foreach_ipsecmb_gcm_cipher_op

Definition at line 360 of file ipsecmb.c.

◆ foreach_ipsecmb_hmac_op

foreach_ipsecmb_hmac_op

Definition at line 174 of file ipsecmb.c.

◆ ipsecmb_main

ipsecmb_main_t ipsecmb_main = { }
static

Definition at line 60 of file ipsecmb.c.