summaryrefslogtreecommitdiffstats
path: root/plugins/lb-plugin/lb/lb.h
diff options
context:
space:
mode:
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();