FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
punt.h File Reference
+ Include dependency graph for punt.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef enum vlib_punt_reason_t_ vlib_punt_reason_t
 The 'syatem' defined punt reasons. More...
 
typedef int(* punt_reason_walk_cb_t) (vlib_punt_reason_t id, const u8 *name, void *ctx)
 Walk each punt reason. More...
 
typedef int vlib_punt_hdl_t
 Typedef for a client handle. More...
 
typedef void(* punt_interested_listener_t) (vlib_enable_or_disable_t i, void *data)
 

Enumerations

enum  vlib_punt_reason_t_ { PUNT_N_REASONS }
 The 'syatem' defined punt reasons. More...
 

Functions

void punt_reason_walk (punt_reason_walk_cb_t cb, void *cxt)
 
u8format_vlib_punt_reason (u8 *s, va_list *args)
 Format a punt reason. More...
 
uword unformat_punt_reason (unformat_input_t *input, va_list *args)
 Unformat a punt reason. More...
 
vlib_punt_hdl_t vlib_punt_client_register (const char *who)
 Register a new clinet. More...
 
int vlib_punt_reason_alloc (vlib_punt_hdl_t client, const char *reason_name, punt_interested_listener_t fn, void *data, vlib_punt_reason_t *reason, u32 flags, format_function_t *flags_format)
 Allocate a new punt reason. More...
 
int vlib_punt_reason_validate (vlib_punt_reason_t reason)
 Validate that a punt reason is assigned. More...
 
int vlib_punt_register (vlib_punt_hdl_t client, vlib_punt_reason_t reason, const char *node)
 Register a node to receive particular punted buffers. More...
 
int vlib_punt_unregister (vlib_punt_hdl_t client, vlib_punt_reason_t pr, const char *node)
 
u32 vlib_punt_reason_get_flags (vlib_punt_reason_t pr)
 

Variables

u16 ** punt_dp_db
 FOR USE IN THE DP ONLY. More...
 
vlib_combined_counter_main_t punt_counters
 FOR USE IN THE DP ONLY. More...
 

Typedef Documentation

◆ punt_interested_listener_t

typedef void(* punt_interested_listener_t) (vlib_enable_or_disable_t i, void *data)

Definition at line 64 of file punt.h.

◆ punt_reason_walk_cb_t

typedef int(* punt_reason_walk_cb_t) (vlib_punt_reason_t id, const u8 *name, void *ctx)

Walk each punt reason.

Definition at line 34 of file punt.h.

◆ vlib_punt_hdl_t

typedef int vlib_punt_hdl_t

Typedef for a client handle.

Definition at line 52 of file punt.h.

◆ vlib_punt_reason_t

The 'syatem' defined punt reasons.

Only add to this list reasons defined and used within the vlib subsystem. To define new reasons in e.g. plgins, use punt_reason_alloc()

Enumeration Type Documentation

◆ vlib_punt_reason_t_

The 'syatem' defined punt reasons.

Only add to this list reasons defined and used within the vlib subsystem. To define new reasons in e.g. plgins, use punt_reason_alloc()

Enumerator
PUNT_N_REASONS 

Definition at line 26 of file punt.h.

Function Documentation

◆ format_vlib_punt_reason()

u8* format_vlib_punt_reason ( u8 s,
va_list *  args 
)

Format a punt reason.

Definition at line 158 of file punt.c.

+ Here is the caller graph for this function:

◆ punt_reason_walk()

void punt_reason_walk ( punt_reason_walk_cb_t  cb,
void *  cxt 
)

Definition at line 457 of file punt.c.

+ Here is the caller graph for this function:

◆ unformat_punt_reason()

uword unformat_punt_reason ( unformat_input_t input,
va_list *  args 
)

Unformat a punt reason.

Definition at line 479 of file punt.c.

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

◆ vlib_punt_client_register()

vlib_punt_hdl_t vlib_punt_client_register ( const char *  who)

Register a new clinet.

Parameters
who- The name of the client

@retrun the handle the punt infra allocated for this client that must be used when the client wishes to use the infra

Definition at line 171 of file punt.c.

+ Here is the caller graph for this function:

◆ vlib_punt_reason_alloc()

int vlib_punt_reason_alloc ( vlib_punt_hdl_t  client,
const char *  reason_name,
punt_interested_listener_t  fn,
void *  data,
vlib_punt_reason_t reason,
u32  flags,
format_function_t flags_format 
)

Allocate a new punt reason.

Parameters
fn- A callback to invoke when an entity becomes [un]interested in the punt code.
data- To be passed in the callback function.
flags- flags associated with the punt reason
flags_format- formatting function to display those flags (may be NULL)

Definition at line 425 of file punt.c.

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

◆ vlib_punt_reason_get_flags()

u32 vlib_punt_reason_get_flags ( vlib_punt_reason_t  pr)

Definition at line 419 of file punt.c.

+ Here is the caller graph for this function:

◆ vlib_punt_reason_validate()

int vlib_punt_reason_validate ( vlib_punt_reason_t  reason)

Validate that a punt reason is assigned.

Definition at line 410 of file punt.c.

+ Here is the caller graph for this function:

◆ vlib_punt_register()

int vlib_punt_register ( vlib_punt_hdl_t  client,
vlib_punt_reason_t  reason,
const char *  node 
)

Register a node to receive particular punted buffers.

@paran client - The registered client registering for the packets

Parameters
reason- The reason the packet was punted
node- The node to which the punted packets will be sent

Definition at line 283 of file punt.c.

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

◆ vlib_punt_unregister()

int vlib_punt_unregister ( vlib_punt_hdl_t  client,
vlib_punt_reason_t  pr,
const char *  node 
)

Definition at line 352 of file punt.c.

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

Variable Documentation

◆ punt_counters

FOR USE IN THE DP ONLY.

Per-reason counters

FOR USE IN THE DP ONLY.

Definition at line 27 of file punt.c.

◆ punt_dp_db

u16** punt_dp_db

FOR USE IN THE DP ONLY.

Arc[s] to follow for each reason

FOR USE IN THE DP ONLY.

this is a vector of edges per-reason

Definition at line 129 of file punt.c.