FD.io VPP  v16.06
Vector Packet Processing
scv_util.c File Reference
+ Include dependency graph for scv_util.c:

Go to the source code of this file.

Macros

#define MAX_SERVICES   16
 
#define TEST_PROFILE_RENEW   1
 
#define TEST_PROFILE_REFRESH   2
 

Functions

static void scv_profile_init (scv_profile *new, u16 id)
 
u8 scv_get_max_profiles (void)
 
scv_profilescv_profile_find (u16 id)
 
void scv_init (u8 *path_name, u8 max, u8 indx)
 
void scv_profile_cleanup (scv_profile *profile)
 
void scv_profile_create (scv_profile *profile, u64 prime, u64 poly2, u64 lpc, u64 secret_share, u64 validity)
 
void scv_set_validator (scv_profile *profile, u64 key)
 
static u64 sc_update_cumulative (u64 cumulative, u64 random, u64 secret_share, u64 prime, u64 lpc, u64 pre_split, double prime_inv)
 
u64 scv_update_cumulative (scv_profile *profile, u64 cumulative, u64 random)
 
static u8 sc_validate (u64 secret, u64 prime, double prime_inv, u64 cumulative, u64 random)
 
u8 scv_validate (scv_profile *profile, u64 cumulative, u64 random)
 
u64 scv_generate_random (scv_profile *profile)
 
void scv_profile_set_bit_mask (scv_profile *profile, u16 bits)
 
clib_error_tclear_scv_profile_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
void clear_scv_profiles ()
 
static clib_error_tset_scv_profile_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_scv_profile_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_ttest_profile_renew_refresh_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tset_scv_init_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

scv_profilepow_profile = NULL
 
u16 pow_profile_index = 0
 
u64 total_pkts_using_this_profile = 0
 
u8 chain_path_name [PATH_NAME_SIZE]
 
scv_profile profile_list [MAX_SERVICE_PROFILES]
 
u8 max_profiles = 0
 
u16 invalid_profile_start_index = 0
 
u8 number_of_invalid_profiles = 0
 
f64 next_time_to_send = 0
 
u32 time_exponent = 1
 
vlib_main_tgvm = 0
 
u8 sc_init_done = 0
 
vlib_cli_command_t clear_scv_profile_command
 (constructor) VLIB_CLI_COMMAND (clear_scv_profile_command) More...
 
vlib_cli_command_t set_scv_profile_command
 (constructor) VLIB_CLI_COMMAND (set_scv_profile_command) More...
 
vlib_cli_command_t show_scv_profile_command
 (constructor) VLIB_CLI_COMMAND (show_scv_profile_command) More...
 
vlib_cli_command_t test_ioam_profile_renew_refresh_cmd
 (constructor) VLIB_CLI_COMMAND (test_ioam_profile_renew_refresh_cmd) More...
 
vlib_cli_command_t set_ioam_sc_init_command
 (constructor) VLIB_CLI_COMMAND (set_ioam_sc_init_command) More...
 

Macro Definition Documentation

#define MAX_SERVICES   16

Definition at line 227 of file scv_util.c.

#define TEST_PROFILE_REFRESH   2
#define TEST_PROFILE_RENEW   1

Function Documentation

clib_error_t* clear_scv_profile_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)

Definition at line 229 of file scv_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void clear_scv_profiles ( )

Definition at line 255 of file scv_util.c.

+ Here is the call graph for this function:

static u64 sc_update_cumulative ( u64  cumulative,
u64  random,
u64  secret_share,
u64  prime,
u64  lpc,
u64  pre_split,
double  prime_inv 
)
inlinestatic

Definition at line 118 of file scv_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8 sc_validate ( u64  secret,
u64  prime,
double  prime_inv,
u64  cumulative,
u64  random 
)
static

Definition at line 151 of file scv_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u64 scv_generate_random ( scv_profile profile)

Definition at line 181 of file scv_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8 scv_get_max_profiles ( void  )

Definition at line 47 of file scv_util.c.

+ Here is the caller graph for this function:

void scv_init ( u8 path_name,
u8  max,
u8  indx 
)

Definition at line 64 of file scv_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void scv_profile_cleanup ( scv_profile profile)

Definition at line 84 of file scv_util.c.

+ Here is the caller graph for this function:

void scv_profile_create ( scv_profile profile,
u64  prime,
u64  poly2,
u64  lpc,
u64  secret_share,
u64  validity 
)

