FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
esp_encrypt.c File Reference
+ Include dependency graph for esp_encrypt.c:

Go to the source code of this file.

Data Structures

struct  esp_encrypt_trace_t
 
struct  esp_encrypt_post_trace_t
 
struct  esp_no_crypto_trace_t
 

Macros

#define foreach_esp_encrypt_next
 
#define foreach_esp_encrypt_error
 

Enumerations

enum  esp_encrypt_next_t { ESP_ENCRYPT_N_NEXT, ESP_ENCRYPT_N_NEXT }
 
enum  esp_encrypt_error_t { ESP_ENCRYPT_N_ERROR, ESP_ENCRYPT_N_ERROR }
 
enum  { ESP_NO_CRYPTO_NEXT_DROP, ESP_NO_CRYPTO_N_NEXT }
 
enum  { ESP_NO_CRYPTO_ERROR_RX_PKTS }
 

Functions

static u8format_esp_encrypt_trace (u8 *s, va_list *args)
 
static u8format_esp_post_encrypt_trace (u8 *s, va_list *args)
 
static_always_inline u8esp_add_footer_and_icv (vlib_main_t *vm, vlib_buffer_t **last, u8 esp_align, u8 icv_sz, vlib_node_runtime_t *node, u16 buffer_data_size, uword total_len)
 
static_always_inline void esp_update_ip4_hdr (ip4_header_t *ip4, u16 len, int is_transport, int is_udp)
 
static_always_inline void esp_fill_udp_hdr (ipsec_sa_t *sa, udp_header_t *udp, u16 len)
 
static_always_inline u8 ext_hdr_is_pre_esp (u8 nexthdr)
 
static_always_inline u8 esp_get_ip6_hdr_len (ip6_header_t *ip6, ip6_ext_header_t **ext_hdr)
 
static_always_inline void esp_process_chained_ops (vlib_main_t *vm, vlib_node_runtime_t *node, vnet_crypto_op_t *ops, vlib_buffer_t *b[], u16 *nexts, vnet_crypto_op_chunk_t *chunks, u16 drop_next)
 
static_always_inline void esp_process_ops (vlib_main_t *vm, vlib_node_runtime_t *node, vnet_crypto_op_t *ops, vlib_buffer_t *b[], u16 *nexts, u16 drop_next)
 
static_always_inline u32 esp_encrypt_chain_crypto (vlib_main_t *vm, ipsec_per_thread_data_t *ptd, ipsec_sa_t *sa0, vlib_buffer_t *b, vlib_buffer_t *lb, u8 icv_sz, u8 *start, u32 start_len, u16 *n_ch)
 
static_always_inline u32 esp_encrypt_chain_integ (vlib_main_t *vm, ipsec_per_thread_data_t *ptd, ipsec_sa_t *sa0, vlib_buffer_t *b, vlib_buffer_t *lb, u8 icv_sz, u8 *start, u32 start_len, u8 *digest, u16 *n_ch)
 
static void esp_prepare_sync_op (vlib_main_t *vm, ipsec_per_thread_data_t *ptd, vnet_crypto_op_t **crypto_ops, vnet_crypto_op_t **integ_ops, ipsec_sa_t *sa0, u32 seq_hi, u8 *payload, u16 payload_len, u8 iv_sz, u8 icv_sz, u32 bi, vlib_buffer_t **b, vlib_buffer_t *lb, u32 hdr_len, esp_header_t *esp)
 
static_always_inline void esp_prepare_async_frame (vlib_main_t *vm, ipsec_per_thread_data_t *ptd, vnet_crypto_async_frame_t *async_frame, ipsec_sa_t *sa, vlib_buffer_t *b, esp_header_t *esp, u8 *payload, u32 payload_len, u8 iv_sz, u8 icv_sz, u32 bi, u16 next, u32 hdr_len, u16 async_next, vlib_buffer_t *lb)
 
static uword esp_encrypt_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, vnet_link_t lt, int is_tun, u16 async_next_node)
 
