cmdline: add prefix to numeric type enums
RFC PATCH 1/1 cmdline: add prefix to numeric type enums
The cmdline defined an enum for the various numeric type parameters, but these were missing the RTE_ prefix and so could conflict with defines in various environments, e.g. on Windows. Adding the prefix fixes these conflicts.
Note: this changes the API used by apps using cmdline, but since enum values aren't changing, it's ABI compatible.
--- app/test-cmdline/commands.c | 2 +- app/test-pmd/bpf_cmd.c | 8 +- app/test-pmd/cmdline.c | 656 +++++++++--------- app/test-pmd/cmdline_mtr.c | 84 +-- app/test-pmd/cmdline_tm.c | 172 ++--- app/test/test_cmdline_num.c | 48 +- doc/guides/rel_notes/release_19_05.rst | 4 + examples/ethtool/ethtool-app/ethapp.c | 18 +- examples/ipsec-secgw/parser.c | 2 +- examples/qos_sched/cmdline.c | 46 +- examples/quota_watermark/qwctl/commands.c | 2 +- .../guest_cli/vm_power_cli_guest.c | 2 +- examples/vm_power_manager/vm_power_cli.c | 8 +- lib/librte_cmdline/cmdline_parse_num.c | 40 +- lib/librte_cmdline/cmdline_parse_num.h | 16 +- 15 files changed, 556 insertions(+), 552 deletions(-)
app/test-cmdline/commands.c +1 -1
@@ -191,7 +191,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 */
app/test-pmd/bpf_cmd.c +4 -4
@@ -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,
app/test-pmd/cmdline.c +328 -328
2,303 lines not on this page · raw message
app/test-pmd/cmdline_mtr.c +42 -42
242 lines not on this page · raw message
app/test-pmd/cmdline_tm.c +86 -86
425 lines not on this page · raw message
app/test/test_cmdline_num.c +24 -24
48 lines not on this page · raw message
examples/qos_sched/cmdline.c +23 -23
46 lines not on this page · raw message
examples/quota_watermark/qwctl/commands.c +1 -1
Lines of this file are not shown. View the raw message.
examples/vm_power_manager/guest_cli/vm_power_cli_guest.c +1 -1
Lines of this file are not shown. View the raw message.
examples/vm_power_manager/vm_power_cli.c +4 -4
Lines of this file are not shown. View the raw message.
lib/librte_cmdline/cmdline_parse_num.c +20 -20
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.20.1
Part of the diff is not shown here. View the raw message.