Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
span: add tx functionality and support for multiple mirror ports
[vpp.git]
/
vnet
/
vnet
/
dpo
/
classify_dpo.c
diff --git
a/vnet/vnet/dpo/classify_dpo.c
b/vnet/vnet/dpo/classify_dpo.c
index
3b7b98f
..
9e7886c
100644
(file)
--- a/
vnet/vnet/dpo/classify_dpo.c
+++ b/
vnet/vnet/dpo/classify_dpo.c
@@
-40,7
+40,7
@@
classify_dpo_get_index (classify_dpo_t *cd)
}
index_t
}
index_t
-classify_dpo_create (
fib_protocol
_t proto,
+classify_dpo_create (
dpo_proto
_t proto,
u32 classify_table_index)
{
classify_dpo_t *cd;
u32 classify_table_index)
{
classify_dpo_t *cd;
@@
-61,7
+61,8
@@
format_classify_dpo (u8 *s, va_list *args)
cd = classify_dpo_get(index);
cd = classify_dpo_get(index);
- return (format(s, "classify:[%d]:table:%d",
+ return (format(s, "%U-classify:[%d]:table:%d",
+ format_dpo_proto, cd->cd_proto,
index, cd->cd_table_index));
}
index, cd->cd_table_index));
}
@@
-90,10
+91,20
@@
classify_dpo_unlock (dpo_id_t *dpo)
}
}
}
}
+static void
+classify_dpo_mem_show (void)
+{
+ fib_show_memory_usage("Classify",
+ pool_elts(classify_dpo_pool),
+ pool_len(classify_dpo_pool),
+ sizeof(classify_dpo_t));
+}
+
const static dpo_vft_t cd_vft = {
.dv_lock = classify_dpo_lock,
.dv_unlock = classify_dpo_unlock,
.dv_format = format_classify_dpo,
const static dpo_vft_t cd_vft = {
.dv_lock = classify_dpo_lock,
.dv_unlock = classify_dpo_unlock,
.dv_format = format_classify_dpo,
+ .dv_mem_show = classify_dpo_mem_show,
};
const static char* const classify_ip4_nodes[] =
};
const static char* const classify_ip4_nodes[] =