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

Go to the source code of this file.

Macros

#define tap_log_err(dev, f, ...)   vlib_log (VLIB_LOG_LEVEL_ERR, tap_main.log_default, "tap%u: " f, dev->dev_instance, ## __VA_ARGS__)
 
#define tap_log_dbg(dev, f, ...)   vlib_log (VLIB_LOG_LEVEL_DEBUG, tap_main.log_default, "tap%u: " f, dev->dev_instance, ## __VA_ARGS__)
 
#define TUN_MAX_PACKET_BYTES   65355
 
#define TUN_MIN_PACKET_BYTES   64
 
#define TUN_DEFAULT_PACKET_BYTES   1500
 
#define TAP_MAX_INSTANCE   1024
 

Functions

 VNET_HW_INTERFACE_CLASS (tun_device_hw_interface_class, static)
 
static u32 virtio_eth_flag_change (vnet_main_t *vnm, vnet_hw_interface_t *hi, u32 flags)
 
static void tap_free (vlib_main_t *vm, virtio_if_t *vif)
 
void tap_create_if (vlib_main_t *vm, tap_create_if_args_t *args)
 
int tap_delete_if (vlib_main_t *vm, u32 sw_if_index)
 
int tap_csum_offload_enable_disable (vlib_main_t *vm, u32 sw_if_index, int enable_disable)
 
int tap_gso_enable_disable (vlib_main_t *vm, u32 sw_if_index, int enable_disable, int is_packet_coalesce)
 
int tap_dump_ifs (tap_interface_details_t **out_tapids)
 
int tap_set_carrier (u32 hw_if_index, u32 carrier_up)
 
static clib_error_ttap_mtu_config (vlib_main_t *vm, unformat_input_t *input)
 
int tap_set_speed (u32 hw_if_index, u32 speed)
 
static clib_error_ttap_init (vlib_main_t *vm)
 

Variables

tap_main_t tap_main
 

Macro Definition Documentation

◆ tap_log_dbg

#define tap_log_dbg (   dev,
  f,
  ... 
)    vlib_log (VLIB_LOG_LEVEL_DEBUG, tap_main.log_default, "tap%u: " f, dev->dev_instance, ## __VA_ARGS__)

Definition at line 50 of file tap.c.

◆ tap_log_err

#define tap_log_err (   dev,
  f,
  ... 
)    vlib_log (VLIB_LOG_LEVEL_ERR, tap_main.log_default, "tap%u: " f, dev->dev_instance, ## __VA_ARGS__)

Definition at line 48 of file tap.c.

◆ TAP_MAX_INSTANCE

#define TAP_MAX_INSTANCE   1024

Definition at line 82 of file tap.c.

◆ TUN_DEFAULT_PACKET_BYTES

#define TUN_DEFAULT_PACKET_BYTES   1500

Definition at line 71 of file tap.c.

◆ TUN_MAX_PACKET_BYTES

#define TUN_MAX_PACKET_BYTES   65355

Definition at line 69 of file tap.c.

◆ TUN_MIN_PACKET_BYTES

#define TUN_MIN_PACKET_BYTES   64

Definition at line 70 of file tap.c.

Function Documentation

◆ tap_create_if()

void tap_create_if ( vlib_main_t vm,
tap_create_if_args_t args 
)

Definition at line 123 of file tap.c.

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

◆ tap_csum_offload_enable_disable()

int tap_csum_offload_enable_disable ( vlib_main_t vm,
u32  sw_if_index,
int  enable_disable 
)

Definition at line 798 of file tap.c.

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

◆ tap_delete_if()

int tap_delete_if ( vlib_main_t vm,
u32  sw_if_index 
)

Definition at line 766 of file tap.c.

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

◆ tap_dump_ifs()

int tap_dump_ifs ( tap_interface_details_t **  out_tapids)

Definition at line 906 of file tap.c.

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

◆ tap_free()

static void tap_free ( vlib_main_t vm,
virtio_if_t vif 
)
static

Definition at line 85 of file tap.c.

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

◆ tap_gso_enable_disable()

int tap_gso_enable_disable ( vlib_main_t vm,
u32  sw_if_index,
int  enable_disable,
int  is_packet_coalesce 
)

Definition at line 849 of file tap.c.

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

◆ tap_init()

static clib_error_t* tap_init ( vlib_main_t vm)
static

Definition at line 1102 of file tap.c.

+ Here is the call graph for this function:

◆ tap_mtu_config()

static clib_error_t* tap_mtu_config ( vlib_main_t vm,
unformat_input_t input 
)
static

Definition at line 1003 of file tap.c.

+ Here is the call graph for this function:

◆ tap_set_carrier()

int tap_set_carrier ( u32  hw_if_index,
u32  carrier_up 
)

Definition at line 975 of file tap.c.

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

◆ tap_set_speed()

int tap_set_speed ( u32  hw_if_index,
u32  speed 
)

Definition at line 1023 of file tap.c.

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

◆ virtio_eth_flag_change()

static u32 virtio_eth_flag_change ( vnet_main_t vnm,
vnet_hw_interface_t hi,
u32  flags 
)
static

Definition at line 74 of file tap.c.

◆ VNET_HW_INTERFACE_CLASS()

VNET_HW_INTERFACE_CLASS ( tun_device_hw_interface_class  ,
static   
)

Variable Documentation

◆ tap_main

tap_main_t tap_main

Definition at line 46 of file tap.c.