FD.io VPP  v19.04.4-rc0-5-ge88582fac
Vector Packet Processing
lb.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /**
17  * lb-plugin implements a MagLev-like load balancer.
18  * http://research.google.com/pubs/pub44824.html
19  *
20  * It hasn't been tested for interoperability with the original MagLev
21  * but intends to provide similar functionality.
22  * The load-balancer receives traffic destined to VIP (Virtual IP)
23  * addresses from one or multiple(ECMP) routers.
24  * The load-balancer tunnels the traffic toward many application servers
25  * ensuring session stickyness (i.e. that a single sessions is tunneled
26  * towards a single application server).
27  *
28  */
29 
30 #ifndef LB_PLUGIN_LB_LB_H_
31 #define LB_PLUGIN_LB_LB_H_
32 
33 #include <lb/util.h>
34 #include <vnet/util/refcount.h>
35 
36 #include <vnet/vnet.h>
37 #include <vnet/ip/ip.h>
38 #include <vnet/dpo/dpo.h>
39 #include <vnet/fib/fib_table.h>
40 #include <vppinfra/hash.h>
41 #include <vppinfra/bihash_8_8.h>
42 #include <vppinfra/bihash_24_8.h>
43 #include <lb/lbhash.h>
44 
45 #define LB_DEFAULT_PER_CPU_STICKY_BUCKETS 1 << 10
46 #define LB_DEFAULT_FLOW_TIMEOUT 40
47 #define LB_MAPPING_BUCKETS 1024
48 #define LB_MAPPING_MEMORY_SIZE 64<<20
49 
50 #define LB_VIP_PER_PORT_BUCKETS 1024
51 #define LB_VIP_PER_PORT_MEMORY_SIZE 64<<20
52 
53 typedef enum {
56 } lb_next_t;
57 
58 typedef enum {
63 
64 typedef enum {
69 
70 #define foreach_lb_nat_in2out_error \
71 _(UNSUPPORTED_PROTOCOL, "Unsupported protocol") \
72 _(IN2OUT_PACKETS, "Good in2out packets processed") \
73 _(NO_TRANSLATION, "No translation")
74 
75 typedef enum {
76 #define _(sym,str) LB_NAT_IN2OUT_ERROR_##sym,
78 #undef _
81 
82 /**
83  * lb for kube-proxy supports three types of service
84  */
85 typedef enum {
90 
91 typedef enum {
96 
97 typedef enum {
102 
103 /**
104  * Each VIP is configured with a set of
105  * application server.
106  */
107 typedef struct {
108  /**
109  * Registration to FIB event.
110  */
112 
113  /**
114  * Destination address used to tunnel traffic towards
115  * that application server.
116  * The address is also used as ID and pseudo-random
117  * seed for the load-balancing process.
118  */
119  ip46_address_t address;
120 
121  /**
122  * ASs are indexed by address and VIP Index.
123  * Which means there will be duplicated if the same server
124  * address is used for multiple VIPs.
125  */
127 
128  /**
129  * Some per-AS flags.
130  * For now only LB_AS_FLAGS_USED is defined.
131  */
133 
134 #define LB_AS_FLAGS_USED 0x1
135 
136  /**
137  * Rotating timestamp of when LB_AS_FLAGS_USED flag was last set.
138  *
139  * AS removal is based on garbage collection and reference counting.
140  * When an AS is removed, there is a race between configuration core
141  * and worker cores which may still add a reference while it should not
142  * be used. This timestamp is used to not remove the AS while a race condition
143  * may happen.
144  */
146 
147  /**
148  * The FIB entry index for the next-hop
149  */
151 
152  /**
153  * The child index on the FIB entry
154  */
156 
157  /**
158  * The next DPO in the graph to follow.
159  */
161 
162 } lb_as_t;
163 
165 
166 typedef struct {
169 
170 #define lb_foreach_vip_counter \
171  _(NEXT_PACKET, "packet from existing sessions", 0) \
172  _(FIRST_PACKET, "first session packet", 1) \
173  _(UNTRACKED_PACKET, "untracked packet", 2) \
174  _(NO_SERVER, "no server configured", 3)
175 
176 typedef enum {
177 #define _(a,b,c) LB_VIP_COUNTER_##a = c,
179 #undef _
182 
183 typedef enum {
191 
192 /**
193  * Lookup type
194  */
195 
196 typedef enum {
201 } lb_lkp_type_t;
202 
203 /**
204  * The load balancer supports IPv4 and IPv6 traffic
205  * and GRE4, GRE6, L3DSR and NAT4, NAT6 encap.
206  */
207 typedef enum {
216 } lb_vip_type_t;
217 
220 
221 
222 /* args for different vip encap types */
223 typedef struct {
224  union
225  {
226  struct
227  {
228  /* Service type. clusterip or nodeport */
230 
231  /* Pod's port corresponding to specific service. network byte order */
233  };
234  /* DSCP bits for L3DSR */
237  };
239 
240 typedef struct {
241  /* all fields in NET byte order */
242  union {
243  struct {
248  };
250  };
252 
253 /**
254  * Load balancing service is provided per VIP+protocol+port.
255  * In this data model, a VIP can be a whole prefix.
256  * But load balancing only
257  * occurs on a per-source-address/port basis. Meaning that if a given source
258  * reuses the same port for multiple destinations within the same VIP,
259  * they will be considered as a single flow.
260  */
261 typedef struct {
262 
263  //Runtime
264 
265  /**
266  * Vector mapping (flow-hash & new_connect_table_mask) to AS index.
267  * This is used for new flows.
268  */
270 
271  /**
272  * New flows table length - 1
273  * (length MUST be a power of 2)
274  */
276 
277  /**
278  * Last time garbage collection was run to free the ASs.
279  */
281 
282  //Not runtime
283 
284  /**
285  * A Virtual IP represents a given service delivered
286  * by a set of application servers. It can be a single
287  * address or a prefix.
288  * IPv4 prefixes are encoded using IPv4-in-IPv6 embedded address
289  * (i.e. ::/96 prefix).
290  */
291  ip46_address_t prefix;
292 
293  /**
294  * The VIP prefix length.
295  * In case of IPv4, plen = 96 + ip4_plen.
296  */
298 
299  /* tcp or udp. If not per-port vip, set to ~0 */
301 
302  /* tcp port or udp port. If not per-port vip, set to ~0 */
304 
305  /* Valid for per-port vip */
307 
308  /**
309  * The type of traffic for this.
310  * LB_TYPE_UNDEFINED if unknown.
311  */
313 
314  /* args for different vip encap types */
316 
317  /**
318  * Flags related to this VIP.
319  * LB_VIP_FLAGS_USED means the VIP is active.
320  * When it is not set, the VIP in the process of being removed.
321  * We cannot immediately remove a VIP because the VIP index still may be stored
322  * in the adjacency index.
323  */
325 #define LB_VIP_FLAGS_USED 0x1
326 
327  /**
328  * Pool of AS indexes used for this VIP.
329  * This also includes ASs that have been removed (but are still referenced).
330  */
332 } lb_vip_t;
333 
334 #define lb_vip_is_ip4(type) (type == LB_VIP_TYPE_IP4_GRE6 \
335  || type == LB_VIP_TYPE_IP4_GRE4 \
336  || type == LB_VIP_TYPE_IP4_L3DSR \
337  || type == LB_VIP_TYPE_IP4_NAT4 )
338 
339 #define lb_vip_is_ip6(type) (type == LB_VIP_TYPE_IP6_GRE6 \
340  || type == LB_VIP_TYPE_IP6_GRE4 \
341  || type == LB_VIP_TYPE_IP6_NAT6 )
342 
343 #define lb_encap_is_ip4(vip) ((vip)->type == LB_VIP_TYPE_IP6_GRE4 \
344  || (vip)->type == LB_VIP_TYPE_IP4_GRE4 \
345  || (vip)->type == LB_VIP_TYPE_IP4_L3DSR \
346  || (vip)->type == LB_VIP_TYPE_IP4_NAT4 )
347 
348 #define lb_vip_is_gre4(vip) (((vip)->type == LB_VIP_TYPE_IP6_GRE4 \
349  || (vip)->type == LB_VIP_TYPE_IP4_GRE4) \
350  && ((vip)->port == 0))
351 
352 
353 #define lb_vip_is_gre6(vip) (((vip)->type == LB_VIP_TYPE_IP6_GRE6 \
354  || (vip)->type == LB_VIP_TYPE_IP4_GRE6) \
355  && ((vip)->port == 0))
356 
357 #define lb_vip_is_gre4_port(vip) (((vip)->type == LB_VIP_TYPE_IP6_GRE4 \
358  || (vip)->type == LB_VIP_TYPE_IP4_GRE4) \
359  && ((vip)->port != 0))
360 
361 #define lb_vip_is_gre6_port(vip) (((vip)->type == LB_VIP_TYPE_IP6_GRE6 \
362  || (vip)->type == LB_VIP_TYPE_IP4_GRE6) \
363  && ((vip)->port != 0))
364 
365 always_inline bool
367 {
368  return (vip->type == LB_VIP_TYPE_IP4_L3DSR && vip->port ==0);
369 }
370 
371 always_inline bool
373 {
374  return (vip->type == LB_VIP_TYPE_IP4_L3DSR && vip->port !=0);
375 }
376 always_inline bool
378 {
379  return (vip->type == LB_VIP_TYPE_IP4_NAT4 && vip->port !=0);
380 }
381 always_inline bool
383 {
384  return (vip->type == LB_VIP_TYPE_IP6_NAT6 && vip->port !=0);
385 }
386 
389 
390 #define foreach_lb_nat_protocol \
391  _(UDP, 0, udp, "udp") \
392  _(TCP, 1, tcp, "tcp")
393 
394 typedef enum {
395 #define _(N, i, n, s) LB_NAT_PROTOCOL_##N = i,
397 #undef _
399 
402 {
403  u32 nat_proto = ~0;
404 
405  nat_proto = (ip_proto == IP_PROTOCOL_UDP) ? LB_NAT_PROTOCOL_UDP : nat_proto;
406  nat_proto = (ip_proto == IP_PROTOCOL_TCP) ? LB_NAT_PROTOCOL_TCP : nat_proto;
407 
408  return nat_proto;
409 }
410 
411 /* Key for Pod's egress SNAT */
412 typedef struct {
413  union
414  {
415  struct
416  {
420  fib_index:13;
421  };
423  };
425 
426 typedef struct
427 {
428  union
429  {
430  struct
431  {
436  };
438  };
440 
441 typedef struct {
442  /**
443  * for vip + port case, src_ip = vip;
444  * for node ip + node_port, src_ip = node_ip
445  */
446  ip46_address_t src_ip;
447  ip46_address_t as_ip;
450  /**
451  * Network byte order
452  * for vip + port case, src_port = port;
453  * for node ip + node_port, src_port = node_port
454  */
456  u16 target_port; /* Network byte order */
460 
461 typedef struct {
462  /**
463  * Each CPU has its own sticky flow hash table.
464  * One single table is used for all VIPs.
465  */
467 } lb_per_cpu_t;
468 
469 typedef struct {
470  /**
471  * Pool of all Virtual IPs
472  */
474 
475  /**
476  * bitmap for vip prefix to support per-port vip
477  */
479 
480  /**
481  * Pool of ASs.
482  * ASs are referenced by address and vip index.
483  * The first element (index 0) is special and used only to fill
484  * new_flow_tables when no AS has been configured.
485  */
487 
488  /**
489  * Each AS has an associated reference counter.
490  * As ass[0] has a special meaning, its associated counter
491  * starts at 0 and is decremented instead. i.e. do not use it.
492  */
494 
495  /* hash lookup vip_index by key: {u16: nodeport} */
497 
498  /**
499  * Some global data is per-cpu
500  */
502 
503  /**
504  * Node next index for IP adjacencies, for each of the traffic types.
505  */
506  u32 ip_lookup_next_index[LB_VIP_N_TYPES];
507 
508  /**
509  * Source address used in IPv6 encapsulated traffic
510  */
512 
513  /**
514  * Source address used for IPv4 encapsulated traffic
515  */
517 
518  /**
519  * Number of buckets in the per-cpu sticky hash table.
520  */
522 
523  /**
524  * Flow timeout in seconds.
525  */
527 
528  /**
529  * Per VIP counter
530  */
532 
533  /**
534  * DPO used to send packet from IP4/6 lookup to LB node.
535  */
544  /**
545  * Node type for registering to fib changes.
546  */
548 
549  /* lookup per_port vip by key */
550  clib_bihash_8_8_t vip_index_per_port;
551 
552  /* Find a static mapping by AS IP : target_port */
553  clib_bihash_8_8_t mapping_by_as4;
554  clib_bihash_24_8_t mapping_by_as6;
555 
556  /* Static mapping pool */
558 
559  /**
560  * API dynamically registered base ID.
561  */
563 
564  volatile u32 *writer_lock;
565 
566  /* convenience */
569 } lb_main_t;
570 
571 /* args for different vip encap types */
572 typedef struct {
573  ip46_address_t prefix;
581 
582 extern lb_main_t lb_main;
589 
590 /**
591  * Fix global load-balancer parameters.
592  * @param ip4_address IPv4 source address used for encapsulated traffic
593  * @param ip6_address IPv6 source address used for encapsulated traffic
594  * @return 0 on success. VNET_LB_ERR_XXX on error
595  */
597  u32 sticky_buckets, u32 flow_timeout);
598 
599 int lb_vip_add(lb_vip_add_args_t args, u32 *vip_index);
600 
601 int lb_vip_del(u32 vip_index);
602 
603 int lb_vip_find_index(ip46_address_t *prefix, u8 plen, u8 protocol,
604  u16 port, u32 *vip_index);
605 
606 #define lb_vip_get_by_index(index) (pool_is_free_index(lb_main.vips, index)?NULL:pool_elt_at_index(lb_main.vips, index))
607 
608 int lb_vip_add_ass(u32 vip_index, ip46_address_t *addresses, u32 n);
609 int lb_vip_del_ass(u32 vip_index, ip46_address_t *addresses, u32 n, u8 flush);
610 int lb_flush_vip_as (u32 vip_index, u32 as_index);
611 
613 
614 void lb_garbage_collection();
615 
616 int lb_nat4_interface_add_del (u32 sw_if_index, int is_del);
617 int lb_nat6_interface_add_del (u32 sw_if_index, int is_del);
618 
620 
621 #endif /* LB_PLUGIN_LB_LB_H_ */
u32 sw_if_index
Definition: ipsec_gre.api:37
format_function_t format_lb_vip
Definition: lb.h:387
u64 as_u64
Definition: lb.h:422
int lb_vip_add_ass(u32 vip_index, ip46_address_t *addresses, u32 n)
Definition: lb.c:579
static u32 lb_ip_proto_to_nat_proto(u8 ip_proto)
Definition: lb.h:401
vnet_main_t * vnet_main
Definition: lb.h:568
Each VIP is configured with a set of application server.
Definition: lb.h:107
lb6_nodeport_next_t
Definition: lb.h:97
static bool lb_vip_is_l3dsr(const lb_vip_t *vip)
Definition: lb.h:366
u32 fib_index
Definition: lb.h:435
u32 per_cpu_sticky_buckets
Number of buckets in the per-cpu sticky hash table.
Definition: lb.h:521
u64 as_u64
Definition: bihash_doc.h:63
int lb_vip_find_index(ip46_address_t *prefix, u8 plen, u8 protocol, u16 port, u32 *vip_index)
Definition: lb.c:549
unsigned long u64
Definition: types.h:89
u16 msg_id_base
API dynamically registered base ID.
Definition: lb.h:562
Definition: lb.h:55
lb4_nodeport_next_t
Definition: lb.h:91
ip46_address_t prefix
A Virtual IP represents a given service delivered by a set of application servers.
Definition: lb.h:291
u16 port
Definition: lb.h:418
u32 vip_prefix_index
Definition: lb.h:244
lb_vip_counter_t
Definition: lb.h:176
format_function_t format_lb_vip_type
Definition: lb.h:218
u32 vip_index
ASs are indexed by address and VIP Index.
Definition: lb.h:126
int lb_vip_del_ass(u32 vip_index, ip46_address_t *addresses, u32 n, u8 flush)
Definition: lb.c:847
lb_hash_t * sticky_ht
Each CPU has its own sticky flow hash table.
Definition: lb.h:466
unsigned char u8
Definition: types.h:56
ip46_address_t address
Destination address used to tunnel traffic towards that application server.
Definition: lb.h:119
u8 *() format_function_t(u8 *s, va_list *args)
Definition: format.h:48
lb_next_t
Definition: lb.h:53
int lb_conf(ip4_address_t *ip4_address, ip6_address_t *ip6_address, u32 sticky_buckets, u32 flow_timeout)
Fix global load-balancer parameters.
Definition: lb.c:472
enum dpo_type_t_ dpo_type_t
Common types of data-path objects New types can be dynamically added using dpo_register_new_type() ...
u8 as_ip_is_ipv6
Definition: lb.h:449
#define always_inline
Definition: clib.h:98
unformat_function_t unformat_lb_vip_type
Definition: lb.h:219
lb_lkp_type_t
Lookup type.
Definition: lb.h:196
u32 flow_timeout
Flow timeout in seconds.
Definition: lb.h:526
u16 port
Definition: lb.h:303
Definition: lb.h:469
fib_node_type_t fib_node_type
Node type for registering to fib changes.
Definition: lb.h:547
dpo_type_t dpo_gre4_type
DPO used to send packet from IP4/6 lookup to LB node.
Definition: lb.h:536
u16 protocol
Definition: lb.h:419
u8 protocol
Definition: lb.h:300
vlib_refcount_t as_refcount
Each AS has an associated reference counter.
Definition: lb.h:493
lb_vip_encap_args_t encap_args
Definition: lb.h:315
#define foreach_lb_nat_protocol
Definition: lb.h:390
uword * vip_prefix_indexes
bitmap for vip prefix to support per-port vip
Definition: lb.h:478
unsigned int u32
Definition: types.h:88
format_function_t format_lb_as
Definition: lb.h:164
A collection of simple counters.
Definition: counter.h:57
lb_main_t lb_main
Definition: lb.c:28
vlib_node_registration_t lb6_nodeport_node
(constructor) VLIB_REGISTER_NODE (lb6_nodeport_node)
Definition: node.c:1220
lb_vip_t * vips
Pool of all Virtual IPs.
Definition: lb.h:473
u32 last_used
Rotating timestamp of when LB_AS_FLAGS_USED flag was last set.
Definition: lb.h:145
ip4_address_t ip4_src_address
Source address used for IPv4 encapsulated traffic.
Definition: lb.h:516
vlib_node_registration_t lb_nat6_in2out_node
(constructor) VLIB_REGISTER_NODE (lb_nat6_in2out_node)
Definition: node.c:1266
u8 plen
The VIP prefix length.
Definition: lb.h:297
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
Definition: dpo.h:168
unsigned short u16
Definition: types.h:57
u16 src_port
Network byte order for vip + port case, src_port = port; for node ip + node_port, src_port = node_por...
Definition: lb.h:455
vlib_node_registration_t lb4_nodeport_node
(constructor) VLIB_REGISTER_NODE (lb4_nodeport_node)
Definition: node.c:1204
format_function_t format_lb_main
Definition: lb.h:619
lb_nat_protocol_t
Definition: lb.h:394
LB_nat4_in2out_next_t
Definition: lb.h:58
clib_bihash_8_8_t mapping_by_as4
Definition: lb.h:553
uword() unformat_function_t(unformat_input_t *input, va_list *args)
Definition: format.h:232
An node in the FIB graph.
Definition: fib_node.h:291
Definition: lb.h:166
fib_node_t fib_node
Registration to FIB event.
Definition: lb.h:111
u16 port
Definition: lb.h:245
lb_encap_type_t
Definition: lb.h:183
u8 src_ip_is_ipv6
Definition: lb.h:448
int lb_flush_vip_as(u32 vip_index, u32 as_index)
Definition: lb.c:756
ip46_address_t src_ip
for vip + port case, src_ip = vip; for node ip + node_port, src_ip = node_ip
Definition: lb.h:446
u32 new_length
Definition: lb.h:578
static bool lb_vip_is_nat4_port(const lb_vip_t *vip)
Definition: lb.h:377
vlib_node_registration_t lb6_node
dpo_type_t dpo_l3dsr_port_type
Definition: lb.h:541
dpo_type_t dpo_nat4_port_type
Definition: lb.h:542
vlib_main_t * vm
Definition: buffer.c:312
dpo_type_t dpo_gre4_port_type
Definition: lb.h:538
u32 vrf_id
Definition: lb.h:457
volatile u32 * writer_lock
Definition: lb.h:564
static bool lb_vip_is_nat6_port(const lb_vip_t *vip)
Definition: lb.h:382
#define lb_foreach_vip_counter
Definition: lb.h:170
vlib_main_t * vlib_main
Definition: lb.h:567
u8 ip6_address[16]
Definition: ip_types.api:18
u32 fib_node_index_t
A typedef of a node index.
Definition: fib_types.h:30
u32 as_index
Definition: lb.h:167
dpo_type_t dpo_gre6_type
Definition: lb.h:537
u32 last_garbage_collection
Last time garbage collection was run to free the ASs.
Definition: lb.h:280
lb_as_t * ass
Pool of ASs.
Definition: lb.h:486
uword * vip_index_by_nodeport
Definition: lb.h:496
vlib_node_registration_t lb4_node
ip6_address_t addr
Definition: lb.h:432
lb_vip_type_t type
The type of traffic for this.
Definition: lb.h:312
int lb_vip_del(u32 vip_index)
Definition: lb.c:1194
lb_svr_type_t
lb for kube-proxy supports three types of service
Definition: lb.h:85
lb_vip_type_t
The load balancer supports IPv4 and IPv6 traffic and GRE4, GRE6, L3DSR and NAT4, NAT6 encap...
Definition: lb.h:207
u16 target_port
Definition: lb.h:456
void lb_garbage_collection()
Definition: lb.c:353
ip46_address_t prefix
Definition: lb.h:573
#define foreach_lb_nat_in2out_error
Definition: lb.h:70
u32 new_flow_table_mask
New flows table length - 1 (length MUST be a power of 2)
Definition: lb.h:275
format_function_t format_lb_vip_detailed
Definition: lb.h:388
dpo_type_t dpo_gre6_port_type
Definition: lb.h:539
int lb_vip_add(lb_vip_add_args_t args, u32 *vip_index)
Definition: lb.c:1040
lb_vip_encap_args_t encap_args
Definition: lb.h:579
u32 vip_prefix_index
Definition: lb.h:306
vlib_node_registration_t lb_nat4_in2out_node
(constructor) VLIB_REGISTER_NODE (lb_nat4_in2out_node)
Definition: node.c:1243
lb_per_cpu_t * per_cpu
Some global data is per-cpu.
Definition: lb.h:501
u16 target_port
Definition: lb.h:232
u64 as_u64
Definition: lb.h:249
struct _vlib_node_registration vlib_node_registration_t
u8 ip4_address[4]
Definition: ip_types.api:17
ip6_address_t ip6_src_address
Source address used in IPv6 encapsulated traffic.
Definition: lb.h:511
u64 uword
Definition: types.h:112
lb_snat_mapping_t * snat_mappings
Definition: lb.h:557
static bool lb_vip_is_l3dsr_port(const lb_vip_t *vip)
Definition: lb.h:372
u8 protocol
Definition: lb.h:246
u16 port
Definition: lb.h:433
typedef prefix
Definition: ip_types.api:35
u32 next_hop_child_index
The child index on the FIB entry.
Definition: lb.h:155
dpo_type_t dpo_l3dsr_type
Definition: lb.h:540
enum fib_node_type_t_ fib_node_type_t
The types of nodes in a FIB graph.
u32 fib_index
Definition: lb.h:458
u32 lb_hash_time_now(vlib_main_t *vm)
Definition: lb.c:92
clib_bihash_8_8_t vip_index_per_port
Definition: lb.h:550
u16 protocol
Definition: lb.h:434
dpo_id_t dpo
The next DPO in the graph to follow.
Definition: lb.h:160
u8 flags
Some per-AS flags.
Definition: lb.h:132
ip4_address_t addr
Definition: lb.h:417
clib_bihash_24_8_t mapping_by_as6
Definition: lb.h:554
lb_new_flow_entry_t * new_flow_table
Vector mapping (flow-hash & new_connect_table_mask) to AS index.
Definition: lb.h:269
dpo_type_t dpo_nat6_port_type
Definition: lb.h:543
u8 flags
Flags related to this VIP.
Definition: lb.h:324
LB_nat6_in2out_next_t
Definition: lb.h:64
lb_vip_type_t type
Definition: lb.h:577
ip46_address_t as_ip
Definition: lb.h:447
Load balancing service is provided per VIP+protocol+port.
Definition: lb.h:261
u32 * as_indexes
Pool of AS indexes used for this VIP.
Definition: lb.h:331
u8 rsv
Definition: lb.h:247
lb_nat_in2out_error_t
Definition: lb.h:75
u8 protocol
Definition: ipsec.api:96
int lb_nat4_interface_add_del(u32 sw_if_index, int is_del)
Definition: lb.c:1322
fib_node_index_t next_hop_fib_entry_index
The FIB entry index for the next-hop.
Definition: lb.h:150
int lb_nat6_interface_add_del(u32 sw_if_index, int is_del)
Definition: lb.c:1338