FD.io VPP  v19.04.4-rc0-5-ge88582fac
Vector Packet Processing
hqos.c File Reference
+ Include dependency graph for hqos.c:

Go to the source code of this file.

Macros

#define vl_typedefs   /* define message structures */
 
#define vl_print(handle, ...)   vlib_cli_output (handle, __VA_ARGS__)
 
#define vl_printfun
 
#define BITFIELD(byte_array, slab_pos, slab_mask, slab_shr)
 
#define RTE_SCHED_PORT_HIERARCHY(subport, pipe, traffic_class, queue, color)
 

Functions

int dpdk_hqos_validate_mask (u64 mask, u32 n)
 
void dpdk_device_config_hqos_pipe_profile_default (dpdk_device_config_hqos_t *hqos, u32 pipe_profile_id)
 
void dpdk_device_config_hqos_default (dpdk_device_config_hqos_t *hqos)
 
clib_error_tdpdk_port_setup_hqos (dpdk_device_t *xd, dpdk_device_config_hqos_t *hqos)
 
static_always_inline void dpdk_hqos_thread_internal_hqos_dbg_bypass (vlib_main_t *vm)
 
static_always_inline void dpdk_hqos_thread_internal (vlib_main_t *vm)
 
void dpdk_hqos_thread (vlib_worker_thread_t *w)
 
void dpdk_hqos_thread_fn (void *arg)
 
 VLIB_REGISTER_THREAD (hqos_thread_reg, static)
 
void dpdk_hqos_metadata_set (dpdk_device_hqos_per_worker_thread_t *hqos, struct rte_mbuf **pkts, u32 n_pkts)
 

Variables

static dpdk_device_config_hqos_t hqos_params_default
 
static struct rte_sched_subport_params hqos_subport_params_default
 
static struct rte_sched_pipe_params hqos_pipe_params_default
 

Macro Definition Documentation

◆ BITFIELD

#define BITFIELD (   byte_array,
  slab_pos,
  slab_mask,
  slab_shr 
)
Value:
({ \
u64 slab = *((u64 *) &byte_array[slab_pos]); \
u64 val = (rte_be_to_cpu_64(slab) & slab_mask) >> slab_shr; \
val; \
})
unsigned long u64
Definition: types.h:89

Definition at line 625 of file hqos.c.

◆ RTE_SCHED_PORT_HIERARCHY

#define RTE_SCHED_PORT_HIERARCHY (   subport,
  pipe,
  traffic_class,
  queue,
  color 
)
Value:
((((u64) (queue)) & 0x3) | \
((((u64) (traffic_class)) & 0x3) << 2) | \
((((u64) (color)) & 0x3) << 4) | \
((((u64) (subport)) & 0xFFFF) << 16) | \
((((u64) (pipe)) & 0xFFFFFFFF) << 32))
unsigned long u64
Definition: types.h:89

Definition at line 632 of file hqos.c.

◆ vl_print

#define vl_print (   handle,
  ... 
)    vlib_cli_output (handle, __VA_ARGS__)

Definition at line 41 of file hqos.c.

◆ vl_printfun

#define vl_printfun

Definition at line 42 of file hqos.c.

◆ vl_typedefs

#define vl_typedefs   /* define message structures */

Definition at line 36 of file hqos.c.

Function Documentation

◆ dpdk_device_config_hqos_default()

void dpdk_device_config_hqos_default ( dpdk_device_config_hqos_t hqos)

Definition at line 205 of file hqos.c.

+ Here is the caller graph for this function:

◆ dpdk_device_config_hqos_pipe_profile_default()

void dpdk_device_config_hqos_pipe_profile_default ( dpdk_device_config_hqos_t hqos,
u32  pipe_profile_id 
)

Definition at line 197 of file hqos.c.

◆ dpdk_hqos_metadata_set()

void dpdk_hqos_metadata_set ( dpdk_device_hqos_per_worker_thread_t hqos,
struct rte_mbuf **  pkts,
u32  n_pkts 
)

Definition at line 640 of file hqos.c.

+ Here is the caller graph for this function:

◆ dpdk_hqos_thread()

void dpdk_hqos_thread ( vlib_worker_thread_t w)

Definition at line 577 of file hqos.c.

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

◆ dpdk_hqos_thread_fn()

void dpdk_hqos_thread_fn ( void *  arg)

Definition at line 606 of file hqos.c.

+ Here is the call graph for this function:

◆ dpdk_hqos_thread_internal()

static_always_inline void dpdk_hqos_thread_internal ( vlib_main_t vm)

Definition at line 475 of file hqos.c.

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

◆ dpdk_hqos_thread_internal_hqos_dbg_bypass()

static_always_inline void dpdk_hqos_thread_internal_hqos_dbg_bypass ( vlib_main_t vm)

Definition at line 393 of file hqos.c.

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

◆ dpdk_hqos_validate_mask()

int dpdk_hqos_validate_mask ( u64  mask,
u32  n 
)

Definition at line 168 of file hqos.c.

◆ dpdk_port_setup_hqos()

clib_error_t* dpdk_port_setup_hqos ( dpdk_device_t xd,
dpdk_device_config_hqos_t hqos 
)

Definition at line 247 of file hqos.c.

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

◆ VLIB_REGISTER_THREAD()

VLIB_REGISTER_THREAD ( hqos_thread_reg  ,
static   
)
+ Here is the caller graph for this function:

Variable Documentation

◆ hqos_params_default

dpdk_device_config_hqos_t hqos_params_default
static

Definition at line 54 of file hqos.c.

◆ hqos_pipe_params_default

struct rte_sched_pipe_params hqos_pipe_params_default
static
Initial value:
= {
.tb_rate = 305175,
.tb_size = 1000000,
.tc_rate = {305175, 305175, 305175, 305175},
.tc_period = 40,
.wrr_weights = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
}

Definition at line 150 of file hqos.c.

◆ hqos_subport_params_default

struct rte_sched_subport_params hqos_subport_params_default
static
Initial value:
= {
.tb_rate = 1250000000,
.tb_size = 1000000,
.tc_rate = {1250000000, 1250000000, 1250000000, 1250000000},
.tc_period = 10,
}

Definition at line 143 of file hqos.c.