aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/sr/sr.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-02-02 02:18:18 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2017-02-02 14:27:13 +0000
commita9374df5f351d25e968f5f90a827796203cbafdd (patch)
tree7876e45e388ebc739722777c1cadcf666dda6439 /src/vnet/sr/sr.h
parented0e49c51841e84c72a5bb2c6d538ee779b734d4 (diff)
Fix SR multicast post mfib commit
1 - use the SR policy to construct the replicate DPO. Each bucket therein is a SR tunnel. 2 - install a special mfib entry that links via this replicate 3 - forwarding is now mfib-lookup -> replicate -> sr_rewrite (per-tunnel) no need for a separate sr_replicate node. 4 - Stack the sr tunnel on the forwarding DPO of the first-hop FIB entry. no need for a second lookup post SR encap. 5 - fix some path-list lock leaks in the MFIB entry. Change-Id: I20de96ea4c4be4fae252625bde159d9c435c8315 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/sr/sr.h')
-rw-r--r--src/vnet/sr/sr.h30
1 files changed, 21 insertions, 9 deletions
diff --git a/src/vnet/sr/sr.h b/src/vnet/sr/sr.h
index 610b36996f3..3c50b7358a1 100644
--- a/src/vnet/sr/sr.h
+++ b/src/vnet/sr/sr.h
@@ -15,8 +15,6 @@
/**
* @file
* @brief Segment Routing header
- *
- * @note sr_replicate only works using DPDK today
*/
#ifndef included_vnet_sr_h
#define included_vnet_sr_h
@@ -71,6 +69,27 @@ typedef struct
/** Indicates that this tunnel is part of a policy comprising
of multiple tunnels. If == ~0 tunnel is not part of a policy */
u32 policy_index;
+
+ /**
+ * The FIB node graph linkage
+ */
+ fib_node_t node;
+
+ /**
+ * The FIB entry index for the first hop. We track this so we
+ * don't need an extra lookup for it in the data plane
+ */
+ fib_node_index_t fib_entry_index;
+
+ /**
+ * This tunnel's sibling index in the children of the FIB entry
+ */
+ u32 sibling_index;
+
+ /**
+ * The DPO contributed by the first-hop FIB entry.
+ */
+ dpo_id_t first_hop_dpo;
} ip6_sr_tunnel_t;
/**
@@ -205,9 +224,6 @@ typedef struct
/** ip6-rewrite next index for reinstalling the original dst address */
u32 ip6_rewrite_sr_next_index;
- /** ip6-replicate next index for multicast tunnel */
- u32 ip6_lookup_sr_replicate_index;
-
/** application API callback */
void *sr_local_cb;
@@ -238,10 +254,6 @@ format_function_t format_ip6_sr_header_with_length;
vlib_node_registration_t ip6_sr_input_node;
-#if DPDK > 0
-extern vlib_node_registration_t sr_replicate_node;
-#endif /* DPDK */
-
int ip6_sr_add_del_tunnel (ip6_sr_add_del_tunnel_args_t * a);
int ip6_sr_add_del_policy (ip6_sr_add_del_policy_args_t * a);
int ip6_sr_add_del_multicastmap (ip6_sr_add_del_multicastmap_args_t * a);