static uword esp_encrypt_post_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() esp4_encrypt_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() esp4_encrypt_post_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() esp6_encrypt_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() esp6_encrypt_post_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() esp4_encrypt_tun_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() esp4_encrypt_tun_post_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() esp6_encrypt_tun_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() esp6_encrypt_tun_post_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static u8format_esp_no_crypto_trace (u8 *s, va_list *args)
 
static uword esp_no_crypto_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() esp4_no_crypto_tun_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() esp6_no_crypto_tun_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static clib_error_tesp_encrypt_init (vlib_main_t *vm)
 

Variables

static char * esp_encrypt_error_strings []
 
vlib_node_registration_t esp4_encrypt_node
 (constructor) VLIB_REGISTER_NODE (esp4_encrypt_node) More...
 
vlib_node_registration_t esp4_encrypt_post_node
 (constructor) VLIB_REGISTER_NODE (esp4_encrypt_post_node) More...
 
vlib_node_registration_t esp6_encrypt_node
 (constructor) VLIB_REGISTER_NODE (esp6_encrypt_node) More...
 
vlib_node_registration_t esp6_encrypt_post_node
 (constructor) VLIB_REGISTER_NODE (esp6_encrypt_post_node) More...
 
vlib_node_registration_t esp4_encrypt_tun_node
 (constructor) VLIB_REGISTER_NODE (esp4_encrypt_tun_node) More...
 
vlib_node_registration_t esp4_encrypt_tun_post_node
 (constructor) VLIB_REGISTER_NODE (esp4_encrypt_tun_post_node) More...
 
vlib_node_registration_t esp6_encrypt_tun_node
 (constructor) VLIB_REGISTER_NODE (esp6_encrypt_tun_node) More...
 
vlib_node_registration_t esp6_encrypt_tun_post_node
 (constructor) VLIB_REGISTER_NODE (esp6_encrypt_tun_post_node) More...
 
vlib_main_tvm
 
vlib_main_t vlib_node_runtime_tnode
 
vlib_main_t vlib_node_runtime_t vlib_frame_tfrom_frame
 
vlib_node_registration_t esp_mpls_encrypt_tun_node
 (constructor) VLIB_REGISTER_NODE (esp_mpls_encrypt_tun_node) More...
 
vlib_node_registration_t esp_mpls_encrypt_tun_post_node
 (constructor) VLIB_REGISTER_NODE (esp_mpls_encrypt_tun_post_node) More...
 
static char * esp_no_crypto_error_strings []
 
vlib_node_registration_t esp4_no_crypto_tun_node
 (constructor) VLIB_REGISTER_NODE (esp4_no_crypto_tun_node) More...
 
vlib_node_registration_t esp6_no_crypto_tun_node
 (constructor) VLIB_REGISTER_NODE (esp6_no_crypto_tun_node) More...
 

Macro Definition Documentation

◆ foreach_esp_encrypt_error

#define foreach_esp_encrypt_error
Value:
_ (RX_PKTS, "ESP pkts received") \
_ (POST_RX_PKTS, "ESP-post pkts received") \
_ (HANDOFF, "Hand-off") \
_ (SEQ_CYCLED, "sequence number cycled (packet dropped)") \
_ (CRYPTO_ENGINE_ERROR, "crypto engine error (packet dropped)") \
_ (CRYPTO_QUEUE_FULL, "crypto queue full (packet dropped)") \
_ (NO_BUFFERS, "no buffers (packet dropped)")

Definition at line 46 of file esp_encrypt.c.

◆ foreach_esp_encrypt_next

#define foreach_esp_encrypt_next
Value:
_ (DROP4, "ip4-drop") \
_ (DROP6, "ip6-drop") \
_ (DROP_MPLS, "mpls-drop") \
_ (HANDOFF4, "handoff4") \
_ (HANDOFF6, "handoff6") \
_ (HANDOFF_MPLS, "handoff-mpls") \
_ (INTERFACE_OUTPUT, "interface-output")

Definition at line 29 of file esp_encrypt.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ESP_NO_CRYPTO_NEXT_DROP 
ESP_NO_CRYPTO_N_NEXT 

