Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Allow providers to override glean behaviour
[vpp.git]
/
src
/
vnet
/
adj
/
adj_midchain.c
diff --git
a/src/vnet/adj/adj_midchain.c
b/src/vnet/adj/adj_midchain.c
index
e9a510b
..
b6cb824
100644
(file)
--- a/
src/vnet/adj/adj_midchain.c
+++ b/
src/vnet/adj/adj_midchain.c
@@
-460,6
+460,7
@@
adj_nbr_midchain_get_feature_node (ip_adjacency_t *adj)
void
adj_midchain_setup (adj_index_t adj_index,
adj_midchain_fixup_t fixup,
void
adj_midchain_setup (adj_index_t adj_index,
adj_midchain_fixup_t fixup,
+ const void *data,
adj_flags_t flags)
{
u32 feature_index, tx_node;
adj_flags_t flags)
{
u32 feature_index, tx_node;
@@
-471,6
+472,7
@@
adj_midchain_setup (adj_index_t adj_index,
adj = adj_get(adj_index);
adj->sub_type.midchain.fixup_func = fixup;
adj = adj_get(adj_index);
adj->sub_type.midchain.fixup_func = fixup;
+ adj->sub_type.midchain.fixup_data = data;
adj->ia_flags |= flags;
arc_index = adj_midchain_get_feature_arc_index_for_link_type (adj);
adj->ia_flags |= flags;
arc_index = adj_midchain_get_feature_arc_index_for_link_type (adj);
@@
-503,6
+505,7
@@
adj_midchain_setup (adj_index_t adj_index,
void
adj_nbr_midchain_update_rewrite (adj_index_t adj_index,
adj_midchain_fixup_t fixup,
void
adj_nbr_midchain_update_rewrite (adj_index_t adj_index,
adj_midchain_fixup_t fixup,
+ const void *fixup_data,
adj_flags_t flags,
u8 *rewrite)
{
adj_flags_t flags,
u8 *rewrite)
{
@@
-516,13
+519,15
@@
adj_nbr_midchain_update_rewrite (adj_index_t adj_index,
* one time only update. since we don't support chainging the tunnel
* src,dst, this is all we need.
*/
* one time only update. since we don't support chainging the tunnel
* src,dst, this is all we need.
*/
- ASSERT(adj->lookup_next_index == IP_LOOKUP_NEXT_ARP);
+ ASSERT((adj->lookup_next_index == IP_LOOKUP_NEXT_ARP) ||
+ (adj->lookup_next_index == IP_LOOKUP_NEXT_GLEAN));
+
/*
* tunnels can always provide a rewrite.
*/
ASSERT(NULL != rewrite);
/*
* tunnels can always provide a rewrite.
*/
ASSERT(NULL != rewrite);
- adj_midchain_setup(adj_index, fixup, flags);
+ adj_midchain_setup(adj_index, fixup, f
ixup_data, f
lags);
/*
* update the rewirte with the workers paused.
/*
* update the rewirte with the workers paused.
@@
-587,8
+592,9
@@
format_adj_midchain (u8* s, va_list *ap)
ip_adjacency_t * adj = adj_get(index);
s = format (s, "%U", format_vnet_link, adj->ia_link);
ip_adjacency_t * adj = adj_get(index);
s = format (s, "%U", format_vnet_link, adj->ia_link);
- s = format (s, " via %U ",
- format_ip46_address, &adj->sub_type.nbr.next_hop);
+ s = format (s, " via %U",
+ format_ip46_address, &adj->sub_type.nbr.next_hop,
+ adj_proto_to_46(adj->ia_nh_proto));
s = format (s, " %U",
format_vnet_rewrite,
&adj->rewrite_header, sizeof (adj->rewrite_data), indent);
s = format (s, " %U",
format_vnet_rewrite,
&adj->rewrite_header, sizeof (adj->rewrite_data), indent);
@@
-615,6
+621,7
@@
const static dpo_vft_t adj_midchain_dpo_vft = {
.dv_lock = adj_dpo_lock,
.dv_unlock = adj_dpo_unlock,
.dv_format = format_adj_midchain,
.dv_lock = adj_dpo_lock,
.dv_unlock = adj_dpo_unlock,
.dv_format = format_adj_midchain,
+ .dv_get_urpf = adj_dpo_get_urpf,
};
/**
};
/**