Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
fib: add barrier sync, pool/vector expand cases
[vpp.git]
/
src
/
vnet
/
adj
/
adj_delegate.c
diff --git
a/src/vnet/adj/adj_delegate.c
b/src/vnet/adj/adj_delegate.c
index
cd5301c
..
8f59046
100644
(file)
--- a/
src/vnet/adj/adj_delegate.c
+++ b/
src/vnet/adj/adj_delegate.c
@@
-23,7
+23,7
@@
static adj_delegate_vft_t *ad_vfts;
/**
static adj_delegate_vft_t *ad_vfts;
/**
- * The value of the last dynamically allocated deleg
e
ate value
+ * The value of the last dynamically allocated delegate value
*/
static adj_delegate_type_t ad_max_id = ADJ_DELEGATE_LAST;
*/
static adj_delegate_type_t ad_max_id = ADJ_DELEGATE_LAST;
@@
-124,6
+124,20
@@
adj_delegate_add (ip_adjacency_t *adj,
return (0);
}
return (0);
}
+void
+adj_delegate_adj_modified (ip_adjacency_t *adj)
+{
+ adj_delegate_t *aed;
+
+ vec_foreach(aed, adj->ia_delegates)
+ {
+ if (ad_vfts[aed->ad_type].adv_adj_modified)
+ {
+ ad_vfts[aed->ad_type].adv_adj_modified(aed);
+ }
+ }
+}
+
void
adj_delegate_adj_deleted (ip_adjacency_t *adj)
{
void
adj_delegate_adj_deleted (ip_adjacency_t *adj)
{
@@
-140,6
+154,20
@@
adj_delegate_adj_deleted (ip_adjacency_t *adj)
vec_reset_length(adj->ia_delegates);
}
vec_reset_length(adj->ia_delegates);
}
+void
+adj_delegate_adj_created (ip_adjacency_t *adj)
+{
+ adj_delegate_vft_t *vft;
+
+ vec_foreach(vft, ad_vfts)
+ {
+ if (vft->adv_adj_created)
+ {
+ vft->adv_adj_created(adj_get_index(adj));
+ }
+ }
+}
+
u8*
adj_delegate_format (u8* s, ip_adjacency_t *adj)
{
u8*
adj_delegate_format (u8* s, ip_adjacency_t *adj)
{
@@
-149,13
+177,13
@@
adj_delegate_format (u8* s, ip_adjacency_t *adj)
{
if (ad_vfts[aed->ad_type].adv_format)
{
{
if (ad_vfts[aed->ad_type].adv_format)
{
- s = format(s, "{");
+ s = format(s, "
\n
{");
s = ad_vfts[aed->ad_type].adv_format(aed, s);
s = format(s, "}");
}
else
{
s = ad_vfts[aed->ad_type].adv_format(aed, s);
s = format(s, "}");
}
else
{
- s = format(s, "{unknown delegate}");
+ s = format(s, "
\n
{unknown delegate}");
}
}
}
}