Definition at line 1388 of file esp_encrypt.c.

◆ anonymous enum

anonymous enum
Enumerator
ESP_NO_CRYPTO_ERROR_RX_PKTS 

Definition at line 1394 of file esp_encrypt.c.

◆ esp_encrypt_error_t

Enumerator
ESP_ENCRYPT_N_ERROR 
ESP_ENCRYPT_N_ERROR 

Definition at line 55 of file esp_encrypt.c.

◆ esp_encrypt_next_t

Enumerator
ESP_ENCRYPT_N_NEXT 
ESP_ENCRYPT_N_NEXT 

Definition at line 39 of file esp_encrypt.c.

Function Documentation

◆ esp4_encrypt_node()

VLIB_NODE_FN() esp4_encrypt_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 1134 of file esp_encrypt.c.

+ Here is the call graph for this function:

◆ esp4_encrypt_post_node()

VLIB_NODE_FN() esp4_encrypt_post_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 1163 of file esp_encrypt.c.

+ Here is the call graph for this function:

◆ esp4_encrypt_tun_node()

VLIB_NODE_FN() esp4_encrypt_tun_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 1224 of file esp_encrypt.c.

+ Here is the call graph for this function:

◆ esp4_encrypt_tun_post_node()

VLIB_NODE_FN() esp4_encrypt_tun_post_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 1254 of file esp_encrypt.c.

+ Here is the call graph for this function:

◆ esp4_no_crypto_tun_node()

VLIB_NODE_FN() esp4_no_crypto_tun_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 1442 of file esp_encrypt.c.

+ Here is the call graph for this function:

◆ esp6_encrypt_node()

VLIB_NODE_FN() esp6_encrypt_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 1183 of file esp_encrypt.c.

+ Here is the call graph for this function:

◆ esp6_encrypt_post_node()

VLIB_NODE_FN() esp6_encrypt_post_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 1204 of file esp_encrypt.c.

+ Here is the call graph for this function:

◆ esp6_encrypt_tun_node()

VLIB_NODE_FN() esp6_encrypt_tun_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 1274 of file esp_encrypt.c.

+ Here is the call graph for this function:

◆ esp6_encrypt_tun_post_node()

VLIB_NODE_FN() esp6_encrypt_tun_post_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 1306 of file esp_encrypt.c.

+ Here is the call graph for this function:

◆ esp6_no_crypto_tun_node()

VLIB_NODE_FN() esp6_no_crypto_tun_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 1463 of file esp_encrypt.c.

+ Here is the call graph for this function:

◆ esp_add_footer_and_icv()

static_always_inline u8* esp_add_footer_and_icv ( vlib_main_t vm,
vlib_buffer_t **  last,
u8  esp_align,
u8  icv_sz,
vlib_node_runtime_t node,
u16  buffer_data_size,
uword  total_len 
)

Definition at line 116 of file esp_encrypt.c.

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

◆ esp_encrypt_chain_crypto()

static_always_inline u32 esp_encrypt_chain_crypto ( vlib_main_t vm,
ipsec_per_thread_data_t ptd,
ipsec_sa_t sa0,
vlib_buffer_t b,
vlib_buffer_t lb,
u8  icv_sz,
u8 start,
u32  start_len,
u16 n_ch 
)

Definition at line 297 of file esp_encrypt.c.

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

◆ esp_encrypt_chain_integ()

static_always_inline u32 esp_encrypt_chain_integ ( vlib_main_t vm,
ipsec_per_thread_data_t ptd,
ipsec_sa_t sa0,
vlib_buffer_t b,
vlib_buffer_t lb,
u8  icv_sz,
u8 start,
u32  start_len,
u8 digest,
u16 n_ch 
)

Definition at line 334 of file esp_encrypt.c.

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

◆ esp_encrypt_init()

static clib_error_t* esp_encrypt_init ( vlib_main_t vm)
static

Definition at line 1488 of file esp_encrypt.c.

+ Here is the call graph for this function:

◆ esp_encrypt_inline()