Definition at line 92 of file scv_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

scv_profile* scv_profile_find ( u16  id)

Definition at line 52 of file scv_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void scv_profile_init ( scv_profile new,
u16  id 
)
static

Definition at line 35 of file scv_util.c.

+ Here is the caller graph for this function:

void scv_profile_set_bit_mask ( scv_profile profile,
u16  bits 
)

Definition at line 211 of file scv_util.c.

+ Here is the caller graph for this function:

void scv_set_validator ( scv_profile profile,
u64  key 
)

Definition at line 109 of file scv_util.c.

+ Here is the caller graph for this function:

u64 scv_update_cumulative ( scv_profile profile,
u64  cumulative,
u64  random 
)

Definition at line 140 of file scv_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8 scv_validate ( scv_profile profile,
u64  cumulative,
u64  random 
)

Definition at line 168 of file scv_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* set_scv_init_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 461 of file scv_util.c.

+ Here is the call graph for this function:

static clib_error_t* set_scv_profile_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 267 of file scv_util.c.

+ Here is the call graph for this function:

static clib_error_t* show_scv_profile_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 330 of file scv_util.c.

+ Here is the call graph for this function:

static clib_error_t* test_profile_renew_refresh_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 403 of file scv_util.c.

+ Here is the call graph for this function:

Variable Documentation

u8 chain_path_name[PATH_NAME_SIZE]

Definition at line 26 of file scv_util.c.

vlib_cli_command_t clear_scv_profile_command
Initial value:
=
{
.path = "clear scv profile",
.short_help = "clear scv profile [<index>|all]",
}
clib_error_t * clear_scv_profile_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: scv_util.c:229

(constructor) VLIB_CLI_COMMAND (clear_scv_profile_command)

Definition at line 260 of file scv_util.c.

vlib_main_t* gvm = 0

Definition at line 33 of file scv_util.c.

u16 invalid_profile_start_index = 0

Definition at line 29 of file scv_util.c.

u8 max_profiles = 0

Definition at line 28 of file scv_util.c.

f64 next_time_to_send = 0

Definition at line 31 of file scv_util.c.

u8 number_of_invalid_profiles = 0

Definition at line 30 of file scv_util.c.

scv_profile* pow_profile = NULL

Definition at line 23 of file scv_util.c.

u16 pow_profile_index = 0

Definition at line 24 of file scv_util.c.

Definition at line 27 of file scv_util.c.

u8 sc_init_done = 0

Definition at line 63 of file scv_util.c.

vlib_cli_command_t set_ioam_sc_init_command
Initial value:
=
{
.path = "set scv-init ",
.short_help =
"set scv-init path-name <string> start-index <index> num-profiles <number>",
.function = set_scv_init_fn,
}
static clib_error_t * set_scv_init_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: scv_util.c:461

(constructor) VLIB_CLI_COMMAND (set_ioam_sc_init_command)

Definition at line 480 of file scv_util.c.

vlib_cli_command_t set_scv_profile_command
Initial value:
=
{
.path = "set scv profile",
.short_help = "set scv profile id [0-16] [validator-key 0xu64] \
prime-number 0xu64 secret_share 0xu64 lpc 0xu64 \
polynomial2 0xu64 bits-in-random [0-64] ",
}
static clib_error_t * set_scv_profile_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: scv_util.c:267

(constructor) VLIB_CLI_COMMAND (set_scv_profile_command)

Definition at line 321 of file scv_util.c.

vlib_cli_command_t show_scv_profile_command
Initial value:
=
{
.path = "show scv profile",
.short_help = "show scv profile",
}
static clib_error_t * show_scv_profile_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: scv_util.c:330

(constructor) VLIB_CLI_COMMAND (show_scv_profile_command)

Definition at line 396 of file scv_util.c.

vlib_cli_command_t test_ioam_profile_renew_refresh_cmd
Initial value:
=
{
.path = "test ioam profile-notification ",
.short_help =
"test ioam profile-notification path-name <string> start-index <index> num-profiles <number> <renew|refresh>",
}
static clib_error_t * test_profile_renew_refresh_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: scv_util.c:403

(constructor) VLIB_CLI_COMMAND (test_ioam_profile_renew_refresh_cmd)

Definition at line 453 of file scv_util.c.

u32 time_exponent = 1

Definition at line 32 of file scv_util.c.

u64 total_pkts_using_this_profile = 0

Definition at line 25 of file scv_util.c.