Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
api: Cleanup APIs interface.api
[vpp.git]
/
src
/
vpp
/
api
/
custom_dump.c
diff --git
a/src/vpp/api/custom_dump.c
b/src/vpp/api/custom_dump.c
index
4d11825
..
428e288
100644
(file)
--- a/
src/vpp/api/custom_dump.c
+++ b/
src/vpp/api/custom_dump.c
@@
-50,7
+50,6
@@
#include <vpp/api/vpe_msg_enum.h>
#include <vpp/api/types.h>
#include <vpp/api/vpe_msg_enum.h>
#include <vpp/api/types.h>
-#include <vlibapi/api_types_inlines.h>
#include <vnet/bonding/node.h>
#include <vnet/bonding/node.h>
@@
-113,7
+112,7
@@
static void *vl_api_sw_interface_set_flags_t_print
s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
- if (
mp->admin_up_down
)
+ if (
ntohl (mp->flags) & IF_STATUS_API_FLAG_ADMIN_UP
)
s = format (s, "admin-up ");
else
s = format (s, "admin-down ");
s = format (s, "admin-up ");
else
s = format (s, "admin-down ");
@@
-161,12
+160,12
@@
static void *vl_api_sw_interface_event_t_print
s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
- if (
mp->admin_up_down
)
+ if (
ntohl (mp->flags) & IF_STATUS_API_FLAG_ADMIN_UP
)
s = format (s, "admin-up ");
else
s = format (s, "admin-down ");
s = format (s, "admin-up ");
else
s = format (s, "admin-down ");
- if (
mp->link_up_down
)
+ if (
ntohl (mp->flags) & IF_STATUS_API_FLAG_LINK_UP
)
s = format (s, "link-up");
else
s = format (s, "link-down");
s = format (s, "link-up");
else
s = format (s, "link-down");
@@
-181,17
+180,18
@@
static void *vl_api_sw_interface_add_del_address_t_print
(vl_api_sw_interface_add_del_address_t * mp, void *handle)
{
u8 *s;
(vl_api_sw_interface_add_del_address_t * mp, void *handle)
{
u8 *s;
+ ip46_address_t address;
s = format (0, "SCRIPT: sw_interface_add_del_address ");
s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
s = format (0, "SCRIPT: sw_interface_add_del_address ");
s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
- if (
mp->is_ipv
6)
+ if (
ip_address_decode (&mp->prefix.address, &address) == IP46_TYPE_IP
6)
s = format (s, "%U/%d ", format_ip6_address,
s = format (s, "%U/%d ", format_ip6_address,
- (ip6_address_t *)
mp->address, mp->address_length
);
+ (ip6_address_t *)
& address.ip6, mp->prefix.len
);
else
s = format (s, "%U/%d ", format_ip4_address,
else
s = format (s, "%U/%d ", format_ip4_address,
- (ip4_address_t *)
mp->address, mp->address_length
);
+ (ip4_address_t *)
& address.ip4, mp->prefix.len
);
if (mp->is_add == 0)
s = format (s, "del ");
if (mp->is_add == 0)
s = format (s, "del ");
@@
-666,6
+666,8
@@
static void *vl_api_bond_create_t_print
s = format (s, "mode %U ", format_bond_mode, mp->mode);
if (mp->lb)
s = format (s, "lb %U ", format_bond_load_balance, mp->lb);
s = format (s, "mode %U ", format_bond_mode, mp->mode);
if (mp->lb)
s = format (s, "lb %U ", format_bond_load_balance, mp->lb);
+ if (mp->numa_only)
+ s = format (s, "numa-only is set in lacp mode");
if (mp->id != ~0)
s = format (s, "id %u ", ntohl (mp->id));
FINISH;
if (mp->id != ~0)
s = format (s, "id %u ", ntohl (mp->id));
FINISH;
@@
-969,15
+971,15
@@
static void *vl_api_create_vlan_subif_t_print
FINISH;
}
FINISH;
}
-#define foreach_create_subif_
bit
\
-_(
no_tags)
\
-_(
one_tag)
\
-_(
two_tags)
\
-_(
dot1ad)
\
-_(
exact_match)
\
-_(
default_sub)
\
-_(
outer_vlan_id_any)
\
-_(
inner_vlan_id_any
)
+#define foreach_create_subif_
flag
\
+_(
0, "no_tags")
\
+_(
1, "one_tag")
\
+_(
2, "two_tags")
\
+_(
3, "dot1ad")
\
+_(
4, "exact_match")
\
+_(
5, "default_sub")
\
+_(
6, "outer_vlan_id_any")
\
+_(
7, "inner_vlan_id_any"
)
static void *vl_api_create_subif_t_print
(vl_api_create_subif_t * mp, void *handle)
static void *vl_api_create_subif_t_print
(vl_api_create_subif_t * mp, void *handle)
@@
-996,8
+998,8
@@
static void *vl_api_create_subif_t_print
if (mp->inner_vlan_id)
s = format (s, "inner_vlan_id %d ", ntohs (mp->inner_vlan_id));
if (mp->inner_vlan_id)
s = format (s, "inner_vlan_id %d ", ntohs (mp->inner_vlan_id));
-#define _(a
) if (mp->a) s = format (s, "%s ", #a
);
- foreach_create_subif_
bit
;
+#define _(a
,b) if (mp->sub_if_flags & (1 << a)) s = format (s, "%s ", b
);
+ foreach_create_subif_
flag
;
#undef _
FINISH;
#undef _
FINISH;
@@
-1919,6
+1921,8
@@
static void *vl_api_create_vhost_user_if_t_print
s = format (s, "disable_indirect_desc ");
if (mp->tag[0])
s = format (s, "tag %s", mp->tag);
s = format (s, "disable_indirect_desc ");
if (mp->tag[0])
s = format (s, "tag %s", mp->tag);
+ if (mp->enable_gso)
+ s = format (s, "gso");
FINISH;
}
FINISH;
}
@@
-1936,6
+1940,8
@@
static void *vl_api_modify_vhost_user_if_t_print
s = format (s, "server ");
if (mp->renumber)
s = format (s, "renumber %d ", ntohl (mp->custom_dev_instance));
s = format (s, "server ");
if (mp->renumber)
s = format (s, "renumber %d ", ntohl (mp->custom_dev_instance));
+ if (mp->enable_gso)
+ s = format (s, "gso");
FINISH;
}
FINISH;
}
@@
-2760,6
+2766,8
@@
static void *vl_api_pg_create_interface_t_print
s = format (0, "SCRIPT: pg_create_interface ");
s = format (0, "if_id %d", ntohl (mp->interface_id));
s = format (0, "SCRIPT: pg_create_interface ");
s = format (0, "if_id %d", ntohl (mp->interface_id));
+ s = format (0, "gso-enabled %u", mp->gso_enabled);
+ s = format (0, "gso-size %u", ntohl (mp->gso_size));
FINISH;
}
FINISH;
}
@@
-3764,9
+3772,9
@@
static void *vl_api_qos_record_enable_disable_t_print
u8 *s;
s = format (0, "SCRIPT: qos_record_enable_disable ");
u8 *s;
s = format (0, "SCRIPT: qos_record_enable_disable ");
- s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
+ s = format (s, "sw_if_index %d ", ntohl (mp->
record.
sw_if_index));
s = format (s, "input_source %U ", format_qos_source,
s = format (s, "input_source %U ", format_qos_source,
-
ntohl (mp->input_source)
);
+
mp->record.input_source
);
if (!mp->enable)
s = format (s, "disable ");
if (!mp->enable)
s = format (s, "disable ");
@@
-3774,6
+3782,18
@@
static void *vl_api_qos_record_enable_disable_t_print
FINISH;
}
FINISH;
}
+#define foreach_no_print_function \
+_(memclnt_keepalive_reply)
+
+#define _(f) \
+static void * vl_api_ ## f ## _t_print \
+ (vl_api_ ## f ## _t * mp, void * handle) \
+{ \
+ return handle; \
+}
+foreach_no_print_function;
+#undef _
+
#define foreach_custom_print_no_arg_function \
_(lisp_eid_table_vni_dump) \
_(lisp_map_resolver_dump) \
#define foreach_custom_print_no_arg_function \
_(lisp_eid_table_vni_dump) \
_(lisp_map_resolver_dump) \
@@
-3790,7
+3810,7
@@
static void * vl_api_ ## f ## _t_print \
s = format (0, "SCRIPT: " #f ); \
FINISH; \
}
s = format (0, "SCRIPT: " #f ); \
FINISH; \
}
-foreach_custom_print_no_arg_function
+foreach_custom_print_no_arg_function
;
#undef _
#define foreach_custom_print_function \
_(CREATE_LOOPBACK, create_loopback) \
#undef _
#define foreach_custom_print_function \
_(CREATE_LOOPBACK, create_loopback) \
@@
-3992,8
+4012,10
@@
_(DNS_RESOLVE_NAME, dns_resolve_name) \
_(DNS_RESOLVE_IP, dns_resolve_ip) \
_(SESSION_RULE_ADD_DEL, session_rule_add_del) \
_(OUTPUT_ACL_SET_INTERFACE, output_acl_set_interface) \
_(DNS_RESOLVE_IP, dns_resolve_ip) \
_(SESSION_RULE_ADD_DEL, session_rule_add_del) \
_(OUTPUT_ACL_SET_INTERFACE, output_acl_set_interface) \
-_(QOS_RECORD_ENABLE_DISABLE, qos_record_enable_disable)
- void
+_(QOS_RECORD_ENABLE_DISABLE, qos_record_enable_disable) \
+_(MEMCLNT_KEEPALIVE_REPLY, memclnt_keepalive_reply)
+
+void
vl_msg_api_custom_dump_configure (api_main_t * am)
{
#define _(n,f) am->msg_print_handlers[VL_API_##n] \
vl_msg_api_custom_dump_configure (api_main_t * am)
{
#define _(n,f) am->msg_print_handlers[VL_API_##n] \