static uword esp_encrypt_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
vnet_link_t  lt,
int  is_tun,
u16  async_next_node 
)
inlinestatic

Definition at line 566 of file esp_encrypt.c.

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

◆ esp_encrypt_post_inline()

static uword esp_encrypt_post_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
inlinestatic

Definition at line 1049 of file esp_encrypt.c.

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

◆ esp_fill_udp_hdr()

static_always_inline void esp_fill_udp_hdr ( ipsec_sa_t sa,
udp_header_t udp,
u16  len 
)

Definition at line 187 of file esp_encrypt.c.

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

◆ esp_get_ip6_hdr_len()

static_always_inline u8 esp_get_ip6_hdr_len ( ip6_header_t ip6,
ip6_ext_header_t **  ext_hdr 
)

Definition at line 212 of file esp_encrypt.c.

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

◆ esp_no_crypto_inline()

static uword esp_no_crypto_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
inlinestatic

Definition at line 1404 of file esp_encrypt.c.

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

◆ esp_prepare_async_frame()

static_always_inline void esp_prepare_async_frame ( vlib_main_t vm,
ipsec_per_thread_data_t ptd,
vnet_crypto_async_frame_t async_frame,
ipsec_sa_t sa,
vlib_buffer_t b,
esp_header_t esp,
u8 payload,
u32  payload_len,
u8  iv_sz,
u8  icv_sz,
u32  bi,
u16  next,
u32  hdr_len,
u16  async_next,
vlib_buffer_t lb 
)

Definition at line 476 of file esp_encrypt.c.

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

◆ esp_prepare_sync_op()

static void esp_prepare_sync_op ( vlib_main_t vm,
ipsec_per_thread_data_t ptd,
vnet_crypto_op_t **  crypto_ops,
vnet_crypto_op_t **  integ_ops,
ipsec_sa_t sa0,
u32  seq_hi,
u8 payload,
u16  payload_len,
u8  iv_sz,
u8  icv_sz,
u32  bi,
vlib_buffer_t **  b,
vlib_buffer_t lb,
u32  hdr_len,
esp_header_t esp 
)
inlinestatic

Definition at line 380 of file esp_encrypt.c.

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

◆ esp_process_chained_ops()

static_always_inline void esp_process_chained_ops ( vlib_main_t vm,
vlib_node_runtime_t node,
vnet_crypto_op_t ops,
vlib_buffer_t b[],
u16 nexts,
vnet_crypto_op_chunk_t chunks,
u16  drop_next 
)

Definition at line 240 of file esp_encrypt.c.

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

◆ esp_process_ops()

static_always_inline void esp_process_ops ( vlib_main_t vm,
vlib_node_runtime_t node,
vnet_crypto_op_t ops,
vlib_buffer_t b[],
u16 nexts,
u16  drop_next 
)

Definition at line 269 of file esp_encrypt.c.

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

◆ esp_update_ip4_hdr()

static_always_inline void esp_update_ip4_hdr ( ip4_header_t ip4,
u16  len,
int  is_transport,
int  is_udp 
)

Definition at line 161 of file esp_encrypt.c.

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

◆ ext_hdr_is_pre_esp()

static_always_inline u8 ext_hdr_is_pre_esp ( u8  nexthdr)

Definition at line 194 of file esp_encrypt.c.

+ Here is the caller graph for this function:

◆ format_esp_encrypt_trace()

static u8* format_esp_encrypt_trace ( u8 s,
va_list *  args 
)
static

Definition at line 87 of file esp_encrypt.c.

+ Here is the call graph for this function:

◆ format_esp_no_crypto_trace()

static u8* format_esp_no_crypto_trace ( u8 s,
va_list *  args 
)
static

Definition at line 1377 of file esp_encrypt.c.

◆ format_esp_post_encrypt_trace()

static u8* format_esp_post_encrypt_trace ( u8 s,
va_list *  args 
)
static

Definition at line 104 of file esp_encrypt.c.

Variable Documentation

◆ esp4_encrypt_node

