.name = RTE_STR(stdout),
.type = RTE_BPF_XTYPE_VAR,
.var = {
- .val = &stdout,
+ .val = (void *)(uintptr_t)&stdout,
.desc = {
.type = RTE_BPF_ARG_PTR,
.size = sizeof(stdout),
} else if (v == '-')
continue;
else
- printf("unknown flag: \'%c\'", v);
+ fprintf(stderr, "unknown flag: \'%c\'", v);
}
}
fname, sname, flags);
printf("%d:%s\n", rc, strerror(-rc));
} else
- printf("invalid value: %s\n", res->dir);
+ fprintf(stderr, "invalid value: %s\n", res->dir);
}
-cmdline_parse_token_string_t cmd_load_bpf_start =
+static cmdline_parse_token_string_t cmd_load_bpf_start =
TOKEN_STRING_INITIALIZER(struct cmd_bpf_ld_result,
bpf, "bpf-load");
-cmdline_parse_token_string_t cmd_load_bpf_dir =
+static 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 =
+static cmdline_parse_token_num_t cmd_load_bpf_port =
TOKEN_NUM_INITIALIZER(struct cmd_bpf_ld_result, port, RTE_UINT8);
-cmdline_parse_token_num_t cmd_load_bpf_queue =
+static cmdline_parse_token_num_t cmd_load_bpf_queue =
TOKEN_NUM_INITIALIZER(struct cmd_bpf_ld_result, queue, RTE_UINT16);
-cmdline_parse_token_string_t cmd_load_bpf_flags =
+static cmdline_parse_token_string_t cmd_load_bpf_flags =
TOKEN_STRING_INITIALIZER(struct cmd_bpf_ld_result,
flags, NULL);
-cmdline_parse_token_string_t cmd_load_bpf_prm =
+static cmdline_parse_token_string_t cmd_load_bpf_prm =
TOKEN_STRING_INITIALIZER(struct cmd_bpf_ld_result,
prm, NULL);
else if (strcmp(res->dir, "tx") == 0)
rte_bpf_eth_tx_unload(res->port, res->queue);
else
- printf("invalid value: %s\n", res->dir);
+ fprintf(stderr, "invalid value: %s\n", res->dir);
}
-cmdline_parse_token_string_t cmd_unload_bpf_start =
+static cmdline_parse_token_string_t cmd_unload_bpf_start =
TOKEN_STRING_INITIALIZER(struct cmd_bpf_unld_result,
bpf, "bpf-unload");
-cmdline_parse_token_string_t cmd_unload_bpf_dir =
+static 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 =
+static cmdline_parse_token_num_t cmd_unload_bpf_port =
TOKEN_NUM_INITIALIZER(struct cmd_bpf_unld_result, port, RTE_UINT8);
-cmdline_parse_token_num_t cmd_unload_bpf_queue =
+static cmdline_parse_token_num_t cmd_unload_bpf_queue =
TOKEN_NUM_INITIALIZER(struct cmd_bpf_unld_result, queue, RTE_UINT16);
cmdline_parse_inst_t cmd_operate_bpf_unld_parse = {