net/mlx5: add translation of connection tracking action
[dpdk.git] / app / test-pmd / bpf_cmd.c
index 0f984cc..6980291 100644 (file)
@@ -20,7 +20,7 @@ static const struct rte_bpf_xsym bpf_xsym[] = {
                .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),
@@ -55,7 +55,7 @@ static const struct rte_bpf_xsym bpf_xsym[] = {
 struct cmd_bpf_ld_result {
        cmdline_fixed_string_t bpf;
        cmdline_fixed_string_t dir;
-       uint8_t port;
+       uint16_t port;
        uint16_t queue;
        cmdline_fixed_string_t op;
        cmdline_fixed_string_t flags;
@@ -69,7 +69,7 @@ bpf_parse_flags(const char *str, struct rte_bpf_arg *arg, uint32_t *flags)
 
        *flags = RTE_BPF_ETH_F_NONE;
        arg->type = RTE_BPF_ARG_PTR;
-       arg->size = mbuf_data_size;
+       arg->size = mbuf_data_size[0];
 
        for (i = 0; str[i] != 0; i++) {
                v = toupper(str[i]);
@@ -78,7 +78,7 @@ bpf_parse_flags(const char *str, struct rte_bpf_arg *arg, uint32_t *flags)
                else if (v == 'M') {
                        arg->type = RTE_BPF_ARG_PTR_MBUF;
                        arg->size = sizeof(struct rte_mbuf);
-                       arg->buf_size = mbuf_data_size;
+                       arg->buf_size = mbuf_data_size[0];
                } else if (v == '-')
                        continue;
                else
@@ -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);
@@ -153,7 +153,7 @@ cmdline_parse_inst_t cmd_operate_bpf_ld_parse = {
 struct cmd_bpf_unld_result {
        cmdline_fixed_string_t bpf;
        cmdline_fixed_string_t dir;
-       uint8_t port;
+       uint16_t port;
        uint16_t queue;
 };
 
@@ -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,