vlib_node_registration_t esp4_encrypt_node
Initial value:
= {
.name = "esp4-encrypt",
.vector_size = sizeof (u32),
.format_trace = format_esp_encrypt_trace,
.error_strings = esp_encrypt_error_strings,
.n_next_nodes = ESP_ENCRYPT_N_NEXT,
.next_nodes = { [ESP_ENCRYPT_NEXT_DROP4] = "ip4-drop",
[ESP_ENCRYPT_NEXT_DROP6] = "ip6-drop",
[ESP_ENCRYPT_NEXT_DROP_MPLS] = "mpls-drop",
[ESP_ENCRYPT_NEXT_HANDOFF4] = "esp4-encrypt-handoff",
[ESP_ENCRYPT_NEXT_HANDOFF6] = "esp6-encrypt-handoff",
[ESP_ENCRYPT_NEXT_HANDOFF_MPLS] = "error-drop",
[ESP_ENCRYPT_NEXT_INTERFACE_OUTPUT] = "interface-output" },
}

(constructor) VLIB_REGISTER_NODE (esp4_encrypt_node)

Definition at line 1143 of file esp_encrypt.c.

◆ esp4_encrypt_post_node

vlib_node_registration_t esp4_encrypt_post_node
Initial value:
= {
.name = "esp4-encrypt-post",
.vector_size = sizeof (u32),
.sibling_of = "esp4-encrypt",
.error_strings = esp_encrypt_error_strings,
}

(constructor) VLIB_REGISTER_NODE (esp4_encrypt_post_node)

Definition at line 1171 of file esp_encrypt.c.

◆ esp4_encrypt_tun_node

vlib_node_registration_t esp4_encrypt_tun_node
Initial value:
= {
.name = "esp4-encrypt-tun",
.vector_size = sizeof (u32),
.format_trace = format_esp_encrypt_trace,
.error_strings = esp_encrypt_error_strings,
.n_next_nodes = ESP_ENCRYPT_N_NEXT,
.next_nodes = {
[ESP_ENCRYPT_NEXT_DROP4] = "ip4-drop",
[ESP_ENCRYPT_NEXT_DROP6] = "ip6-drop",
[ESP_ENCRYPT_NEXT_DROP_MPLS] = "mpls-drop",
[ESP_ENCRYPT_NEXT_HANDOFF4] = "esp4-encrypt-tun-handoff",
[ESP_ENCRYPT_NEXT_HANDOFF6] = "esp6-encrypt-tun-handoff",
[ESP_ENCRYPT_NEXT_HANDOFF_MPLS] = "esp-mpls-encrypt-tun-handoff",
[ESP_ENCRYPT_NEXT_INTERFACE_OUTPUT] = "adj-midchain-tx",
},
}

(constructor) VLIB_REGISTER_NODE (esp4_encrypt_tun_node)

Definition at line 1233 of file esp_encrypt.c.

◆ esp4_encrypt_tun_post_node

vlib_node_registration_t esp4_encrypt_tun_post_node
Initial value:
= {
.name = "esp4-encrypt-tun-post",
.vector_size = sizeof (u32),
.sibling_of = "esp4-encrypt-tun",
.error_strings = esp_encrypt_error_strings,
}

(constructor) VLIB_REGISTER_NODE (esp4_encrypt_tun_post_node)

Definition at line 1262 of file esp_encrypt.c.

◆ esp4_no_crypto_tun_node

vlib_node_registration_t esp4_no_crypto_tun_node
Initial value:
=
{
.name = "esp4-no-crypto",
.vector_size = sizeof (u32),
.format_trace = format_esp_no_crypto_trace,
.error_strings = esp_no_crypto_error_strings,
.n_next_nodes = ESP_NO_CRYPTO_N_NEXT,
.next_nodes = {
[ESP_NO_CRYPTO_NEXT_DROP] = "ip4-drop",
},
}

(constructor) VLIB_REGISTER_NODE (esp4_no_crypto_tun_node)

Definition at line 1450 of file esp_encrypt.c.

◆ esp6_encrypt_node

