40 #ifndef __included_ip6_forward_h__ 41 #define __included_ip6_forward_h__ 60 u32 n_left_from, n_left_to_next, *from, *to_next;
68 while (n_left_from > 0)
72 while (n_left_from >= 4 && n_left_to_next >= 2)
75 u32 pi0, pi1, lbi0, lbi1, wrong_next;
78 ip6_address_t *dst_addr0, *dst_addr1;
79 u32 flow_hash_config0, flow_hash_config1;
96 pi0 = to_next[0] = from[0];
97 pi1 = to_next[1] = from[1];
158 (ip0->
protocol == IP_PROTOCOL_IP6_HOP_BY_HOP_OPTIONS))
164 (ip1->
protocol == IP_PROTOCOL_IP6_HOP_BY_HOP_OPTIONS))
182 wrong_next = (next0 != next) + 2 * (next1 != next);
220 while (n_left_from > 0 && n_left_to_next > 0)
227 ip6_address_t *dst_addr0;
228 u32 flow_hash_config0;
270 (ip0->
protocol == IP_PROTOCOL_IP6_HOP_BY_HOP_OPTIONS))
u16 lb_n_buckets
number of buckets in the load-balance.
vlib_combined_counter_main_t lbm_to_counters
static u32 ip6_fib_table_fwding_lookup(u32 fib_index, const ip6_address_t *dst)
static void vlib_increment_combined_counter(vlib_combined_counter_main_t *cm, u32 thread_index, u32 index, u64 n_packets, u64 n_bytes)
Increment a combined counter.
int dpo_is_adj(const dpo_id_t *dpo)
Return TRUE is the DPO is any type of adjacency.
static void vlib_set_next_frame_buffer(vlib_main_t *vm, vlib_node_runtime_t *node, u32 next_index, u32 buffer_index)
flow_hash_config_t lb_hash_config
the hash config to use when selecting a bucket.
static const dpo_id_t * load_balance_get_fwd_bucket(const load_balance_t *lb, u16 bucket)
static uword ip6_lookup_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
ip_lookup_next_t
An adjacency is a representation of an attached L3 peer.
u16 lb_n_buckets_minus_1
number of buckets in the load-balance - 1.
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
static void ip_lookup_set_buffer_fib_index(u32 *fib_index_by_sw_if_index, vlib_buffer_t *b)
static const dpo_id_t * load_balance_get_bucket_i(const load_balance_t *lb, u32 bucket)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
static u32 ip6_compute_flow_hash(const ip6_header_t *ip, flow_hash_config_t flow_hash_config)
load_balance_main_t load_balance_main
The one instance of load-balance main.
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
Get pointer to next frame vector data by (vlib_node_runtime_t, next_index).
#define CLIB_PREFETCH(addr, size, type)
void vlib_put_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, u32 n_vectors_left)
Release pointer to next frame vector data.
vlib_main_t vlib_node_runtime_t * node
u16 cached_next_index
Next frame index that vector arguments were last enqueued to last time this node ran.
static load_balance_t * load_balance_get(index_t lbi)
static uword is_pow2(uword x)
index_t dpoi_index
the index of objects of that type
VLIB buffer representation.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
A collection of combined counters.
void ip6_forward_next_trace(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, vlib_rx_or_tx_t which_adj_index)
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
u16 flags
Copy of main node flags.
u16 dpoi_next_node
The next VLIB node to follow.
#define VLIB_NODE_FLAG_TRACE
u32 * fib_index_by_sw_if_index
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.