aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/lb-plugin/lb/lb.h
diff options
context:
space:
mode:
authorPierre Pfister <ppfister@cisco.com>2016-08-11 16:04:05 +0100
committerPierre Pfister <ppfister@cisco.com>2016-08-11 16:04:05 +0100
commit63048844682c3b99a5a1de28649ab9b595905959 (patch)
tree280aee15ae8b2bf76687993175637023ccef41d4 /plugins/lb-plugin/lb/lb.h
parent5bcb3391f9eee85b4edcc0e42649ffeeea2dd997 (diff)
VPP-130: LoadBal: Add lookup bypass and fix adjacency format function
Change-Id: Ib83c6ba04c41dbb80603c6a08c324d71eb44a102 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Diffstat (limited to 'plugins/lb-plugin/lb/lb.h')
-rw-r--r--plugins/lb-plugin/lb/lb.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/lb-plugin/lb/lb.h b/plugins/lb-plugin/lb/lb.h
index 3d250319422..14a4d8a39e7 100644
--- a/plugins/lb-plugin/lb/lb.h
+++ b/plugins/lb-plugin/lb/lb.h
@@ -55,6 +55,13 @@ typedef struct {
ip46_address_t address;
/**
+ * Second ip lookup can be avoided by sending directly the packet
+ * to ip-rewrite with a configured adjacency.
+ * When set to ~0, the packets are sent to ip6-lookup.
+ */
+ u32 adj_index;
+
+ /**
* ASs are indexed by address and VIP Index.
* Which means there will be duplicated if the same server
* address is used for multiple VIPs.
@@ -295,6 +302,12 @@ int lb_vip_find_index(ip46_address_t *prefix, u8 plen, u32 *vip_index);
int lb_vip_add_ass(u32 vip_index, ip46_address_t *addresses, u32 n);
int lb_vip_del_ass(u32 vip_index, ip46_address_t *addresses, u32 n);
+/**
+ * Updates the adjacency index stored in the AS such that the second
+ * IP lookup (after encap) can be bypassed.
+ */
+int lb_as_lookup_bypass(u32 vip_index, ip46_address_t *address, u8 is_disable);
+
u32 lb_hash_time_now(vlib_main_t * vm);
void lb_garbage_collection();