vlib_node_registration_t esp6_encrypt_node
Initial value:
= {
.name = "esp6-encrypt",
.vector_size = sizeof (u32),
.format_trace = format_esp_encrypt_trace,
.sibling_of = "esp4-encrypt",
.error_strings = esp_encrypt_error_strings,
}

(constructor) VLIB_REGISTER_NODE (esp6_encrypt_node)

Definition at line 1192 of file esp_encrypt.c.

◆ esp6_encrypt_post_node

vlib_node_registration_t esp6_encrypt_post_node
Initial value:
= {
.name = "esp6-encrypt-post",
.vector_size = sizeof (u32),
.sibling_of = "esp4-encrypt",
.error_strings = esp_encrypt_error_strings,
}

(constructor) VLIB_REGISTER_NODE (esp6_encrypt_post_node)

Definition at line 1212 of file esp_encrypt.c.

◆ esp6_encrypt_tun_node

vlib_node_registration_t esp6_encrypt_tun_node
Initial value:
= {
.name = "esp6-encrypt-tun",
.vector_size = sizeof (u32),
.format_trace = format_esp_encrypt_trace,
.error_strings = esp_encrypt_error_strings,
.n_next_nodes = ESP_ENCRYPT_N_NEXT,
.next_nodes = {
[ESP_ENCRYPT_NEXT_DROP4] = "ip4-drop",
[ESP_ENCRYPT_NEXT_DROP6] = "ip6-drop",
[ESP_ENCRYPT_NEXT_DROP_MPLS] = "mpls-drop",
[ESP_ENCRYPT_NEXT_HANDOFF4] = "esp4-encrypt-tun-handoff",
[ESP_ENCRYPT_NEXT_HANDOFF6] = "esp6-encrypt-tun-handoff",
[ESP_ENCRYPT_NEXT_HANDOFF_MPLS] = "esp-mpls-encrypt-tun-handoff",
[ESP_ENCRYPT_NEXT_INTERFACE_OUTPUT] = "adj-midchain-tx",
},
}

(constructor) VLIB_REGISTER_NODE (esp6_encrypt_tun_node)

Definition at line 1283 of file esp_encrypt.c.

◆ esp6_encrypt_tun_post_node

vlib_node_registration_t esp6_encrypt_tun_post_node
Initial value:
= {
.name = "esp6-encrypt-tun-post",
.vector_size = sizeof (u32),
.sibling_of = "esp-mpls-encrypt-tun",
.error_strings = esp_encrypt_error_strings,
}

(constructor) VLIB_REGISTER_NODE (esp6_encrypt_tun_post_node)

Definition at line 1314 of file esp_encrypt.c.

◆ esp6_no_crypto_tun_node

vlib_node_registration_t esp6_no_crypto_tun_node
Initial value:
=
{
.name = "esp6-no-crypto",
.vector_size = sizeof (u32),
.format_trace = format_esp_no_crypto_trace,
.error_strings = esp_no_crypto_error_strings,
.n_next_nodes = ESP_NO_CRYPTO_N_NEXT,
.next_nodes = {
[ESP_NO_CRYPTO_NEXT_DROP] = "ip6-drop",
},
}

(constructor) VLIB_REGISTER_NODE (esp6_no_crypto_tun_node)

Definition at line 1471 of file esp_encrypt.c.

◆ esp_encrypt_error_strings

char* esp_encrypt_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}

Definition at line 63 of file esp_encrypt.c.

◆ esp_mpls_encrypt_tun_node

vlib_node_registration_t esp_mpls_encrypt_tun_node
Initial value:
= {
.name = "esp-mpls-encrypt-tun",
.vector_size = sizeof (u32),
.format_trace = format_esp_encrypt_trace,
.error_strings = esp_encrypt_error_strings,
.n_next_nodes = ESP_ENCRYPT_N_NEXT,
.next_nodes = {
[ESP_ENCRYPT_NEXT_DROP4] = "ip4-drop",
[ESP_ENCRYPT_NEXT_DROP6] = "ip6-drop",
[ESP_ENCRYPT_NEXT_DROP_MPLS] = "mpls-drop",
[ESP_ENCRYPT_NEXT_HANDOFF4] = "esp4-encrypt-tun-handoff",
[ESP_ENCRYPT_NEXT_HANDOFF6] = "esp6-encrypt-tun-handoff",
[ESP_ENCRYPT_NEXT_HANDOFF_MPLS] = "esp-mpls-encrypt-tun-handoff",
[ESP_ENCRYPT_NEXT_INTERFACE_OUTPUT] = "adj-midchain-tx",
},
}

