18 #include <vpp/app/version.h> 23 #define LB_GARBAGE_RUN 60 26 #define LB_CONCURRENCY_TIMEOUT 10 30 #define lb_get_writer_lock() do {} while(__sync_lock_test_and_set (lb_main.writer_lock, 1)) 31 #define lb_put_writer_lock() lb_main.writer_lock[0] = 0 108 for(thread_index = 0; thread_index < tm->
n_vlib_mains; thread_index++ ) {
111 s =
format(s,
"core %d\n", thread_index);
136 return format(s, lb_vip_type_strings[i]);
137 return format(s,
"_WRONG_TYPE_");
145 if (
unformat(input, lb_vip_type_strings[i])) {
155 s =
format(s,
"%U %U new_size:%u #as:%u%s",
174 s =
format (s,
" type:%s port:%u target_port:%u",
197 s =
format(s,
"%U %U [%lu] %U%s\n" 209 s =
format(s,
"%U protocol:%u port:%u\n",
216 s =
format(s,
"%U dscp:%u\n",
223 s =
format (s,
"%U type:%s port:%u target_port:%u",
231 s =
format(s,
"%U counters:\n",
235 s =
format(s,
"%U %s: %Lu\n",
241 s =
format(s,
"%U #as:%u\n",
255 as = &lbm->ass[*as_index];
256 s = format(s,
"%U %U %u buckets %Lu flows dpo:%u %s\n",
257 format_white_space, indent,
258 format_ip46_address, &as->address, IP46_TYPE_ANY,
259 count[as - lbm->ass],
260 vlib_refcount_get(&lbm->as_refcount, as - lbm->ass),
262 (as->flags & LB_AS_FLAGS_USED)?
"used":
" removed");
302 as = &lbm->ass[*as_index];
303 if (!(as->flags & LB_AS_FLAGS_USED) &&
304 clib_u32_loop_gt(now, as->last_used + LB_CONCURRENCY_TIMEOUT) &&
305 (vlib_refcount_get(&lbm->as_refcount, as - lbm->ass) == 0))
308 if (lb_vip_is_nat4_port(vip)) {
309 m_key4.addr = as->address.ip4;
310 m_key4.port = vip->encap_args.target_port;
312 m_key4.fib_index = 0;
314 kv4.key = m_key4.as_u64;
315 if(!clib_bihash_search_8_8(&lbm->mapping_by_as4, &kv4, &value4))
316 m = pool_elt_at_index (lbm->snat_mappings, value4.value);
319 kv4.value = m - lbm->snat_mappings;
320 clib_bihash_add_del_8_8(&lbm->mapping_by_as4, &kv4, 0);
321 pool_put (lbm->snat_mappings, m);
322 } else if (lb_vip_is_nat6_port(vip)) {
323 m_key6.addr.as_u64[0] = as->address.ip6.as_u64[0];
324 m_key6.addr.as_u64[1] = as->address.ip6.as_u64[1];
325 m_key6.port = vip->encap_args.target_port;
327 m_key6.fib_index = 0;
329 kv6.key[0] = m_key6.as_u64[0];
330 kv6.key[1] = m_key6.as_u64[1];
331 kv6.key[2] = m_key6.as_u64[2];
333 if (!clib_bihash_search_24_8 (&lbm->mapping_by_as6, &kv6, &value6))
334 m = pool_elt_at_index (lbm->snat_mappings, value6.value);
337 kv6.value = m - lbm->snat_mappings;
338 clib_bihash_add_del_24_8(&lbm->mapping_by_as6, &kv6, 0);
339 pool_put (lbm->snat_mappings, m);
341 fib_entry_child_remove(as->next_hop_fib_entry_index,
342 as->next_hop_child_index);
343 fib_table_entry_delete_index(as->next_hop_fib_entry_index,
345 as->next_hop_fib_entry_index = FIB_NODE_INDEX_INVALID;
347 pool_put(vip->as_indexes, as_index);
348 pool_put(lbm->ass, as);
358 u32 *to_be_removed_vips = 0, *
i;
360 lb_vip_garbage_collection(vip);
362 if (!(vip->flags & LB_VIP_FLAGS_USED) &&
363 (pool_elts(vip->as_indexes) == 0)) {
364 vec_add1(to_be_removed_vips, vip - lbm->vips);
369 vip = &lbm->vips[*
i];
392 as = &lbm->ass[*as_index];
393 if (as->flags & LB_AS_FLAGS_USED) {
404 new_flow_table[
i].as_index = 0;
414 as = &lbm->ass[*as_index];
415 if (!(as->flags & LB_AS_FLAGS_USED))
418 sort_arr[i].as_index = as - lbm->ass;
421 _vec_len(sort_arr) =
i;
427 lb_as_t *as = &lbm->ass[pr->as_index];
438 pr->skip = ((seed & 0xffffffff) | 1) & vip->new_flow_table_mask;
439 pr->last = (seed >> 32) & vip->new_flow_table_mask;
445 new_flow_table[
i].as_index = ~0;
452 pr->last = (pr->last + pr->skip) & vip->new_flow_table_mask;
453 if (new_flow_table[last].as_index == ~0) {
454 new_flow_table[
last].as_index = pr->as_index;
459 if (done ==
vec_len(new_flow_table))
467 old_table = vip->new_flow_table;
468 vip->new_flow_table = new_flow_table;
473 u32 per_cpu_sticky_buckets,
u32 flow_timeout)
477 if (!
is_pow2(per_cpu_sticky_buckets))
478 return VNET_API_ERROR_INVALID_MEMORY_SIZE;
493 u8 protocol,
u16 port,
502 if ((vip->flags & LB_AS_FLAGS_USED) &&
504 vip->prefix.as_u64[0] == prefix->as_u64[0] &&
505 vip->prefix.as_u64[1] == prefix->as_u64[1])
507 if((lkp_type == LB_LKP_SAME_IP_PORT &&
508 vip->protocol == protocol &&
509 vip->port == port) ||
510 (lkp_type == LB_LKP_ALL_PORT_IP &&
512 (lkp_type == LB_LKP_DIFF_IP_PORT &&
513 (vip->protocol != protocol ||
514 vip->port != port) ) )
516 *vip_index = vip - lbm->vips;
521 return VNET_API_ERROR_NO_SUCH_ENTRY;
526 u8 protocol,
u16 port,
u32 *vip_index)
543 u8 protocol,
u16 port,
u32 *vip_index)
555 protocol, port, vip_index);
567 as = &lbm->ass[*asi];
568 if (as->vip_index == (vip - lbm->vips) &&
569 as->address.as_u64[0] == address->as_u64[0] &&
570 as->address.as_u64[1] == address->as_u64[1])
572 *as_index = as - lbm->ass;
586 return VNET_API_ERROR_NO_SUCH_ENTRY;
590 u32 *to_be_added = 0;
591 u32 *to_be_updated = 0;
604 return VNET_API_ERROR_VALUE_EXIST;
614 return VNET_API_ERROR_INVALID_ADDRESS_FAMILY;
620 if (addresses[n2].
as_u64[0] == addresses[n].
as_u64[0] &&
646 *as_index = as - lbm->
ass;
679 memset (m, 0,
sizeof (*m));
762 for(thread_index = 0; thread_index < tm->
n_vlib_mains; thread_index++ ) {
769 if ((vip_index == ~0)
770 || ((b->
vip[i] == vip_index) && (as_index == ~0))
771 || ((b->
vip[i] == vip_index) && (b->
value[i] == as_index)))
800 return VNET_API_ERROR_NO_SUCH_ENTRY;
807 return VNET_API_ERROR_NO_SUCH_ENTRY;
813 if (addresses[n2].
as_u64[0] == addresses[n].
as_u64[0] &&
827 if (indexes !=
NULL) {
890 u32 *vip_prefix_index)
911 *vip_prefix_index = vip - lbm->
vips;
945 dpo_set(&dpo, dpo_type, proto, *vip_prefix_index);
958 u32 vip_prefix_index,
u32 vip_idx)
965 key.
port = clib_host_to_net_u16(vip->
port);
986 key.
port = clib_host_to_net_u16(vip->
port);
1041 u32 vip_prefix_index = 0;
1051 return VNET_API_ERROR_VALUE_EXIST;
1056 if ((args.
port != 0) &&
1060 return VNET_API_ERROR_VALUE_EXIST;
1065 if ((args.
port == 0) &&
1070 return VNET_API_ERROR_VALUE_EXIST;
1074 if ((args.
port != 0) &&
1080 return VNET_API_ERROR_INVALID_ARGUMENT;
1085 return VNET_API_ERROR_INVALID_MEMORY_SIZE;
1091 return VNET_API_ERROR_INVALID_ADDRESS_FAMILY;
1097 return VNET_API_ERROR_INVALID_ADDRESS_FAMILY;
1104 return VNET_API_ERROR_VALUE_EXIST;
1163 key = clib_host_to_net_u16(args.
port);
1167 return VNET_API_ERROR_VALUE_EXIST;
1177 *vip_index = vip - lbm->
vips;
1201 return VNET_API_ERROR_NO_SUCH_ENTRY;
1209 ip46_address_t *ass = 0;
1214 as = &lbm->ass[*as_index];
1215 vec_add1(ass, as->address);
1240 .version = VPP_BUILD_VER,
1241 .description =
"Load Balancer",
1273 return ((
lb_as_t*)(((
char*)node) -
1321 sw_if_index, 0, 0, 0);
1326 sw_if_index, 1, 0, 0);
1337 sw_if_index, 0, 0, 0);
1342 sw_if_index, 1, 0, 0);
1372 default_vip->
prefix.ip6.as_u64[0] = 0xffffffffffffffffL;
1373 default_vip->
prefix.ip6.as_u64[1] = 0xffffffffffffffffL;
1375 default_vip->
port = 0;
1409 default_as->
flags = 0;
1412 default_as->
address.ip6.as_u64[0] = 0xffffffffffffffffL;
1413 default_as->
address.ip6.as_u64[1] = 0xffffffffffffffffL;
1430 #define _(a,b,c) lbm->vip_counters[c].name = b;
int lb_vip_del_ass(u32 vip_index, ip46_address_t *addresses, u32 n, u8 flush)
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
fib_protocol_t fp_proto
protocol type
dpo_lock_fn_t dv_lock
A reference counting lock function.
static void lb_vip_add_adjacency(lb_main_t *lbm, lb_vip_t *vip, u32 *vip_prefix_index)
Add the VIP adjacency to the ip4 or ip6 fib.
u32 lb_hash_time_now(vlib_main_t *vm)
static int lb_vip_port_find_all_port_vip(ip46_address_t *prefix, u8 plen, u32 *vip_index)
int lb_nat4_interface_add_del(u32 sw_if_index, int is_del)
Recursive resolution source.
static int lb_pseudorand_compare(void *a, void *b)
Each VIP is configured with a set of application server.
A virtual function table regisitered for a DPO type.
#define lb_vip_is_gre6(vip)
static bool lb_vip_is_l3dsr(const lb_vip_t *vip)
#define lb_vip_is_gre6_port(vip)
vnet_main_t * vnet_get_main(void)
u32 per_cpu_sticky_buckets
Number of buckets in the per-cpu sticky hash table.
clib_error_t * lb_init(vlib_main_t *vm)
u32 fib_entry_child_add(fib_node_index_t fib_entry_index, fib_node_type_t child_type, fib_node_index_t child_index)
static void lb_fib_node_last_lock_gone(fib_node_t *node)
static void lb_vip_update_new_flow_table(lb_vip_t *vip)
static int lb_as_find_index_vip(lb_vip_t *vip, ip46_address_t *address, u32 *as_index)
#define LB_VIP_PER_PORT_MEMORY_SIZE
static const char *const lb_dpo_gre4_ip6_port[]
static f64 vlib_time_now(vlib_main_t *vm)
enum fib_node_back_walk_rc_t_ fib_node_back_walk_rc_t
Return code from a back walk function.
const dpo_id_t * fib_entry_contribute_ip_forwarding(fib_node_index_t fib_entry_index)
static int lb_vip_prefix_index_alloc(lb_main_t *lbm)
static void lb_vip_del_adjacency(lb_main_t *lbm, lb_vip_t *vip)
Deletes the adjacency associated with the VIP.
int lb_conf(ip4_address_t *ip4_address, ip6_address_t *ip6_address, u32 per_cpu_sticky_buckets, u32 flow_timeout)
Fix global load-balancer parameters.
#define lb_get_writer_lock()
u8 * format_ip46_prefix(u8 *s, va_list *args)
int lb_vip_add_ass(u32 vip_index, ip46_address_t *addresses, u32 n)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
ip46_address_t prefix
A Virtual IP represents a given service delivered by a set of application servers.
#define clib_u32_loop_gt(a, b)
32 bits integer comparison for running values.
static u64 clib_xxhash(u64 key)
static heap_elt_t * last(heap_header_t *h)
static_always_inline void vlib_refcount_init(vlib_refcount_t *r)
static void lb_dpo_lock(dpo_id_t *dpo)
static uword * clib_bitmap_set(uword *ai, uword i, uword value)
Sets the ith bit of a bitmap to new_value Removes trailing zeros from the bitmap. ...
#define hash_set_mem(h, key, value)
#define STRUCT_OFFSET_OF(t, f)
#define lb_vip_is_ip4(type)
static void lb_as_stack(lb_as_t *as)
u32 vip[LBHASH_ENTRY_PER_BUCKET]
#define lb_vip_get_by_index(index)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
u32 vip_index
ASs are indexed by address and VIP Index.
#define vec_alloc(V, N)
Allocate space for N more elements (no header, unspecified alignment)
static const char *const *const lb_dpo_gre6_nodes[DPO_PROTO_NUM]
lb_hash_t * sticky_ht
Each CPU has its own sticky flow hash table.
#define pool_len(p)
Number of elements in pool vector.
fib_node_type_t fib_node_register_new_type(const fib_node_vft_t *vft)
Create a new FIB node type and Register the function table for it.
static int lb_vip_del_port_filter(lb_main_t *lbm, lb_vip_t *vip)
Del the VIP filter entry.
#define LB_MAPPING_BUCKETS
#define LB_VIP_FLAGS_USED
#define ip46_address_type(ip46)
ip46_address_t address
Destination address used to tunnel traffic towards that application server.
static counter_t vlib_get_simple_counter(vlib_simple_counter_main_t *cm, u32 index)
Get the value of a simple counter Scrapes the entire set of per-thread counters.
memset(h->entries, 0, sizeof(h->entries[0])*entries)
enum dpo_type_t_ dpo_type_t
Common types of data-path objects New types can be dynamically added using dpo_register_new_type() ...
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
#define VLIB_INIT_FUNCTION(x)
static lb_as_t * lb_as_from_fib_node(fib_node_t *node)
void fib_table_entry_special_remove(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source)
Remove a 'special' entry from the FIB.
lb_lkp_type_t
Lookup type.
#define LB_DEFAULT_PER_CPU_STICKY_BUCKETS
lb-plugin implements a MagLev-like load balancer.
#define LB_MAPPING_MEMORY_SIZE
static const char *const lb_dpo_gre4_ip4[]
u32 flow_timeout
Flow timeout in seconds.
A high priority source a plugin can use.
fib_node_type_t fib_node_type
Node type for registering to fib changes.
dpo_type_t dpo_gre4_type
DPO used to send packet from IP4/6 lookup to LB node.
Aggregrate type for a prefix.
static const char *const *const lb_dpo_nat4_port_nodes[DPO_PROTO_NUM]
vlib_refcount_t as_refcount
Each AS has an associated reference counter.
lb_vip_encap_args_t encap_args
static const char *const lb_dpo_gre6_ip4_port[]
static void lb_vip_garbage_collection(lb_vip_t *vip)
u8 * format_lb_main(u8 *s, va_list *args)
uword * vip_prefix_indexes
bitmap for vip prefix to support per-port vip
u8 * format_lb_vip(u8 *s, va_list *args)
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
u16 fp_len
The mask length.
vlib_node_registration_t lb6_nodeport_node
(constructor) VLIB_REGISTER_NODE (lb6_nodeport_node)
lb_vip_t * vips
Pool of all Virtual IPs.
dpo_type_t dpo_register_new_type(const dpo_vft_t *vft, const char *const *const *nodes)
Create and register a new DPO type.
u32 last_used
Rotating timestamp of when LB_AS_FLAGS_USED flag was last set.
ip4_address_t ip4_src_address
Source address used for IPv4 encapsulated traffic.
static const char *const lb_dpo_l3dsr_ip4_port[]
char * name
The counter collection's name.
u8 plen
The VIP prefix length.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
static const char *const lb_dpo_nat6_ip6_port[]
static const char *const lb_dpo_nat4_ip4_port[]
#define hash_create_mem(elts, key_bytes, value_bytes)
#define lb_vip_is_gre4(vip)
static const char *const lb_dpo_gre6_ip4[]
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
#define lb_vip_is_gre4_port(vip)
static const char *const *const lb_dpo_gre4_port_nodes[DPO_PROTO_NUM]
#define lb_encap_is_ip4(vip)
u32 value[LBHASH_ENTRY_PER_BUCKET]
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
int lb_vip_del(u32 vip_index)
u8 * format_lb_vip_type(u8 *s, va_list *args)
u16 src_port
Network byte order for vip + port case, src_port = port; for node ip + node_port, src_port = node_por...
static const char *const *const lb_dpo_l3dsr_port_nodes[DPO_PROTO_NUM]
#define pool_put(P, E)
Free an object E in pool P.
uword unformat_lb_vip_type(unformat_input_t *input, va_list *args)
int lb_flush_vip_as(u32 vip_index, u32 as_index)
#define LB_DEFAULT_FLOW_TIMEOUT
static int lb_vip_port_find_index(ip46_address_t *prefix, u8 plen, u8 protocol, u16 port, lb_lkp_type_t lkp_type, u32 *vip_index)
void ip46_prefix_normalize(ip46_address_t *prefix, u8 plen)
vlib_node_registration_t lb4_nodeport_node
(constructor) VLIB_REGISTER_NODE (lb4_nodeport_node)
clib_bihash_8_8_t mapping_by_as4
static const char *const *const lb_dpo_gre4_nodes[DPO_PROTO_NUM]
An node in the FIB graph.
fib_node_t fib_node
Registration to FIB event.
static_always_inline void vlib_refcount_add(vlib_refcount_t *r, u32 thread_index, u32 counter_index, i32 v)
#define lb_hash_foreach_entry(h, bucket, i)
ip46_address_t src_ip
for vip + port case, src_ip = vip; for node ip + node_port, src_ip = node_ip
static const char *const lb_dpo_gre6_ip6[]
static const dpo_vft_t lb_vft
#define ip46_prefix_is_ip4(ip46, len)
#define pool_free(p)
Free a pool.
static bool lb_vip_is_nat4_port(const lb_vip_t *vip)
fib_node_index_t fib_table_entry_special_add(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags)
Add a 'special' entry to the FIB.
dpo_type_t dpo_l3dsr_port_type
dpo_type_t dpo_nat4_port_type
static const char *const lb_dpo_gre6_ip6_port[]
static int lb_vip_prefix_index_free(lb_main_t *lbm, u32 instance)
dpo_type_t dpo_gre4_port_type
#define lb_vip_is_ip6(type)
#define vec_free(V)
Free vector's memory (no header).
volatile u32 * writer_lock
static bool lb_vip_is_nat6_port(const lb_vip_t *vip)
#define lb_foreach_vip_counter
u32 fib_node_index_t
A typedef of a node index.
8 octet key, 8 octet key value pair
static fib_node_back_walk_rc_t lb_fib_node_back_walk_notify(fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
static uword clib_bitmap_get(uword *ai, uword i)
Gets the ith bit value from a bitmap.
void dpo_set(dpo_id_t *dpo, dpo_type_t type, dpo_proto_t proto, index_t index)
Set/create a DPO ID The DPO will be locked.
u32 last_garbage_collection
Last time garbage collection was run to free the ASs.
static_always_inline void lb_hash_free(lb_hash_t *h)
lb_as_t * ass
Pool of ASs.
uword * vip_index_by_nodeport
lb_vip_type_t type
The type of traffic for this.
Context passed between object during a back walk.
fib_node_index_t fib_table_entry_special_dpo_add(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
Add a 'special' entry to the FIB that links to the DPO passed A special entry is an entry that the FI...
void vlib_validate_simple_counter(vlib_simple_counter_main_t *cm, u32 index)
validate a simple counter
static int lb_vip_port_find_diff_port(ip46_address_t *prefix, u8 plen, u8 protocol, u16 port, u32 *vip_index)
int lb_vip_del_ass_withlock(u32 vip_index, ip46_address_t *addresses, u32 n, u8 flush)
lb_vip_type_t
The load balancer supports IPv4 and IPv6 traffic and GRE4, GRE6, L3DSR and NAT4, NAT6 encap...
int lb_vip_find_index(ip46_address_t *prefix, u8 plen, u8 protocol, u16 port, u32 *vip_index)
u8 * format_lb_as(u8 *s, va_list *args)
u32 new_flow_table_mask
New flows table length - 1 (length MUST be a power of 2)
dpo_type_t dpo_gre6_port_type
static const char *const *const lb_dpo_nat6_port_nodes[DPO_PROTO_NUM]
static void vlib_zero_simple_counter(vlib_simple_counter_main_t *cm, u32 index)
Clear a simple counter Clears the set of per-thread u16 counters, and the u64 counter.
lb_vip_encap_args_t encap_args
lb_per_cpu_t * per_cpu
Some global data is per-cpu.
static void lb_dpo_unlock(dpo_id_t *dpo)
static vlib_main_t * vlib_get_main(void)
static uword is_pow2(uword x)
vlib_simple_counter_main_t vip_counters[LB_N_VIP_COUNTERS]
Per VIP counter.
int lb_nat6_interface_add_del(u32 sw_if_index, int is_del)
int lb_vip_add(lb_vip_add_args_t args, u32 *vip_index)
static int lb_vip_port_find_index_with_lock(ip46_address_t *prefix, u8 plen, u8 protocol, u16 port, u32 *vip_index)
static const char *const lb_dpo_gre4_ip6[]
#define LB_VIP_PER_PORT_BUCKETS
ip6_address_t ip6_src_address
Source address used in IPv6 encapsulated traffic.
u8 * format_lb_vip_detailed(u8 *s, va_list *args)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static fib_node_t * lb_fib_node_get_node(fib_node_index_t index)
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
lb_snat_mapping_t * snat_mappings
#define DPO_INVALID
An initialiser for DPOs declared on the stack.
void lb_garbage_collection()
static bool lb_vip_is_l3dsr_port(const lb_vip_t *vip)
u32 next_hop_child_index
The child index on the FIB entry.
dpo_type_t dpo_l3dsr_type
#define hash_get_mem(h, key)
A FIB graph nodes virtual function table.
static void * clib_mem_alloc_aligned(uword size, uword align)
static vlib_thread_main_t * vlib_get_thread_main()
clib_bihash_8_8_t vip_index_per_port
static int lb_vip_add_port_filter(lb_main_t *lbm, lb_vip_t *vip, u32 vip_prefix_index, u32 vip_idx)
Add the VIP filter entry.
void dpo_reset(dpo_id_t *dpo)
reset a DPO ID The DPO will be unlocked.
#define vec_foreach(var, vec)
Vector iterator.
dpo_id_t dpo
The next DPO in the graph to follow.
static const char *const lb_dpo_l3dsr_ip4[]
static const char *const lb_dpo_gre4_ip4_port[]
u8 flags
Some per-AS flags.
u16 dpoi_next_node
The next VLIB node to follow.
void udp_register_dst_port(vlib_main_t *vm, udp_dst_port_t dst_port, u32 node_index, u8 is_ip4)
clib_bihash_24_8_t mapping_by_as6
lb_new_flow_entry_t * new_flow_table
Vector mapping (flow-hash & new_connect_table_mask) to AS index.
static const char *const *const lb_dpo_l3dsr_nodes[DPO_PROTO_NUM]
dpo_type_t dpo_nat6_port_type
static uword clib_bitmap_first_clear(uword *ai)
Return the lowest numbered clear bit in a bitmap.
u8 flags
Flags related to this VIP.
#define CLIB_CACHE_LINE_BYTES
static const char *const *const lb_dpo_gre6_port_nodes[DPO_PROTO_NUM]
static char * lb_vip_type_strings[]
u8 * format_lb_dpo(u8 *s, va_list *va)
Load balancing service is provided per VIP+protocol+port.
u32 * as_indexes
Pool of AS indexes used for this VIP.
int vnet_feature_enable_disable(const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
void dpo_stack(dpo_type_t child_type, dpo_proto_t child_proto, dpo_id_t *dpo, const dpo_id_t *parent)
Stack one DPO object on another, and thus establish a child-parent relationship.
#define lb_put_writer_lock()
fib_node_index_t next_hop_fib_entry_index
The FIB entry index for the next-hop.
static_always_inline u32 lb_hash_elts(lb_hash_t *h, u32 time_now)
static uword pool_elts(void *v)
Number of active elements in a pool.