cmdline: avoid name clash with Windows system types
cmdline_numtype member names clash with Windows system identifiers. Add RTE_ prefix to cmdline constants to avoid this and possible future conflicts. Suggested-by: Ranjit Menon <ranjit.menon@intel.com> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> Acked-by: Ranjit Menon <ranjit.menon@intel.com> Acked-by: Jie Zhou <jizh@microsoft.com> Tested-by: Jie Zhou <jizh@microsoft.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
This commit is contained in:
parent
924e8e1a29
commit
c2341bb671
@ -193,7 +193,7 @@ cmd_num_parsed(void *parsed_result,
|
||||
}
|
||||
|
||||
cmdline_parse_token_num_t cmd_num_tok =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_num_result, num, UINT32);
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_num_result, num, RTE_UINT32);
|
||||
|
||||
cmdline_parse_inst_t cmd_num = {
|
||||
.f = cmd_num_parsed, /* function to call */
|
||||
|
@ -124,9 +124,9 @@ cmdline_parse_token_string_t cmd_load_bpf_dir =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_bpf_ld_result,
|
||||
dir, "rx#tx");
|
||||
cmdline_parse_token_num_t cmd_load_bpf_port =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_bpf_ld_result, port, UINT8);
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_bpf_ld_result, port, RTE_UINT8);
|
||||
cmdline_parse_token_num_t cmd_load_bpf_queue =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_bpf_ld_result, queue, UINT16);
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_bpf_ld_result, queue, RTE_UINT16);
|
||||
cmdline_parse_token_string_t cmd_load_bpf_flags =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_bpf_ld_result,
|
||||
flags, NULL);
|
||||
@ -180,9 +180,9 @@ cmdline_parse_token_string_t cmd_unload_bpf_dir =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_bpf_unld_result,
|
||||
dir, "rx#tx");
|
||||
cmdline_parse_token_num_t cmd_unload_bpf_port =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_bpf_unld_result, port, UINT8);
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_bpf_unld_result, port, RTE_UINT8);
|
||||
cmdline_parse_token_num_t cmd_unload_bpf_queue =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_bpf_unld_result, queue, UINT16);
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_bpf_unld_result, queue, RTE_UINT16);
|
||||
|
||||
cmdline_parse_inst_t cmd_operate_bpf_unld_parse = {
|
||||
.f = cmd_operate_bpf_unld_parsed,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -7838,7 +7838,7 @@ cmdline_parse_token_string_t cmd_show_set_raw_cmd_what =
|
||||
cmd_what, "raw_encap#raw_decap");
|
||||
cmdline_parse_token_num_t cmd_show_set_raw_cmd_index =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_show_set_raw_result,
|
||||
cmd_index, UINT16);
|
||||
cmd_index, RTE_UINT16);
|
||||
cmdline_parse_token_string_t cmd_show_set_raw_cmd_all =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_show_set_raw_result,
|
||||
cmd_all, "all");
|
||||
|
@ -253,7 +253,7 @@ cmdline_parse_token_string_t cmd_show_port_meter_cap_cap =
|
||||
struct cmd_show_port_meter_cap_result, cap, "cap");
|
||||
cmdline_parse_token_num_t cmd_show_port_meter_cap_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_show_port_meter_cap_result, port_id, UINT16);
|
||||
struct cmd_show_port_meter_cap_result, port_id, RTE_UINT16);
|
||||
|
||||
static void cmd_show_port_meter_cap_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -359,23 +359,23 @@ cmdline_parse_token_string_t cmd_add_port_meter_profile_srtcm_srtcm_rfc2697 =
|
||||
cmdline_parse_token_num_t cmd_add_port_meter_profile_srtcm_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_meter_profile_srtcm_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_add_port_meter_profile_srtcm_profile_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_meter_profile_srtcm_result,
|
||||
profile_id, UINT32);
|
||||
profile_id, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_meter_profile_srtcm_cir =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_meter_profile_srtcm_result,
|
||||
cir, UINT64);
|
||||
cir, RTE_UINT64);
|
||||
cmdline_parse_token_num_t cmd_add_port_meter_profile_srtcm_cbs =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_meter_profile_srtcm_result,
|
||||
cbs, UINT64);
|
||||
cbs, RTE_UINT64);
|
||||
cmdline_parse_token_num_t cmd_add_port_meter_profile_srtcm_ebs =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_meter_profile_srtcm_result,
|
||||
ebs, UINT64);
|
||||
ebs, RTE_UINT64);
|
||||
|
||||
static void cmd_add_port_meter_profile_srtcm_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -461,27 +461,27 @@ cmdline_parse_token_string_t cmd_add_port_meter_profile_trtcm_trtcm_rfc2698 =
|
||||
cmdline_parse_token_num_t cmd_add_port_meter_profile_trtcm_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_meter_profile_trtcm_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_add_port_meter_profile_trtcm_profile_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_meter_profile_trtcm_result,
|
||||
profile_id, UINT32);
|
||||
profile_id, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_meter_profile_trtcm_cir =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_meter_profile_trtcm_result,
|
||||
cir, UINT64);
|
||||
cir, RTE_UINT64);
|
||||
cmdline_parse_token_num_t cmd_add_port_meter_profile_trtcm_pir =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_meter_profile_trtcm_result,
|
||||
pir, UINT64);
|
||||
pir, RTE_UINT64);
|
||||
cmdline_parse_token_num_t cmd_add_port_meter_profile_trtcm_cbs =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_meter_profile_trtcm_result,
|
||||
cbs, UINT64);
|
||||
cbs, RTE_UINT64);
|
||||
cmdline_parse_token_num_t cmd_add_port_meter_profile_trtcm_pbs =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_meter_profile_trtcm_result,
|
||||
pbs, UINT64);
|
||||
pbs, RTE_UINT64);
|
||||
|
||||
static void cmd_add_port_meter_profile_trtcm_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -571,27 +571,27 @@ cmdline_parse_token_string_t
|
||||
cmdline_parse_token_num_t cmd_add_port_meter_profile_trtcm_rfc4115_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_meter_profile_trtcm_rfc4115_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_add_port_meter_profile_trtcm_rfc4115_profile_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_meter_profile_trtcm_rfc4115_result,
|
||||
profile_id, UINT32);
|
||||
profile_id, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_meter_profile_trtcm_rfc4115_cir =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_meter_profile_trtcm_rfc4115_result,
|
||||
cir, UINT64);
|
||||
cir, RTE_UINT64);
|
||||
cmdline_parse_token_num_t cmd_add_port_meter_profile_trtcm_rfc4115_eir =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_meter_profile_trtcm_rfc4115_result,
|
||||
eir, UINT64);
|
||||
eir, RTE_UINT64);
|
||||
cmdline_parse_token_num_t cmd_add_port_meter_profile_trtcm_rfc4115_cbs =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_meter_profile_trtcm_rfc4115_result,
|
||||
cbs, UINT64);
|
||||
cbs, RTE_UINT64);
|
||||
cmdline_parse_token_num_t cmd_add_port_meter_profile_trtcm_rfc4115_ebs =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_meter_profile_trtcm_rfc4115_result,
|
||||
ebs, UINT64);
|
||||
ebs, RTE_UINT64);
|
||||
|
||||
static void cmd_add_port_meter_profile_trtcm_rfc4115_parsed(
|
||||
void *parsed_result,
|
||||
@ -672,11 +672,11 @@ cmdline_parse_token_string_t cmd_del_port_meter_profile_profile =
|
||||
cmdline_parse_token_num_t cmd_del_port_meter_profile_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_del_port_meter_profile_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_del_port_meter_profile_profile_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_del_port_meter_profile_result,
|
||||
profile_id, UINT32);
|
||||
profile_id, RTE_UINT32);
|
||||
|
||||
static void cmd_del_port_meter_profile_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -742,13 +742,13 @@ cmdline_parse_token_string_t cmd_create_port_meter_meter =
|
||||
struct cmd_create_port_meter_result, meter, "meter");
|
||||
cmdline_parse_token_num_t cmd_create_port_meter_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_create_port_meter_result, port_id, UINT16);
|
||||
struct cmd_create_port_meter_result, port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_create_port_meter_mtr_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_create_port_meter_result, mtr_id, UINT32);
|
||||
struct cmd_create_port_meter_result, mtr_id, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_create_port_meter_profile_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_create_port_meter_result, profile_id, UINT32);
|
||||
struct cmd_create_port_meter_result, profile_id, RTE_UINT32);
|
||||
cmdline_parse_token_string_t cmd_create_port_meter_meter_enable =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_create_port_meter_result,
|
||||
meter_enable, "yes#no");
|
||||
@ -763,10 +763,10 @@ cmdline_parse_token_string_t cmd_create_port_meter_r_action =
|
||||
r_action, "R#Y#G#D#r#y#g#d");
|
||||
cmdline_parse_token_num_t cmd_create_port_meter_statistics_mask =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_create_port_meter_result,
|
||||
statistics_mask, UINT64);
|
||||
statistics_mask, RTE_UINT64);
|
||||
cmdline_parse_token_num_t cmd_create_port_meter_shared =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_create_port_meter_result,
|
||||
shared, UINT32);
|
||||
shared, RTE_UINT32);
|
||||
cmdline_parse_token_string_t cmd_create_port_meter_input_color =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_create_port_meter_result,
|
||||
meter_input_color, TOKEN_STRING_MULTI);
|
||||
@ -866,10 +866,10 @@ cmdline_parse_token_string_t cmd_enable_port_meter_meter =
|
||||
struct cmd_enable_port_meter_result, meter, "meter");
|
||||
cmdline_parse_token_num_t cmd_enable_port_meter_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_enable_port_meter_result, port_id, UINT16);
|
||||
struct cmd_enable_port_meter_result, port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_enable_port_meter_mtr_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_enable_port_meter_result, mtr_id, UINT32);
|
||||
struct cmd_enable_port_meter_result, mtr_id, RTE_UINT32);
|
||||
|
||||
static void cmd_enable_port_meter_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -927,10 +927,10 @@ cmdline_parse_token_string_t cmd_disable_port_meter_meter =
|
||||
struct cmd_disable_port_meter_result, meter, "meter");
|
||||
cmdline_parse_token_num_t cmd_disable_port_meter_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_disable_port_meter_result, port_id, UINT16);
|
||||
struct cmd_disable_port_meter_result, port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_disable_port_meter_mtr_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_disable_port_meter_result, mtr_id, UINT32);
|
||||
struct cmd_disable_port_meter_result, mtr_id, RTE_UINT32);
|
||||
|
||||
static void cmd_disable_port_meter_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -988,10 +988,10 @@ cmdline_parse_token_string_t cmd_del_port_meter_meter =
|
||||
struct cmd_del_port_meter_result, meter, "meter");
|
||||
cmdline_parse_token_num_t cmd_del_port_meter_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_del_port_meter_result, port_id, UINT16);
|
||||
struct cmd_del_port_meter_result, port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_del_port_meter_mtr_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_del_port_meter_result, mtr_id, UINT32);
|
||||
struct cmd_del_port_meter_result, mtr_id, RTE_UINT32);
|
||||
|
||||
static void cmd_del_port_meter_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -1054,13 +1054,16 @@ cmdline_parse_token_string_t cmd_set_port_meter_profile_profile =
|
||||
struct cmd_set_port_meter_profile_result, profile, "profile");
|
||||
cmdline_parse_token_num_t cmd_set_port_meter_profile_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_set_port_meter_profile_result, port_id, UINT16);
|
||||
struct cmd_set_port_meter_profile_result, port_id,
|
||||
RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_set_port_meter_profile_mtr_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_set_port_meter_profile_result, mtr_id, UINT32);
|
||||
struct cmd_set_port_meter_profile_result, mtr_id,
|
||||
RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_set_port_meter_profile_profile_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_set_port_meter_profile_result, profile_id, UINT32);
|
||||
struct cmd_set_port_meter_profile_result, profile_id,
|
||||
RTE_UINT32);
|
||||
|
||||
static void cmd_set_port_meter_profile_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -1208,15 +1211,15 @@ cmdline_parse_token_string_t cmd_set_port_meter_policer_action_action =
|
||||
cmdline_parse_token_num_t cmd_set_port_meter_policer_action_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_set_port_meter_policer_action_result, port_id,
|
||||
UINT16);
|
||||
RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_set_port_meter_policer_action_mtr_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_set_port_meter_policer_action_result, mtr_id,
|
||||
UINT32);
|
||||
RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_set_port_meter_policer_action_action_mask =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_set_port_meter_policer_action_result, action_mask,
|
||||
UINT32);
|
||||
RTE_UINT32);
|
||||
cmdline_parse_token_string_t cmd_set_port_meter_policer_action_policer_action =
|
||||
TOKEN_STRING_INITIALIZER(
|
||||
struct cmd_set_port_meter_policer_action_result,
|
||||
@ -1317,14 +1320,16 @@ cmdline_parse_token_string_t cmd_set_port_meter_stats_mask_mask =
|
||||
struct cmd_set_port_meter_stats_mask_result, mask, "mask");
|
||||
cmdline_parse_token_num_t cmd_set_port_meter_stats_mask_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_set_port_meter_stats_mask_result, port_id, UINT16);
|
||||
struct cmd_set_port_meter_stats_mask_result, port_id,
|
||||
RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_set_port_meter_stats_mask_mtr_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_set_port_meter_stats_mask_result, mtr_id, UINT32);
|
||||
struct cmd_set_port_meter_stats_mask_result, mtr_id,
|
||||
RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_set_port_meter_stats_mask_stats_mask =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_set_port_meter_stats_mask_result, stats_mask,
|
||||
UINT64);
|
||||
RTE_UINT64);
|
||||
|
||||
static void cmd_set_port_meter_stats_mask_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -1389,10 +1394,10 @@ cmdline_parse_token_string_t cmd_show_port_meter_stats_stats =
|
||||
struct cmd_show_port_meter_stats_result, stats, "stats");
|
||||
cmdline_parse_token_num_t cmd_show_port_meter_stats_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_show_port_meter_stats_result, port_id, UINT16);
|
||||
struct cmd_show_port_meter_stats_result, port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_show_port_meter_stats_mtr_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_show_port_meter_stats_result, mtr_id, UINT32);
|
||||
struct cmd_show_port_meter_stats_result, mtr_id, RTE_UINT32);
|
||||
cmdline_parse_token_string_t cmd_show_port_meter_stats_clear =
|
||||
TOKEN_STRING_INITIALIZER(
|
||||
struct cmd_show_port_meter_stats_result, clear, "yes#no");
|
||||
|
@ -219,7 +219,7 @@ cmdline_parse_token_string_t cmd_show_port_tm_cap_cap =
|
||||
cap, "cap");
|
||||
cmdline_parse_token_num_t cmd_show_port_tm_cap_port_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_show_port_tm_cap_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
|
||||
static void cmd_show_port_tm_cap_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -368,10 +368,10 @@ cmdline_parse_token_string_t cmd_show_port_tm_level_cap_cap =
|
||||
cap, "cap");
|
||||
cmdline_parse_token_num_t cmd_show_port_tm_level_cap_port_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_show_port_tm_level_cap_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_show_port_tm_level_cap_level_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_show_port_tm_level_cap_result,
|
||||
level_id, UINT32);
|
||||
level_id, RTE_UINT32);
|
||||
|
||||
|
||||
static void cmd_show_port_tm_level_cap_parsed(void *parsed_result,
|
||||
@ -518,10 +518,10 @@ cmdline_parse_token_string_t cmd_show_port_tm_node_cap_cap =
|
||||
cap, "cap");
|
||||
cmdline_parse_token_num_t cmd_show_port_tm_node_cap_port_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_show_port_tm_node_cap_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_show_port_tm_node_cap_node_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_show_port_tm_node_cap_result,
|
||||
node_id, UINT32);
|
||||
node_id, RTE_UINT32);
|
||||
|
||||
static void cmd_show_port_tm_node_cap_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -642,14 +642,14 @@ cmdline_parse_token_string_t cmd_show_port_tm_node_stats_stats =
|
||||
struct cmd_show_port_tm_node_stats_result, stats, "stats");
|
||||
cmdline_parse_token_num_t cmd_show_port_tm_node_stats_port_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_show_port_tm_node_stats_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_show_port_tm_node_stats_node_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_show_port_tm_node_stats_result,
|
||||
node_id, UINT32);
|
||||
node_id, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_show_port_tm_node_stats_clear =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_show_port_tm_node_stats_result, clear, UINT32);
|
||||
struct cmd_show_port_tm_node_stats_result, clear, RTE_UINT32);
|
||||
|
||||
static void cmd_show_port_tm_node_stats_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -761,11 +761,11 @@ cmdline_parse_token_string_t cmd_show_port_tm_node_type_type =
|
||||
cmdline_parse_token_num_t cmd_show_port_tm_node_type_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_show_port_tm_node_type_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_show_port_tm_node_type_node_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_show_port_tm_node_type_result,
|
||||
node_id, UINT32);
|
||||
node_id, RTE_UINT32);
|
||||
|
||||
static void cmd_show_port_tm_node_type_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -854,35 +854,35 @@ cmdline_parse_token_string_t cmd_add_port_tm_node_shaper_profile_profile =
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_shaper_profile_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_shaper_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_shaper_profile_result,
|
||||
shaper_id, UINT32);
|
||||
shaper_id, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_cmit_tb_rate =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_shaper_profile_result,
|
||||
cmit_tb_rate, UINT64);
|
||||
cmit_tb_rate, RTE_UINT64);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_cmit_tb_size =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_shaper_profile_result,
|
||||
cmit_tb_size, UINT64);
|
||||
cmit_tb_size, RTE_UINT64);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_peak_tb_rate =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_shaper_profile_result,
|
||||
peak_tb_rate, UINT64);
|
||||
peak_tb_rate, RTE_UINT64);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_peak_tb_size =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_shaper_profile_result,
|
||||
peak_tb_size, UINT64);
|
||||
peak_tb_size, RTE_UINT64);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_pktlen_adjust =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_shaper_profile_result,
|
||||
pktlen_adjust, UINT32);
|
||||
pktlen_adjust, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_packet_mode =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_shaper_profile_result,
|
||||
pkt_mode, UINT32);
|
||||
pkt_mode, RTE_UINT32);
|
||||
|
||||
static void cmd_add_port_tm_node_shaper_profile_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -976,11 +976,11 @@ cmdline_parse_token_string_t cmd_del_port_tm_node_shaper_profile_profile =
|
||||
cmdline_parse_token_num_t cmd_del_port_tm_node_shaper_profile_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_del_port_tm_node_shaper_profile_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_del_port_tm_node_shaper_profile_shaper_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_del_port_tm_node_shaper_profile_result,
|
||||
shaper_id, UINT32);
|
||||
shaper_id, RTE_UINT32);
|
||||
|
||||
static void cmd_del_port_tm_node_shaper_profile_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -1057,15 +1057,15 @@ cmdline_parse_token_string_t cmd_add_port_tm_node_shared_shaper_shaper =
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_shared_shaper_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_shared_shaper_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_shared_shaper_shared_shaper_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_shared_shaper_result,
|
||||
shared_shaper_id, UINT32);
|
||||
shared_shaper_id, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_shared_shaper_shaper_profile_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_shared_shaper_result,
|
||||
shaper_profile_id, UINT32);
|
||||
shaper_profile_id, RTE_UINT32);
|
||||
|
||||
static void cmd_add_port_tm_node_shared_shaper_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -1157,11 +1157,11 @@ cmdline_parse_token_string_t cmd_del_port_tm_node_shared_shaper_shaper =
|
||||
cmdline_parse_token_num_t cmd_del_port_tm_node_shared_shaper_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_del_port_tm_node_shared_shaper_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_del_port_tm_node_shared_shaper_shared_shaper_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_del_port_tm_node_shared_shaper_result,
|
||||
shared_shaper_id, UINT32);
|
||||
shared_shaper_id, RTE_UINT32);
|
||||
|
||||
static void cmd_del_port_tm_node_shared_shaper_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -1250,11 +1250,11 @@ cmdline_parse_token_string_t cmd_add_port_tm_node_wred_profile_profile =
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_wred_profile_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_wred_profile_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_wred_profile_result,
|
||||
wred_profile_id, UINT32);
|
||||
wred_profile_id, RTE_UINT32);
|
||||
cmdline_parse_token_string_t cmd_add_port_tm_node_wred_profile_color_g =
|
||||
TOKEN_STRING_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_wred_profile_result,
|
||||
@ -1262,19 +1262,19 @@ cmdline_parse_token_string_t cmd_add_port_tm_node_wred_profile_color_g =
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_min_th_g =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_wred_profile_result,
|
||||
min_th_g, UINT64);
|
||||
min_th_g, RTE_UINT64);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_max_th_g =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_wred_profile_result,
|
||||
max_th_g, UINT64);
|
||||
max_th_g, RTE_UINT64);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_maxp_inv_g =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_wred_profile_result,
|
||||
maxp_inv_g, UINT16);
|
||||
maxp_inv_g, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_wq_log2_g =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_wred_profile_result,
|
||||
wq_log2_g, UINT16);
|
||||
wq_log2_g, RTE_UINT16);
|
||||
cmdline_parse_token_string_t cmd_add_port_tm_node_wred_profile_color_y =
|
||||
TOKEN_STRING_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_wred_profile_result,
|
||||
@ -1282,19 +1282,19 @@ cmdline_parse_token_string_t cmd_add_port_tm_node_wred_profile_color_y =
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_min_th_y =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_wred_profile_result,
|
||||
min_th_y, UINT64);
|
||||
min_th_y, RTE_UINT64);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_max_th_y =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_wred_profile_result,
|
||||
max_th_y, UINT64);
|
||||
max_th_y, RTE_UINT64);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_maxp_inv_y =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_wred_profile_result,
|
||||
maxp_inv_y, UINT16);
|
||||
maxp_inv_y, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_wq_log2_y =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_wred_profile_result,
|
||||
wq_log2_y, UINT16);
|
||||
wq_log2_y, RTE_UINT16);
|
||||
cmdline_parse_token_string_t cmd_add_port_tm_node_wred_profile_color_r =
|
||||
TOKEN_STRING_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_wred_profile_result,
|
||||
@ -1302,19 +1302,19 @@ cmdline_parse_token_string_t cmd_add_port_tm_node_wred_profile_color_r =
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_min_th_r =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_wred_profile_result,
|
||||
min_th_r, UINT64);
|
||||
min_th_r, RTE_UINT64);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_max_th_r =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_wred_profile_result,
|
||||
max_th_r, UINT64);
|
||||
max_th_r, RTE_UINT64);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_maxp_inv_r =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_wred_profile_result,
|
||||
maxp_inv_r, UINT16);
|
||||
maxp_inv_r, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_wq_log2_r =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_node_wred_profile_result,
|
||||
wq_log2_r, UINT16);
|
||||
wq_log2_r, RTE_UINT16);
|
||||
|
||||
|
||||
static void cmd_add_port_tm_node_wred_profile_parsed(void *parsed_result,
|
||||
@ -1430,11 +1430,11 @@ cmdline_parse_token_string_t cmd_del_port_tm_node_wred_profile_profile =
|
||||
cmdline_parse_token_num_t cmd_del_port_tm_node_wred_profile_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_del_port_tm_node_wred_profile_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_del_port_tm_node_wred_profile_wred_profile_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_del_port_tm_node_wred_profile_result,
|
||||
wred_profile_id, UINT32);
|
||||
wred_profile_id, RTE_UINT32);
|
||||
|
||||
static void cmd_del_port_tm_node_wred_profile_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -1512,15 +1512,15 @@ cmdline_parse_token_string_t cmd_set_port_tm_node_shaper_profile_profile =
|
||||
cmdline_parse_token_num_t cmd_set_port_tm_node_shaper_profile_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_set_port_tm_node_shaper_profile_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_set_port_tm_node_shaper_profile_node_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_set_port_tm_node_shaper_profile_result,
|
||||
node_id, UINT32);
|
||||
node_id, RTE_UINT32);
|
||||
cmdline_parse_token_num_t
|
||||
cmd_set_port_tm_node_shaper_shaper_profile_profile_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_set_port_tm_node_shaper_profile_result,
|
||||
shaper_profile_id, UINT32);
|
||||
shaper_profile_id, RTE_UINT32);
|
||||
|
||||
static void cmd_set_port_tm_node_shaper_profile_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -1606,31 +1606,31 @@ cmdline_parse_token_string_t cmd_add_port_tm_nonleaf_node_node =
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_nonleaf_node_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_nonleaf_node_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_nonleaf_node_node_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_nonleaf_node_result,
|
||||
node_id, UINT32);
|
||||
node_id, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_nonleaf_node_parent_node_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_nonleaf_node_result,
|
||||
parent_node_id, INT32);
|
||||
parent_node_id, RTE_INT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_nonleaf_node_priority =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_nonleaf_node_result,
|
||||
priority, UINT32);
|
||||
priority, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_nonleaf_node_weight =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_nonleaf_node_result,
|
||||
weight, UINT32);
|
||||
weight, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_nonleaf_node_level_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_nonleaf_node_result,
|
||||
level_id, UINT32);
|
||||
level_id, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_nonleaf_node_shaper_profile_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_nonleaf_node_result,
|
||||
shaper_profile_id, INT32);
|
||||
shaper_profile_id, RTE_INT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_nonleaf_node_n_sp_priorities =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_nonleaf_node_result,
|
||||
n_sp_priorities, UINT32);
|
||||
n_sp_priorities, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_nonleaf_node_stats_mask =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_nonleaf_node_result,
|
||||
stats_mask, UINT64);
|
||||
stats_mask, RTE_UINT64);
|
||||
cmdline_parse_token_string_t
|
||||
cmd_add_port_tm_nonleaf_node_multi_shared_shaper_id =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_add_port_tm_nonleaf_node_result,
|
||||
@ -1767,31 +1767,31 @@ cmdline_parse_token_string_t cmd_add_port_tm_nonleaf_node_pmode_pktmode =
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_nonleaf_node_pmode_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_add_port_tm_nonleaf_node_pmode_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_nonleaf_node_pmode_node_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_nonleaf_node_pmode_result,
|
||||
node_id, UINT32);
|
||||
node_id, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_nonleaf_node_pmode_parent_node_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_nonleaf_node_pmode_result,
|
||||
parent_node_id, INT32);
|
||||
parent_node_id, RTE_INT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_nonleaf_node_pmode_priority =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_nonleaf_node_pmode_result,
|
||||
priority, UINT32);
|
||||
priority, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_nonleaf_node_pmode_weight =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_nonleaf_node_pmode_result,
|
||||
weight, UINT32);
|
||||
weight, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_nonleaf_node_pmode_level_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_nonleaf_node_pmode_result,
|
||||
level_id, UINT32);
|
||||
level_id, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_nonleaf_node_pmode_shaper_profile_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_nonleaf_node_pmode_result,
|
||||
shaper_profile_id, INT32);
|
||||
shaper_profile_id, RTE_INT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_nonleaf_node_pmode_n_sp_priorities =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_nonleaf_node_pmode_result,
|
||||
n_sp_priorities, UINT32);
|
||||
n_sp_priorities, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_nonleaf_node_pmode_stats_mask =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_nonleaf_node_pmode_result,
|
||||
stats_mask, UINT64);
|
||||
stats_mask, RTE_UINT64);
|
||||
cmdline_parse_token_string_t
|
||||
cmd_add_port_tm_nonleaf_node_pmode_multi_shrd_shpr_id =
|
||||
TOKEN_STRING_INITIALIZER(
|
||||
@ -1930,34 +1930,34 @@ cmdline_parse_token_string_t cmd_add_port_tm_leaf_node_node =
|
||||
struct cmd_add_port_tm_leaf_node_result, node, "node");
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_leaf_node_port_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_leaf_node_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_leaf_node_node_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_leaf_node_result,
|
||||
node_id, UINT32);
|
||||
node_id, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_leaf_node_parent_node_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_leaf_node_result,
|
||||
parent_node_id, INT32);
|
||||
parent_node_id, RTE_INT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_leaf_node_priority =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_leaf_node_result,
|
||||
priority, UINT32);
|
||||
priority, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_leaf_node_weight =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_leaf_node_result,
|
||||
weight, UINT32);
|
||||
weight, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_leaf_node_level_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_leaf_node_result,
|
||||
level_id, UINT32);
|
||||
level_id, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_leaf_node_shaper_profile_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_leaf_node_result,
|
||||
shaper_profile_id, INT32);
|
||||
shaper_profile_id, RTE_INT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_leaf_node_cman_mode =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_leaf_node_result,
|
||||
cman_mode, UINT32);
|
||||
cman_mode, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_leaf_node_wred_profile_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_leaf_node_result,
|
||||
wred_profile_id, UINT32);
|
||||
wred_profile_id, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_add_port_tm_leaf_node_stats_mask =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_add_port_tm_leaf_node_result,
|
||||
stats_mask, UINT64);
|
||||
stats_mask, RTE_UINT64);
|
||||
cmdline_parse_token_string_t
|
||||
cmd_add_port_tm_leaf_node_multi_shared_shaper_id =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_add_port_tm_leaf_node_result,
|
||||
@ -2080,10 +2080,10 @@ cmdline_parse_token_string_t cmd_del_port_tm_node_node =
|
||||
struct cmd_del_port_tm_node_result, node, "node");
|
||||
cmdline_parse_token_num_t cmd_del_port_tm_node_port_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_del_port_tm_node_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_del_port_tm_node_node_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_del_port_tm_node_result,
|
||||
node_id, UINT32);
|
||||
node_id, RTE_UINT32);
|
||||
|
||||
static void cmd_del_port_tm_node_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -2158,19 +2158,21 @@ cmdline_parse_token_string_t cmd_set_port_tm_node_parent_parent =
|
||||
struct cmd_set_port_tm_node_parent_result, parent, "parent");
|
||||
cmdline_parse_token_num_t cmd_set_port_tm_node_parent_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_set_port_tm_node_parent_result, port_id, UINT16);
|
||||
struct cmd_set_port_tm_node_parent_result, port_id,
|
||||
RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_set_port_tm_node_parent_node_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_set_port_tm_node_parent_result, node_id, UINT32);
|
||||
struct cmd_set_port_tm_node_parent_result, node_id,
|
||||
RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_set_port_tm_node_parent_parent_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_set_port_tm_node_parent_result,
|
||||
parent_id, UINT32);
|
||||
parent_id, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_set_port_tm_node_parent_priority =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_set_port_tm_node_parent_result,
|
||||
priority, UINT32);
|
||||
priority, RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_set_port_tm_node_parent_weight =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_set_port_tm_node_parent_result,
|
||||
weight, UINT32);
|
||||
weight, RTE_UINT32);
|
||||
|
||||
static void cmd_set_port_tm_node_parent_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -2246,10 +2248,12 @@ cmdline_parse_token_string_t cmd_suspend_port_tm_node_node =
|
||||
struct cmd_suspend_port_tm_node_result, node, "node");
|
||||
cmdline_parse_token_num_t cmd_suspend_port_tm_node_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_suspend_port_tm_node_result, port_id, UINT16);
|
||||
struct cmd_suspend_port_tm_node_result, port_id,
|
||||
RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_suspend_port_tm_node_node_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_suspend_port_tm_node_result, node_id, UINT32);
|
||||
struct cmd_suspend_port_tm_node_result, node_id,
|
||||
RTE_UINT32);
|
||||
|
||||
static void cmd_suspend_port_tm_node_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -2311,10 +2315,10 @@ cmdline_parse_token_string_t cmd_resume_port_tm_node_node =
|
||||
struct cmd_resume_port_tm_node_result, node, "node");
|
||||
cmdline_parse_token_num_t cmd_resume_port_tm_node_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_resume_port_tm_node_result, port_id, UINT16);
|
||||
struct cmd_resume_port_tm_node_result, port_id, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_resume_port_tm_node_node_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_resume_port_tm_node_result, node_id, UINT32);
|
||||
struct cmd_resume_port_tm_node_result, node_id, RTE_UINT32);
|
||||
|
||||
static void cmd_resume_port_tm_node_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -2378,7 +2382,7 @@ cmdline_parse_token_string_t cmd_port_tm_hierarchy_commit_commit =
|
||||
cmdline_parse_token_num_t cmd_port_tm_hierarchy_commit_port_id =
|
||||
TOKEN_NUM_INITIALIZER(
|
||||
struct cmd_port_tm_hierarchy_commit_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
cmdline_parse_token_string_t cmd_port_tm_hierarchy_commit_clean_on_fail =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_port_tm_hierarchy_commit_result,
|
||||
clean_on_fail, "yes#no");
|
||||
@ -2458,17 +2462,17 @@ cmdline_parse_token_string_t cmd_port_tm_mark_ip_ecn_ip_ecn =
|
||||
ip_ecn, "ip_ecn");
|
||||
cmdline_parse_token_num_t cmd_port_tm_mark_ip_ecn_port_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_port_tm_mark_ip_ecn_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
|
||||
cmdline_parse_token_num_t cmd_port_tm_mark_ip_ecn_green =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_port_tm_mark_ip_ecn_result,
|
||||
green, UINT16);
|
||||
green, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_port_tm_mark_ip_ecn_yellow =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_port_tm_mark_ip_ecn_result,
|
||||
yellow, UINT16);
|
||||
yellow, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_port_tm_mark_ip_ecn_red =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_port_tm_mark_ip_ecn_result,
|
||||
red, UINT16);
|
||||
red, RTE_UINT16);
|
||||
|
||||
static void cmd_port_tm_mark_ip_ecn_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -2545,17 +2549,17 @@ cmdline_parse_token_string_t cmd_port_tm_mark_ip_dscp_ip_dscp =
|
||||
ip_dscp, "ip_dscp");
|
||||
cmdline_parse_token_num_t cmd_port_tm_mark_ip_dscp_port_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_port_tm_mark_ip_dscp_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
|
||||
cmdline_parse_token_num_t cmd_port_tm_mark_ip_dscp_green =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_port_tm_mark_ip_dscp_result,
|
||||
green, UINT16);
|
||||
green, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_port_tm_mark_ip_dscp_yellow =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_port_tm_mark_ip_dscp_result,
|
||||
yellow, UINT16);
|
||||
yellow, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_port_tm_mark_ip_dscp_red =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_port_tm_mark_ip_dscp_result,
|
||||
red, UINT16);
|
||||
red, RTE_UINT16);
|
||||
|
||||
static void cmd_port_tm_mark_ip_dscp_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
@ -2632,17 +2636,17 @@ cmdline_parse_token_string_t cmd_port_tm_mark_vlan_dei_vlan_dei =
|
||||
vlan_dei, "vlan_dei");
|
||||
cmdline_parse_token_num_t cmd_port_tm_mark_vlan_dei_port_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_port_tm_mark_vlan_dei_result,
|
||||
port_id, UINT16);
|
||||
port_id, RTE_UINT16);
|
||||
|
||||
cmdline_parse_token_num_t cmd_port_tm_mark_vlan_dei_green =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_port_tm_mark_vlan_dei_result,
|
||||
green, UINT16);
|
||||
green, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_port_tm_mark_vlan_dei_yellow =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_port_tm_mark_vlan_dei_result,
|
||||
yellow, UINT16);
|
||||
yellow, RTE_UINT16);
|
||||
cmdline_parse_token_num_t cmd_port_tm_mark_vlan_dei_red =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_port_tm_mark_vlan_dei_result,
|
||||
red, UINT16);
|
||||
red, RTE_UINT16);
|
||||
|
||||
static void cmd_port_tm_mark_vlan_dei_parsed(void *parsed_result,
|
||||
__rte_unused struct cmdline *cl,
|
||||
|
@ -220,31 +220,31 @@ static int
|
||||
can_parse_unsigned(uint64_t expected_result, enum cmdline_numtype type)
|
||||
{
|
||||
switch (type) {
|
||||
case UINT8:
|
||||
case RTE_UINT8:
|
||||
if (expected_result > UINT8_MAX)
|
||||
return 0;
|
||||
break;
|
||||
case UINT16:
|
||||
case RTE_UINT16:
|
||||
if (expected_result > UINT16_MAX)
|
||||
return 0;
|
||||
break;
|
||||
case UINT32:
|
||||
case RTE_UINT32:
|
||||
if (expected_result > UINT32_MAX)
|
||||
return 0;
|
||||
break;
|
||||
case INT8:
|
||||
case RTE_INT8:
|
||||
if (expected_result > INT8_MAX)
|
||||
return 0;
|
||||
break;
|
||||
case INT16:
|
||||
case RTE_INT16:
|
||||
if (expected_result > INT16_MAX)
|
||||
return 0;
|
||||
break;
|
||||
case INT32:
|
||||
case RTE_INT32:
|
||||
if (expected_result > INT32_MAX)
|
||||
return 0;
|
||||
break;
|
||||
case INT64:
|
||||
case RTE_INT64:
|
||||
if (expected_result > INT64_MAX)
|
||||
return 0;
|
||||
break;
|
||||
@ -258,31 +258,31 @@ static int
|
||||
can_parse_signed(int64_t expected_result, enum cmdline_numtype type)
|
||||
{
|
||||
switch (type) {
|
||||
case UINT8:
|
||||
case RTE_UINT8:
|
||||
if (expected_result > UINT8_MAX || expected_result < 0)
|
||||
return 0;
|
||||
break;
|
||||
case UINT16:
|
||||
case RTE_UINT16:
|
||||
if (expected_result > UINT16_MAX || expected_result < 0)
|
||||
return 0;
|
||||
break;
|
||||
case UINT32:
|
||||
case RTE_UINT32:
|
||||
if (expected_result > UINT32_MAX || expected_result < 0)
|
||||
return 0;
|
||||
break;
|
||||
case UINT64:
|
||||
case RTE_UINT64:
|
||||
if (expected_result < 0)
|
||||
return 0;
|
||||
break;
|
||||
case INT8:
|
||||
case RTE_INT8:
|
||||
if (expected_result > INT8_MAX || expected_result < INT8_MIN)
|
||||
return 0;
|
||||
break;
|
||||
case INT16:
|
||||
case RTE_INT16:
|
||||
if (expected_result > INT16_MAX || expected_result < INT16_MIN)
|
||||
return 0;
|
||||
break;
|
||||
case INT32:
|
||||
case RTE_INT32:
|
||||
if (expected_result > INT32_MAX || expected_result < INT32_MIN)
|
||||
return 0;
|
||||
break;
|
||||
@ -302,7 +302,7 @@ test_parse_num_invalid_param(void)
|
||||
int ret = 0;
|
||||
|
||||
/* set up a token */
|
||||
token.num_data.type = UINT32;
|
||||
token.num_data.type = RTE_UINT32;
|
||||
|
||||
/* copy string to buffer */
|
||||
strlcpy(buf, num_valid_positive_strs[0].str, sizeof(buf));
|
||||
@ -375,7 +375,7 @@ test_parse_num_invalid_data(void)
|
||||
cmdline_parse_token_num_t token;
|
||||
|
||||
/* cycle through all possible parsed types */
|
||||
for (type = UINT8; type <= INT64; type++) {
|
||||
for (type = RTE_UINT8; type <= RTE_INT64; type++) {
|
||||
token.num_data.type = type;
|
||||
|
||||
/* test full strings */
|
||||
@ -414,7 +414,7 @@ test_parse_num_valid(void)
|
||||
/** valid strings **/
|
||||
|
||||
/* cycle through all possible parsed types */
|
||||
for (type = UINT8; type <= INT64; type++) {
|
||||
for (type = RTE_UINT8; type <= RTE_INT64; type++) {
|
||||
token.num_data.type = type;
|
||||
|
||||
/* test positive strings */
|
||||
@ -468,13 +468,13 @@ test_parse_num_valid(void)
|
||||
if (ret > 0) {
|
||||
/* detect negative */
|
||||
switch (type) {
|
||||
case INT8:
|
||||
case RTE_INT8:
|
||||
result = (int8_t) result;
|
||||
break;
|
||||
case INT16:
|
||||
case RTE_INT16:
|
||||
result = (int16_t) result;
|
||||
break;
|
||||
case INT32:
|
||||
case RTE_INT32:
|
||||
result = (int32_t) result;
|
||||
break;
|
||||
default:
|
||||
@ -492,7 +492,7 @@ test_parse_num_valid(void)
|
||||
/** garbage strings **/
|
||||
|
||||
/* cycle through all possible parsed types */
|
||||
for (type = UINT8; type <= INT64; type++) {
|
||||
for (type = RTE_UINT8; type <= RTE_INT64; type++) {
|
||||
token.num_data.type = type;
|
||||
|
||||
/* test positive garbage strings */
|
||||
@ -546,15 +546,15 @@ test_parse_num_valid(void)
|
||||
if (ret > 0) {
|
||||
/* detect negative */
|
||||
switch (type) {
|
||||
case INT8:
|
||||
case RTE_INT8:
|
||||
if (result & (INT8_MAX + 1))
|
||||
result |= 0xFFFFFFFFFFFFFF00ULL;
|
||||
break;
|
||||
case INT16:
|
||||
case RTE_INT16:
|
||||
if (result & (INT16_MAX + 1))
|
||||
result |= 0xFFFFFFFFFFFF0000ULL;
|
||||
break;
|
||||
case INT32:
|
||||
case RTE_INT32:
|
||||
if (result & (INT32_MAX + 1ULL))
|
||||
result |= 0xFFFFFFFF00000000ULL;
|
||||
break;
|
||||
|
@ -70,7 +70,7 @@ cmdline_parse_token_string_t pcmd_rxmode_token_cmd =
|
||||
cmdline_parse_token_string_t pcmd_portstats_token_cmd =
|
||||
TOKEN_STRING_INITIALIZER(struct pcmd_int_params, cmd, "portstats");
|
||||
cmdline_parse_token_num_t pcmd_int_token_port =
|
||||
TOKEN_NUM_INITIALIZER(struct pcmd_int_params, port, UINT16);
|
||||
TOKEN_NUM_INITIALIZER(struct pcmd_int_params, port, RTE_UINT16);
|
||||
|
||||
/* Commands taking port id and string */
|
||||
cmdline_parse_token_string_t pcmd_eeprom_token_cmd =
|
||||
@ -84,7 +84,7 @@ cmdline_parse_token_string_t pcmd_regs_token_cmd =
|
||||
TOKEN_STRING_INITIALIZER(struct pcmd_intstr_params, cmd, "regs");
|
||||
|
||||
cmdline_parse_token_num_t pcmd_intstr_token_port =
|
||||
TOKEN_NUM_INITIALIZER(struct pcmd_intstr_params, port, UINT16);
|
||||
TOKEN_NUM_INITIALIZER(struct pcmd_intstr_params, port, RTE_UINT16);
|
||||
cmdline_parse_token_string_t pcmd_intstr_token_opt =
|
||||
TOKEN_STRING_INITIALIZER(struct pcmd_intstr_params, opt, NULL);
|
||||
|
||||
@ -92,7 +92,7 @@ cmdline_parse_token_string_t pcmd_intstr_token_opt =
|
||||
cmdline_parse_token_string_t pcmd_macaddr_token_cmd =
|
||||
TOKEN_STRING_INITIALIZER(struct pcmd_intmac_params, cmd, "macaddr");
|
||||
cmdline_parse_token_num_t pcmd_intmac_token_port =
|
||||
TOKEN_NUM_INITIALIZER(struct pcmd_intmac_params, port, UINT16);
|
||||
TOKEN_NUM_INITIALIZER(struct pcmd_intmac_params, port, RTE_UINT16);
|
||||
cmdline_parse_token_etheraddr_t pcmd_intmac_token_mac =
|
||||
TOKEN_ETHERADDR_INITIALIZER(struct pcmd_intmac_params, mac);
|
||||
|
||||
@ -106,18 +106,19 @@ cmdline_parse_token_string_t pcmd_ringparam_token_cmd =
|
||||
TOKEN_STRING_INITIALIZER(struct pcmd_intintint_params, cmd,
|
||||
"ringparam");
|
||||
cmdline_parse_token_num_t pcmd_intintint_token_port =
|
||||
TOKEN_NUM_INITIALIZER(struct pcmd_intintint_params, port, UINT16);
|
||||
TOKEN_NUM_INITIALIZER(struct pcmd_intintint_params, port,
|
||||
RTE_UINT16);
|
||||
cmdline_parse_token_num_t pcmd_intintint_token_tx =
|
||||
TOKEN_NUM_INITIALIZER(struct pcmd_intintint_params, tx, UINT16);
|
||||
TOKEN_NUM_INITIALIZER(struct pcmd_intintint_params, tx, RTE_UINT16);
|
||||
cmdline_parse_token_num_t pcmd_intintint_token_rx =
|
||||
TOKEN_NUM_INITIALIZER(struct pcmd_intintint_params, rx, UINT16);
|
||||
TOKEN_NUM_INITIALIZER(struct pcmd_intintint_params, rx, RTE_UINT16);
|
||||
|
||||
|
||||
/* Pause commands */
|
||||
cmdline_parse_token_string_t pcmd_pause_token_cmd =
|
||||
TOKEN_STRING_INITIALIZER(struct pcmd_intstr_params, cmd, "pause");
|
||||
cmdline_parse_token_num_t pcmd_pause_token_port =
|
||||
TOKEN_NUM_INITIALIZER(struct pcmd_intstr_params, port, UINT16);
|
||||
TOKEN_NUM_INITIALIZER(struct pcmd_intstr_params, port, RTE_UINT16);
|
||||
cmdline_parse_token_string_t pcmd_pause_token_opt =
|
||||
TOKEN_STRING_INITIALIZER(struct pcmd_intstr_params,
|
||||
opt, "all#tx#rx#none");
|
||||
@ -126,11 +127,11 @@ cmdline_parse_token_string_t pcmd_pause_token_opt =
|
||||
cmdline_parse_token_string_t pcmd_vlan_token_cmd =
|
||||
TOKEN_STRING_INITIALIZER(struct pcmd_vlan_params, cmd, "vlan");
|
||||
cmdline_parse_token_num_t pcmd_vlan_token_port =
|
||||
TOKEN_NUM_INITIALIZER(struct pcmd_vlan_params, port, UINT16);
|
||||
TOKEN_NUM_INITIALIZER(struct pcmd_vlan_params, port, RTE_UINT16);
|
||||
cmdline_parse_token_string_t pcmd_vlan_token_mode =
|
||||
TOKEN_STRING_INITIALIZER(struct pcmd_vlan_params, mode, "add#del");
|
||||
cmdline_parse_token_num_t pcmd_vlan_token_vid =
|
||||
TOKEN_NUM_INITIALIZER(struct pcmd_vlan_params, vid, UINT16);
|
||||
TOKEN_NUM_INITIALIZER(struct pcmd_vlan_params, vid, RTE_UINT16);
|
||||
|
||||
|
||||
static void
|
||||
|
@ -397,7 +397,7 @@ cmdline_parse_token_string_t cfg_add_neigh_start =
|
||||
cmdline_parse_token_string_t cfg_add_neigh_pstr =
|
||||
TOKEN_STRING_INITIALIZER(struct cfg_neigh_add_item, pstr, "port");
|
||||
cmdline_parse_token_num_t cfg_add_neigh_port =
|
||||
TOKEN_NUM_INITIALIZER(struct cfg_neigh_add_item, port, UINT16);
|
||||
TOKEN_NUM_INITIALIZER(struct cfg_neigh_add_item, port, RTE_UINT16);
|
||||
cmdline_parse_token_string_t cfg_add_neigh_mac =
|
||||
TOKEN_STRING_INITIALIZER(struct cfg_neigh_add_item, mac, NULL);
|
||||
|
||||
|
@ -113,7 +113,7 @@ cmdline_parse_token_string_t cmd_setqavg_param_string =
|
||||
"period#n");
|
||||
cmdline_parse_token_num_t cmd_setqavg_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_setqavg_result, number,
|
||||
UINT32);
|
||||
RTE_UINT32);
|
||||
|
||||
cmdline_parse_inst_t cmd_setqavg = {
|
||||
.f = cmd_setqavg_parsed,
|
||||
@ -188,10 +188,10 @@ cmdline_parse_token_string_t cmd_subportstats_subport_string =
|
||||
"subport");
|
||||
cmdline_parse_token_num_t cmd_subportstats_subport_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_subportstats_result, subport_number,
|
||||
UINT32);
|
||||
RTE_UINT32);
|
||||
cmdline_parse_token_num_t cmd_subportstats_port_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_subportstats_result, port_number,
|
||||
UINT16);
|
||||
RTE_UINT16);
|
||||
|
||||
cmdline_parse_inst_t cmd_subportstats = {
|
||||
.f = cmd_subportstats_parsed,
|
||||
@ -236,19 +236,19 @@ cmdline_parse_token_string_t cmd_pipestats_port_string =
|
||||
"port");
|
||||
cmdline_parse_token_num_t cmd_pipestats_port_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_pipestats_result, port_number,
|
||||
UINT16);
|
||||
RTE_UINT16);
|
||||
cmdline_parse_token_string_t cmd_pipestats_subport_string =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_pipestats_result, subport_string,
|
||||
"subport");
|
||||
cmdline_parse_token_num_t cmd_pipestats_subport_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_pipestats_result, subport_number,
|
||||
UINT32);
|
||||
RTE_UINT32);
|
||||
cmdline_parse_token_string_t cmd_pipestats_pipe_string =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_pipestats_result, pipe_string,
|
||||
"pipe");
|
||||
cmdline_parse_token_num_t cmd_pipestats_pipe_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_pipestats_result, pipe_number,
|
||||
UINT32);
|
||||
RTE_UINT32);
|
||||
|
||||
cmdline_parse_inst_t cmd_pipestats = {
|
||||
.f = cmd_pipestats_parsed,
|
||||
@ -299,31 +299,31 @@ cmdline_parse_token_string_t cmd_avg_q_port_string =
|
||||
"port");
|
||||
cmdline_parse_token_num_t cmd_avg_q_port_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_avg_q_result, port_number,
|
||||
UINT16);
|
||||
RTE_UINT16);
|
||||
cmdline_parse_token_string_t cmd_avg_q_subport_string =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_avg_q_result, subport_string,
|
||||
"subport");
|
||||
cmdline_parse_token_num_t cmd_avg_q_subport_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_avg_q_result, subport_number,
|
||||
UINT32);
|
||||
RTE_UINT32);
|
||||
cmdline_parse_token_string_t cmd_avg_q_pipe_string =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_avg_q_result, pipe_string,
|
||||
"pipe");
|
||||
cmdline_parse_token_num_t cmd_avg_q_pipe_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_avg_q_result, pipe_number,
|
||||
UINT32);
|
||||
RTE_UINT32);
|
||||
cmdline_parse_token_string_t cmd_avg_q_tc_string =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_avg_q_result, tc_string,
|
||||
"tc");
|
||||
cmdline_parse_token_num_t cmd_avg_q_tc_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_avg_q_result, tc_number,
|
||||
UINT8);
|
||||
RTE_UINT8);
|
||||
cmdline_parse_token_string_t cmd_avg_q_q_string =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_avg_q_result, q_string,
|
||||
"q");
|
||||
cmdline_parse_token_num_t cmd_avg_q_q_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_avg_q_result, q_number,
|
||||
UINT8);
|
||||
RTE_UINT8);
|
||||
|
||||
cmdline_parse_inst_t cmd_avg_q = {
|
||||
.f = cmd_avg_q_parsed,
|
||||
@ -376,25 +376,25 @@ cmdline_parse_token_string_t cmd_avg_tcpipe_port_string =
|
||||
"port");
|
||||
cmdline_parse_token_num_t cmd_avg_tcpipe_port_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_avg_tcpipe_result, port_number,
|
||||
UINT16);
|
||||
RTE_UINT16);
|
||||
cmdline_parse_token_string_t cmd_avg_tcpipe_subport_string =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_avg_tcpipe_result, subport_string,
|
||||
"subport");
|
||||
cmdline_parse_token_num_t cmd_avg_tcpipe_subport_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_avg_tcpipe_result, subport_number,
|
||||
UINT32);
|
||||
RTE_UINT32);
|
||||
cmdline_parse_token_string_t cmd_avg_tcpipe_pipe_string =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_avg_tcpipe_result, pipe_string,
|
||||
"pipe");
|
||||
cmdline_parse_token_num_t cmd_avg_tcpipe_pipe_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_avg_tcpipe_result, pipe_number,
|
||||
UINT32);
|
||||
RTE_UINT32);
|
||||
cmdline_parse_token_string_t cmd_avg_tcpipe_tc_string =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_avg_tcpipe_result, tc_string,
|
||||
"tc");
|
||||
cmdline_parse_token_num_t cmd_avg_tcpipe_tc_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_avg_tcpipe_result, tc_number,
|
||||
UINT8);
|
||||
RTE_UINT8);
|
||||
|
||||
cmdline_parse_inst_t cmd_avg_tcpipe = {
|
||||
.f = cmd_avg_tcpipe_parsed,
|
||||
@ -443,19 +443,19 @@ cmdline_parse_token_string_t cmd_avg_pipe_port_string =
|
||||
"port");
|
||||
cmdline_parse_token_num_t cmd_avg_pipe_port_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_avg_pipe_result, port_number,
|
||||
UINT16);
|
||||
RTE_UINT16);
|
||||
cmdline_parse_token_string_t cmd_avg_pipe_subport_string =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_avg_pipe_result, subport_string,
|
||||
"subport");
|
||||
cmdline_parse_token_num_t cmd_avg_pipe_subport_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_avg_pipe_result, subport_number,
|
||||
UINT32);
|
||||
RTE_UINT32);
|
||||
cmdline_parse_token_string_t cmd_avg_pipe_pipe_string =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_avg_pipe_result, pipe_string,
|
||||
"pipe");
|
||||
cmdline_parse_token_num_t cmd_avg_pipe_pipe_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_avg_pipe_result, pipe_number,
|
||||
UINT32);
|
||||
RTE_UINT32);
|
||||
|
||||
cmdline_parse_inst_t cmd_avg_pipe = {
|
||||
.f = cmd_avg_pipe_parsed,
|
||||
@ -502,19 +502,19 @@ cmdline_parse_token_string_t cmd_avg_tcsubport_port_string =
|
||||
"port");
|
||||
cmdline_parse_token_num_t cmd_avg_tcsubport_port_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_avg_tcsubport_result, port_number,
|
||||
UINT16);
|
||||
RTE_UINT16);
|
||||
cmdline_parse_token_string_t cmd_avg_tcsubport_subport_string =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_avg_tcsubport_result, subport_string,
|
||||
"subport");
|
||||
cmdline_parse_token_num_t cmd_avg_tcsubport_subport_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_avg_tcsubport_result, subport_number,
|
||||
UINT32);
|
||||
RTE_UINT32);
|
||||
cmdline_parse_token_string_t cmd_avg_tcsubport_tc_string =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_avg_tcsubport_result, tc_string,
|
||||
"tc");
|
||||
cmdline_parse_token_num_t cmd_avg_tcsubport_tc_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_avg_tcsubport_result, tc_number,
|
||||
UINT8);
|
||||
RTE_UINT8);
|
||||
|
||||
cmdline_parse_inst_t cmd_avg_tcsubport = {
|
||||
.f = cmd_avg_tcsubport_parsed,
|
||||
@ -559,13 +559,13 @@ cmdline_parse_token_string_t cmd_avg_subport_port_string =
|
||||
"port");
|
||||
cmdline_parse_token_num_t cmd_avg_subport_port_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_avg_subport_result, port_number,
|
||||
UINT16);
|
||||
RTE_UINT16);
|
||||
cmdline_parse_token_string_t cmd_avg_subport_subport_string =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_avg_subport_result, subport_string,
|
||||
"subport");
|
||||
cmdline_parse_token_num_t cmd_avg_subport_subport_number =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_avg_subport_result, subport_number,
|
||||
UINT32);
|
||||
RTE_UINT32);
|
||||
|
||||
cmdline_parse_inst_t cmd_avg_subport = {
|
||||
.f = cmd_avg_subport_parsed,
|
||||
|
@ -471,7 +471,7 @@ cmdline_parse_token_string_t cmd_device_stats_ =
|
||||
cmdline_parse_token_string_t cmd_device_bdf =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_stats_result, bdf, NULL);
|
||||
cmdline_parse_token_num_t cmd_queue_id =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_stats_result, qid, UINT32);
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_stats_result, qid, RTE_UINT32);
|
||||
|
||||
cmdline_parse_inst_t cmd_device_stats = {
|
||||
.f = cmd_device_stats_parsed,
|
||||
|
@ -448,7 +448,7 @@ cmdline_parse_token_string_t cmd_set_cpu_freq =
|
||||
set_cpu_freq, "set_cpu_freq");
|
||||
cmdline_parse_token_num_t cmd_set_cpu_freq_core_num =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_set_cpu_freq_result,
|
||||
lcore_id, UINT8);
|
||||
lcore_id, RTE_UINT8);
|
||||
cmdline_parse_token_string_t cmd_set_cpu_freq_cmd_cmd =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_set_cpu_freq_result,
|
||||
cmd, "up#down#min#max#enable_turbo#disable_turbo");
|
||||
|
@ -155,10 +155,10 @@ cmdline_parse_token_string_t cmd_set_pcpu_vm_name =
|
||||
vm_name, NULL);
|
||||
cmdline_parse_token_num_t set_pcpu_vcpu =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_set_pcpu_result,
|
||||
vcpu, UINT8);
|
||||
vcpu, RTE_UINT8);
|
||||
cmdline_parse_token_num_t set_pcpu_core =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_set_pcpu_result,
|
||||
core, UINT64);
|
||||
core, RTE_UINT64);
|
||||
|
||||
|
||||
cmdline_parse_inst_t cmd_set_pcpu_set = {
|
||||
@ -455,7 +455,7 @@ cmdline_parse_token_string_t cmd_show_cpu_freq =
|
||||
|
||||
cmdline_parse_token_num_t cmd_show_cpu_freq_core_num =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_show_cpu_freq_result,
|
||||
core_num, UINT8);
|
||||
core_num, RTE_UINT8);
|
||||
|
||||
cmdline_parse_inst_t cmd_show_cpu_freq_set = {
|
||||
.f = cmd_show_cpu_freq_parsed,
|
||||
@ -504,7 +504,7 @@ cmdline_parse_token_string_t cmd_set_cpu_freq =
|
||||
set_cpu_freq, "set_cpu_freq");
|
||||
cmdline_parse_token_num_t cmd_set_cpu_freq_core_num =
|
||||
TOKEN_NUM_INITIALIZER(struct cmd_set_cpu_freq_result,
|
||||
core_num, UINT8);
|
||||
core_num, RTE_UINT8);
|
||||
cmdline_parse_token_string_t cmd_set_cpu_freq_cmd_cmd =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_set_cpu_freq_result,
|
||||
cmd, "up#down#min#max#enable_turbo#disable_turbo");
|
||||
|
@ -57,9 +57,8 @@ static inline int
|
||||
add_to_res(unsigned int c, uint64_t *res, unsigned int base)
|
||||
{
|
||||
/* overflow */
|
||||
if ( (UINT64_MAX - c) / base < *res ) {
|
||||
if ((UINT64_MAX - c) / base < *res)
|
||||
return -1;
|
||||
}
|
||||
|
||||
*res = (uint64_t) (*res * base + c);
|
||||
return 0;
|
||||
@ -69,23 +68,23 @@ static int
|
||||
check_res_size(struct cmdline_token_num_data *nd, unsigned ressize)
|
||||
{
|
||||
switch (nd->type) {
|
||||
case INT8:
|
||||
case UINT8:
|
||||
case RTE_INT8:
|
||||
case RTE_UINT8:
|
||||
if (ressize < sizeof(int8_t))
|
||||
return -1;
|
||||
break;
|
||||
case INT16:
|
||||
case UINT16:
|
||||
case RTE_INT16:
|
||||
case RTE_UINT16:
|
||||
if (ressize < sizeof(int16_t))
|
||||
return -1;
|
||||
break;
|
||||
case INT32:
|
||||
case UINT32:
|
||||
case RTE_INT32:
|
||||
case RTE_UINT32:
|
||||
if (ressize < sizeof(int32_t))
|
||||
return -1;
|
||||
break;
|
||||
case INT64:
|
||||
case UINT64:
|
||||
case RTE_INT64:
|
||||
case RTE_UINT64:
|
||||
if (ressize < sizeof(int64_t))
|
||||
return -1;
|
||||
break;
|
||||
@ -123,7 +122,7 @@ cmdline_parse_num(cmdline_parse_token_hdr_t *tk, const char *srcbuf, void *res,
|
||||
return -1;
|
||||
}
|
||||
|
||||
while ( st != ERROR && c && ! cmdline_isendoftoken(c) ) {
|
||||
while (st != ERROR && c && !cmdline_isendoftoken(c)) {
|
||||
debug_printf("%c %x -> ", c, c);
|
||||
switch (st) {
|
||||
case START:
|
||||
@ -259,61 +258,53 @@ cmdline_parse_num(cmdline_parse_token_hdr_t *tk, const char *srcbuf, void *res,
|
||||
case HEX_OK:
|
||||
case OCTAL_OK:
|
||||
case BIN_OK:
|
||||
if ( nd.type == INT8 && res1 <= INT8_MAX ) {
|
||||
if (nd.type == RTE_INT8 && res1 <= INT8_MAX) {
|
||||
if (res) *(int8_t *)res = (int8_t) res1;
|
||||
return buf-srcbuf;
|
||||
}
|
||||
else if ( nd.type == INT16 && res1 <= INT16_MAX ) {
|
||||
} else if (nd.type == RTE_INT16 && res1 <= INT16_MAX) {
|
||||
if (res) *(int16_t *)res = (int16_t) res1;
|
||||
return buf-srcbuf;
|
||||
}
|
||||
else if ( nd.type == INT32 && res1 <= INT32_MAX ) {
|
||||
} else if (nd.type == RTE_INT32 && res1 <= INT32_MAX) {
|
||||
if (res) *(int32_t *)res = (int32_t) res1;
|
||||
return buf-srcbuf;
|
||||
}
|
||||
else if ( nd.type == INT64 && res1 <= INT64_MAX ) {
|
||||
} else if (nd.type == RTE_INT64 && res1 <= INT64_MAX) {
|
||||
if (res) *(int64_t *)res = (int64_t) res1;
|
||||
return buf-srcbuf;
|
||||
}
|
||||
else if ( nd.type == UINT8 && res1 <= UINT8_MAX ) {
|
||||
} else if (nd.type == RTE_UINT8 && res1 <= UINT8_MAX) {
|
||||
if (res) *(uint8_t *)res = (uint8_t) res1;
|
||||
return buf-srcbuf;
|
||||
}
|
||||
else if (nd.type == UINT16 && res1 <= UINT16_MAX ) {
|
||||
} else if (nd.type == RTE_UINT16 && res1 <= UINT16_MAX) {
|
||||
if (res) *(uint16_t *)res = (uint16_t) res1;
|
||||
return buf-srcbuf;
|
||||
}
|
||||
else if ( nd.type == UINT32 && res1 <= UINT32_MAX ) {
|
||||
} else if (nd.type == RTE_UINT32 && res1 <= UINT32_MAX) {
|
||||
if (res) *(uint32_t *)res = (uint32_t) res1;
|
||||
return buf-srcbuf;
|
||||
}
|
||||
else if ( nd.type == UINT64 ) {
|
||||
} else if (nd.type == RTE_UINT64) {
|
||||
if (res) *(uint64_t *)res = res1;
|
||||
return buf-srcbuf;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
|
||||
case DEC_NEG_OK:
|
||||
if ( nd.type == INT8 && res1 <= INT8_MAX + 1 ) {
|
||||
if (nd.type == RTE_INT8 &&
|
||||
res1 <= INT8_MAX + 1) {
|
||||
if (res) *(int8_t *)res = (int8_t) (-res1);
|
||||
return buf-srcbuf;
|
||||
}
|
||||
else if ( nd.type == INT16 && res1 <= (uint16_t)INT16_MAX + 1 ) {
|
||||
} else if (nd.type == RTE_INT16 &&
|
||||
res1 <= (uint16_t)INT16_MAX + 1) {
|
||||
if (res) *(int16_t *)res = (int16_t) (-res1);
|
||||
return buf-srcbuf;
|
||||
}
|
||||
else if ( nd.type == INT32 && res1 <= (uint32_t)INT32_MAX + 1 ) {
|
||||
} else if (nd.type == RTE_INT32 &&
|
||||
res1 <= (uint32_t)INT32_MAX + 1) {
|
||||
if (res) *(int32_t *)res = (int32_t) (-res1);
|
||||
return buf-srcbuf;
|
||||
}
|
||||
else if ( nd.type == INT64 && res1 <= (uint64_t)INT64_MAX + 1 ) {
|
||||
} else if (nd.type == RTE_INT64 &&
|
||||
res1 <= (uint64_t)INT64_MAX + 1) {
|
||||
if (res) *(int64_t *)res = (int64_t) (-res1);
|
||||
return buf-srcbuf;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
|
@ -14,14 +14,14 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
enum cmdline_numtype {
|
||||
UINT8 = 0,
|
||||
UINT16,
|
||||
UINT32,
|
||||
UINT64,
|
||||
INT8,
|
||||
INT16,
|
||||
INT32,
|
||||
INT64
|
||||
RTE_UINT8 = 0,
|
||||
RTE_UINT16,
|
||||
RTE_UINT32,
|
||||
RTE_UINT64,
|
||||
RTE_INT8,
|
||||
RTE_INT16,
|
||||
RTE_INT32,
|
||||
RTE_INT64
|
||||
};
|
||||
|
||||
struct cmdline_token_num_data {
|
||||
|
Loading…
Reference in New Issue
Block a user