X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=plugins%2Flb-plugin%2Flb%2Flb.h;h=14a4d8a39e7b0d2aeb8dda4648438d75f7a0dc7e;hb=63048844682c3b99a5a1de28649ab9b595905959;hp=3d250319422be80c69336ad35b8402904ccd7588;hpb=5bcb3391f9eee85b4edcc0e42649ffeeea2dd997;p=vpp.git 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 @@ -54,6 +54,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 @@ -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();