(constructor) VLIB_REGISTER_NODE (esp_mpls_encrypt_tun_node)

Definition at line 1333 of file esp_encrypt.c.

◆ esp_mpls_encrypt_tun_post_node

vlib_node_registration_t esp_mpls_encrypt_tun_post_node
Initial value:
= {
.name = "esp-mpls-encrypt-tun-post",
.vector_size = sizeof (u32),
.sibling_of = "esp-mpls-encrypt-tun",
.error_strings = esp_encrypt_error_strings,
}

(constructor) VLIB_REGISTER_NODE (esp_mpls_encrypt_tun_post_node)

Definition at line 1360 of file esp_encrypt.c.

◆ esp_no_crypto_error_strings

char* esp_no_crypto_error_strings[]
static
Initial value:
= {
"Outbound ESP packets received",
}

Definition at line 1399 of file esp_encrypt.c.

◆ from_frame

◆ node

Definition at line 1327 of file esp_encrypt.c.

◆ vm

Definition at line 1327 of file esp_encrypt.c.

HANDOFF
@ HANDOFF
Definition: ip4_full_reass.c:221
format_esp_no_crypto_trace
static u8 * format_esp_no_crypto_trace(u8 *s, va_list *args)
Definition: esp_encrypt.c:1377
node
vlib_main_t vlib_node_runtime_t * node
Definition: esp_encrypt.c:1327
esp_async_post_next_t::esp_mpls_tun_post_next
u32 esp_mpls_tun_post_next
Definition: esp.h:247
VLIB_NODE_TYPE_INTERNAL
@ VLIB_NODE_TYPE_INTERNAL
Definition: node.h:72
ESP_NO_CRYPTO_N_NEXT
@ ESP_NO_CRYPTO_N_NEXT
Definition: esp_encrypt.c:1391
esp_encrypt_error_strings
static char * esp_encrypt_error_strings[]
Definition: esp_encrypt.c:63
from_frame
vlib_main_t vlib_node_runtime_t vlib_frame_t * from_frame
Definition: esp_encrypt.c:1328
format_esp_post_encrypt_trace
static u8 * format_esp_post_encrypt_trace(u8 *s, va_list *args)
Definition: esp_encrypt.c:104
esp_encrypt_async_next
esp_async_post_next_t esp_encrypt_async_next
Definition: ipsec.c:30
foreach_esp_encrypt_error
#define foreach_esp_encrypt_error
Definition: esp_encrypt.c:46
ARRAY_LEN
#define ARRAY_LEN(x)
Definition: clib.h:70
esp_no_crypto_error_strings
static char * esp_no_crypto_error_strings[]
Definition: esp_encrypt.c:1399
VNET_LINK_MPLS
@ VNET_LINK_MPLS
Definition: interface.h:349
ESP_ENCRYPT_N_NEXT
@ ESP_ENCRYPT_N_NEXT
Definition: esp_encrypt.c:43
esp_encrypt_inline
static uword esp_encrypt_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, vnet_link_t lt, int is_tun, u16 async_next_node)
Definition: esp_encrypt.c:566
u32
unsigned int u32
Definition: types.h:88
format_esp_encrypt_trace
static u8 * format_esp_encrypt_trace(u8 *s, va_list *args)
Definition: esp_encrypt.c:87
ESP_NO_CRYPTO_NEXT_DROP
@ ESP_NO_CRYPTO_NEXT_DROP
Definition: esp_encrypt.c:1390
vm
vlib_main_t * vm
Definition: esp_encrypt.c:1327
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123