|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
136 adj->rewrite_header.data_bytes = 0;
137 adj->rewrite_header.max_l3_packet_bytes =
173 adj->rewrite_header.sw_if_index,
176 &adj->rewrite_header,
177 sizeof (adj->rewrite_data));
205 ip46_address_t *conn;
233 const ip46_address_t *
nh)
241 ip46_address_t *conn;
256 const ip46_address_t *
259 const ip46_address_t *
nh)
261 const ip46_address_t *conn, *source;
314 adj->rewrite_header.sw_if_index,
435 s =
format(s,
"%U-glean: [src:%U] %U",
439 &adj->rewrite_header, sizeof (adj->rewrite_data), 0);
u32 adj_dpo_get_urpf(const dpo_id_t *dpo)
VNET_SW_INTERFACE_ADD_DEL_FUNCTION(adj_glean_interface_delete)
const ip46_address_t * adj_glean_get_src(fib_protocol_t proto, u32 sw_if_index, const ip46_address_t *nh)
Return the source address from the glean.
fib_protocol_t ia_nh_proto
The protocol of the neighbor/peer.
void vlib_worker_thread_barrier_release(vlib_main_t *vm)
index_t dpoi_index
the index of objects of that type
#define VNET_REWRITE_FOR_SW_INTERFACE_ADDRESS_BROADCAST
void adj_delegate_adj_created(ip_adjacency_t *adj)
@ FIB_NODE_BW_REASON_FLAG_INTERFACE_UP
u32 adj_glean_db_size(void)
Return the size of the adjacency database.
void adj_glean_update_rewrite_itf(u32 sw_if_index)
#define FOR_EACH_FIB_IP_PROTOCOL(_item)
#define ADJ_INDEX_INVALID
Invalid ADJ index - used when no adj is known likewise blazoned capitals INVALID speak volumes where ...
void vnet_rewrite_for_sw_interface(vnet_main_t *vnm, vnet_link_t link_type, u32 sw_if_index, u32 node_index, void *dst_address, vnet_rewrite_header_t *rw, u32 max_rewrite_bytes)
Deprecated.
static walk_rc_t adj_nbr_hw_sw_interface_state_change(vnet_main_t *vnm, u32 sw_if_index, void *arg)
Invoked on each SW interface of a HW interface when the HW interface state changes.
enum adj_walk_rc_t_ adj_walk_rc_t
return codes from a adjacency walker callback function
@ IP_LOOKUP_NEXT_GLEAN
This packet matches an "interface route" and packets need to be passed to ARP to find rewrite string ...
void adj_unlock(adj_index_t adj_index)
Release a reference counting lock on the adjacency.
void vnet_update_adjacency_for_sw_interface(vnet_main_t *vnm, u32 sw_if_index, u32 ai)
adj_index_t adj_glean_get(fib_protocol_t proto, u32 sw_if_index, const ip46_address_t *nh)
Get an existing glean.
static uword ** adj_gleans[FIB_PROTOCOL_IP_MAX]
void adj_glean_walk(u32 sw_if_index, adj_walk_cb_t cb, void *data)
Walk all the gleans on an interface.
u16 fp_len
The mask length.
@ VNET_SW_INTERFACE_FLAG_ADMIN_UP
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
u16 adj_dpo_get_mtu(const dpo_id_t *dpo)
@ VNET_HW_INTERFACE_FLAG_LINK_UP
static clib_error_t * adj_glean_interface_delete(vnet_main_t *vnm, u32 sw_if_index, u32 is_add)
vnet_link_t ia_link
link/ether-type 1 bytes
void adj_glean_update_rewrite(adj_index_t adj_index)
adj_glean_update_rewrite
static adj_walk_rc_t adj_glean_update_rewrite_walk(adj_index_t ai, void *data)
void adj_glean_remove(ip_adjacency_t *adj)
static adj_index_t adj_glean_db_lookup(fib_protocol_t proto, u32 sw_if_index, const ip46_address_t *nh_addr)
fib_node_bw_reason_flag_t fnbw_reason
The reason/trigger for the backwalk.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION(adj_glean_hw_interface_state_change)
ip_lookup_next_t lookup_next_index
Next hop after ip4-lookup.
static adj_index_t adj_get_index(const ip_adjacency_t *adj)
Get a pointer to an adjacency object from its index.
vlib_node_registration_t ip6_glean_node
(constructor) VLIB_REGISTER_NODE (ip6_glean_node)
#define FIB_PROTOCOL_IP_MAX
Definition outside of enum so it does not need to be included in non-defaulted switch statements.
vnet_main_t * vnet_get_main(void)
format_function_t format_vnet_rewrite
#define vlib_worker_thread_barrier_sync(X)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
static void adj_glean_db_remove(fib_protocol_t proto, u32 sw_if_index, const ip46_address_t *nh_addr)
#define vec_foreach_index(var, v)
Iterate over vector indices.
static void adj_dpo_unlock(dpo_id_t *dpo)
static void hash_unset_mem_free(uword **h, const void *key)
#define hash_create_mem(elts, key_bytes, value_bytes)
static void hash_set_mem_alloc(uword **h, const void *key, uword v)
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
static u32 vnet_sw_interface_get_mtu(vnet_main_t *vnm, u32 sw_if_index, vnet_mtu_t af)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
dpo_lock_fn_t dv_lock
A reference counting lock function.
static void adj_glean_db_insert(fib_protocol_t proto, u32 sw_if_index, const ip46_address_t *nh_addr, adj_index_t ai)
static clib_error_t * adj_glean_interface_state_change(vnet_main_t *vnm, u32 sw_if_index, u32 flags)
static void adj_dpo_lock(dpo_id_t *dpo)
void fib_prefix_normalize(const fib_prefix_t *p, fib_prefix_t *out)
normalise a prefix (i.e.
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
@ FIB_NODE_BW_REASON_FLAG_INTERFACE_DOWN
const static char *const *const glean_nodes[DPO_PROTO_NUM]
struct ip_adjacency_t_::@144::@147 glean
IP_LOOKUP_NEXT_GLEAN.
static uword hash_elts(void *v)
void fib_walk_sync(fib_node_type_t parent_type, fib_node_index_t parent_index, fib_node_back_walk_ctx_t *ctx)
Back walk all the children of a FIB node.
static clib_error_t * adj_glean_hw_interface_state_change(vnet_main_t *vnm, u32 hw_if_index, u32 flags)
Registered callback for HW interface state changes.
adj_index_t adj_glean_add_or_lock(fib_protocol_t proto, vnet_link_t linkt, u32 sw_if_index, const fib_prefix_t *conn)
Glean Adjacency.
#define vec_free(V)
Free vector's memory (no header).
union ip_adjacency_t_::@144 sub_type
u8 * format_fib_protocol(u8 *s, va_list *ap)
#define hash_get_mem(h, key)
description fragment has unexpected format
void adj_glean_module_init(void)
Module initialisation.
u32 ia_node_index
The VLIB node in which this adj is used to forward packets.
static vnet_link_t adj_fib_proto_2_nd(fib_protocol_t fp)
vlib_node_registration_t ip4_glean_node
(constructor) VLIB_REGISTER_NODE (ip4_glean_node)
u8 * format_fib_prefix(u8 *s, va_list *args)
#define vec_foreach(var, vec)
Vector iterator.
@ FIB_NODE_BW_REASON_FLAG_INTERFACE_DELETE
int fib_prefix_is_cover(const fib_prefix_t *p1, const fib_prefix_t *p2)
Compare two prefixes for covering relationship.
const static char *const glean_ip6_nodes[]
u32 adj_index_t
An index for adjacencies.
enum vnet_link_t_ vnet_link_t
Link Type: A description of the protocol of packets on the link.
void adj_lock(adj_index_t adj_index)
Take a reference counting lock on the adjacency.
A virtual function table regisitered for a DPO type.
static vlib_main_t * vlib_get_main(void)
static u32 adj_get_glean_node(fib_protocol_t proto)
u8 fib_prefix_get_host_length(fib_protocol_t proto)
Context passed between object during a back walk.
ip_adjacency_t * adj_alloc(fib_protocol_t proto)
const static char *const glean_ip4_nodes[]
The per-protocol VLIB graph nodes that are assigned to a glean object.
vnet_mtu_t vnet_link_to_mtu(vnet_link_t link)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
u8 * format_adj_glean(u8 *s, va_list *ap)
Format/display a glean adjacency.
void vnet_hw_interface_walk_sw(vnet_main_t *vnm, u32 hw_if_index, vnet_hw_sw_interface_walk_t fn, void *ctx)
Walk the SW interfaces on a HW interface - this is the super interface and any sub-interfaces.
adj_walk_rc_t(* adj_walk_cb_t)(adj_index_t ai, void *ctx)
Call back function when walking adjacencies.
#define hash_foreach_mem(key_var, value_var, h, body)
vl_api_interface_index_t sw_if_index
const static dpo_vft_t adj_glean_dpo_vft
enum walk_rc_t_ walk_rc_t
Walk return code.
static ip_adjacency_t * adj_get(adj_index_t adj_index)
Get a pointer to an adjacency object from its index.
Aggregate type for a prefix.
VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION(adj_glean_interface_state_change)
static adj_walk_rc_t adj_glean_start_backwalk(adj_index_t ai, void *data)
void dpo_register(dpo_type_t type, const dpo_vft_t *vft, const char *const *const *nodes)
For a given DPO type Register:
vl_api_wireguard_peer_flags_t flags